Ian Lance Taylor | 1 Nov 2008 01:47
Picon
Favicon
Gravatar

Re: Building GCC 4.3.2 on powerpc-yellowdog-linux-gnu

"Angel Tsankov" <fn42551 <at> fmi.uni-sofia.bg> writes:

> I think GCC core is buggy -- when I try to compile a C source file 
> (<source dir>/gcc/dbgcnt.c or a simple "int main(){}" program) in <build 
> dir> I get this:
> gcc: error trying to exec 'cc1': execvp: No such file or directory
>
> Any ideas whats wrong here?! 

If you want to run an uninstalled gcc, you must use a -B option to
tell it where to find the various passes.  E.g.,
    gcc/xgcc -Bgcc/ -c foo.c

Ian

Angel Tsankov | 1 Nov 2008 06:38
Picon
Favicon

Re: Building GCC 4.3.2 on powerpc-yellowdog-linux-gnu

Ian Lance Taylor wrote:
> "Angel Tsankov" <fn42551 <at> fmi.uni-sofia.bg> writes:
>
>> I think GCC core is buggy -- when I try to compile a C source file
>> (<source dir>/gcc/dbgcnt.c or a simple "int main(){}" program) in
>> <build dir> I get this:
>> gcc: error trying to exec 'cc1': execvp: No such file or directory
>>
>> Any ideas whats wrong here?!
>
> If you want to run an uninstalled gcc, you must use a -B option to
> tell it where to find the various passes.  E.g.,
>    gcc/xgcc -Bgcc/ -c foo.c
>
First, why do you think I'm trying to run an uninstalled gcc?!
And second, -B did not help.

Angel 

Angel Tsankov | 1 Nov 2008 08:04
Picon
Favicon

Re: Building GCC 4.3.2 on powerpc-yellowdog-linux-gnu

Angel Tsankov wrote:
> Ian Lance Taylor wrote:
>> "Angel Tsankov" <fn42551 <at> fmi.uni-sofia.bg> writes:
>>
>>> I think GCC core is buggy -- when I try to compile a C source file
>>> (<source dir>/gcc/dbgcnt.c or a simple "int main(){}" program) in
>>> <build dir> I get this:
>>> gcc: error trying to exec 'cc1': execvp: No such file or directory
>>>
>>> Any ideas whats wrong here?!
>>
Problem resolved by removing "." from PATH.
Details: <build dir> contains a directory named "gcc" and strace 
revealed that gcc tried to execute "./gcc" (the sub-directory) and got 
"Permission denied".

Angel 

Angel Tsankov | 1 Nov 2008 11:32
Picon
Favicon

GCC 4.3.2 ignores -I. if used with other -I directives?!

Hi,

Here's how the test case:

1. Create the following directory tree:

|--include/config.h (may be empty)
|--source/config.h (may be empty)
\--dbgcnt.c (contains only '#include "config.h"')

2. Go to directory "source" and execute the following commands:
gcc -M -I../include -I. ../dbgcnt.c
gcc -M -I. -I../include ../dbgcnt.c

Result on my system:
dbgcnt.o: ../dbgcnt.c ../include/config.h

Is this the expected result or smth is wrong?

Regards,
Angel Tsankov 

Andrew Haley | 1 Nov 2008 11:54
Picon
Favicon

Re: Building GCC 4.3.2 on powerpc-yellowdog-linux-gnu

Angel Tsankov wrote:
> Angel Tsankov wrote:
>> Ian Lance Taylor wrote:
>>> "Angel Tsankov" <fn42551 <at> fmi.uni-sofia.bg> writes:
>>>
>>>> I think GCC core is buggy -- when I try to compile a C source file
>>>> (<source dir>/gcc/dbgcnt.c or a simple "int main(){}" program) in
>>>> <build dir> I get this:
>>>> gcc: error trying to exec 'cc1': execvp: No such file or directory
>>>>
>>>> Any ideas whats wrong here?!
> Problem resolved by removing "." from PATH.

Never have "." in PATH.

Andrew.

Angel Tsankov | 1 Nov 2008 12:06
Picon
Favicon

Re: GCC 4.3.2 ignores -I. if used with other -I directives?!

Angel Tsankov wrote:
> Result on my system:
> dbgcnt.o: ../dbgcnt.c ../include/config.h
>
I meant that on my system the commands produce exactly the same result, 
i.e. the -I. option seems to be ignored. 

Angel Tsankov | 1 Nov 2008 12:28
Picon
Favicon

Re: GCC 4.3.2 ignores -I. if used with other -I directives?!

Angel Tsankov wrote:
> [..] the -I. option seems to be ignored.

A further investigation reveals that GCC ignore not only "-I." but also
"-I<full path to current directory>".

Angel Tsankov | 1 Nov 2008 13:25
Picon
Favicon

Re: GCC 4.3.2 ignores -I. if used with other -I directives?!

Angel Tsankov wrote:
> Angel Tsankov wrote:
>> [..] the -I. option seems to be ignored.
>
> A further investigation reveals that GCC ignore not only "-I." but
> also "-I<full path to current directory>".
>
Still further investigation shows that versions 2.95.4, 3.0.4, and 3.1.1 
take into account "-I<any path to current directory>", while versions 
3.2.3 and 4.3.2 ignore such options.  Any ideas why?

Angel 

Unga | 3 Nov 2008 12:55
Picon
Favicon

How to get more detailed compiler output?

Hi all

I get GCC compilation errors as follows:

cc -c other-options prog.c
{standard input}: Assembler messages:
{standard input}:101: Error: suffix or operands invalid for `mov'
{standard input}:4104: Error: suffix or operands invalid for `mov'
{standard input}:4553: Error: suffix or operands invalid for `mov'
{standard input}:5631: Error: suffix or operands invalid for `mov'
*** Error code 1

There are no "mov" statements at line numbers reported either in the prog.c or its cpp output.

How could I get a more detailed compiler output to identify where those problematic "mov" statements are?

I'm using gcc-4.2.1.

Any help in this regards is very much appreciated.

Kind regards
Unga

Jens Seidel | 3 Nov 2008 12:56

Re: -isystem /usr/include - a bad idea? System header files not found

On Wed, Oct 29, 2008 at 05:00:22PM +0100, Jens Seidel wrote:
> $ cat test.cpp
> #include <cstdlib>
> 
> $ g++ -c -isystem /usr/include test.cpp
> In file included from test.cpp:1:
> /usr/include/c++/4.3/cstdlib:73:25: error: stdlib.h: No such file or directory
> ...

I opened http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38000 for this bug.

Jens


Gmane