* Build problem with gcc 3.4 on Mac OS X
@ 2004-06-20 11:43 Davide Angelocola
[not found] ` <6.1.1.1.0.20040620082940.0327e008@iplan-mn.corp.adobe.com>
2004-06-26 2:51 ` Jim Wilson
0 siblings, 2 replies; 6+ messages in thread
From: Davide Angelocola @ 2004-06-20 11:43 UTC (permalink / raw)
To: gcc, gcc-help
Hello,
I'm getting a weird error with the build process under Mac OS X
Panther while configuring gcc 3.4.
$ cd gcc-3.4.0
$ mkdir BUILD
$ cd BUILD
$ ../configure --prefix=/usr --program-suffix="-3.4" --with-cpu=ppc
--enable-altivec ppc --target=i686
...
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
$ grep cpp gcc/config.log
/Users/davang/gcc-3.4.0/gcc/configure: line 1: /lib/cpp: No such file
or directory
configure:2814: /lib/cpp conftest.c
...
Ok, I've no /lib/cpp binary!
$ CPP="/usr/bin/cpp" make
...
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
$ grep cpp gcc/config.log
configure:2896: result: /usr/bin/cpp3
configure:2921: /usr/bin/cpp3 conftest.c
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
configure:2921: /usr/bin/cpp3 conftest.c
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
configure:2995: error: C preprocessor "/usr/bin/cpp3" fails sanity check
ac_cv_env_CPP_value=/usr/bin/cpp3
ac_cv_prog_CPP=/usr/bin/cpp3
CPP='/usr/bin/cpp3'
cpp_install_dir=''
So I've tried to turning off smart processing:
$ CPP="/usr/bin/cpp" CPPFLAGS="-no-cpp-precomp" make
...
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
$ grep -i cpp gcc/config.log
configure:2111: gcc -g -O2 -no-cpp-precomp conftest.c >&5
configure:2205: gcc -o conftest -g -O2 -no-cpp-precomp conftest.c >&5
configure:2261: gcc -c -g -O2 -no-cpp-precomp conftest.c >&5
configure:2315: gcc -c -g -O2 -no-cpp-precomp conftest.c >&5
configure:2365: gcc -c -g -no-cpp-precomp conftest.c >&5
configure:2463: gcc -c -g -O2 -no-cpp-precomp conftest.c >&5
configure:2508: gcc -c -g -O2 -no-cpp-precomp conftest.c >&5
configure:2749: gcc -c -Wno-long-long -no-cpp-precomp conftest.c >&5
configure:2896: result: /usr/bin/cpp
configure:2921: /usr/bin/cpp -no-cpp-precomp conftest.c
configure:2921: /usr/bin/cpp -no-cpp-precomp conftest.c
configure:2995: error: C preprocessor "/usr/bin/cpp" fails sanity check
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=-no-cpp-precomp
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value=/usr/bin/cpp
ac_cv_prog_CPP=/usr/bin/cpp
CPP='/usr/bin/cpp'
CPPFLAGS='-no-cpp-precomp'
cpp_install_dir=''
$ cpp --version
cpp --version
cpp (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
...
Thanks for any input.
-- Davide Angelocola
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <6.1.1.1.0.20040620082940.0327e008@iplan-mn.corp.adobe.com>]
* Re: Build problem with gcc 3.4 on Mac OS X
2004-06-20 11:43 Build problem with gcc 3.4 on Mac OS X Davide Angelocola
[not found] ` <6.1.1.1.0.20040620082940.0327e008@iplan-mn.corp.adobe.com>
@ 2004-06-26 2:51 ` Jim Wilson
2004-06-26 3:03 ` Phil Edwards
2004-06-27 17:27 ` Davide Angelocola
1 sibling, 2 replies; 6+ messages in thread
From: Jim Wilson @ 2004-06-26 2:51 UTC (permalink / raw)
To: Davide Angelocola; +Cc: gcc, gcc-help
Davide Angelocola wrote:
> checking how to run the C preprocessor... /lib/cpp
> configure: error: C preprocessor "/lib/cpp" fails sanity check
> $ grep cpp gcc/config.log
> /Users/davang/gcc-3.4.0/gcc/configure: line 1: /lib/cpp: No such file or
> directory
> configure:2814: /lib/cpp conftest.c
If you look at the gcc/config.log file instead of grepping it, you
should see some useful info that might explain the failure.
configure will try "$CC -E" first, if this doesn't work, then I might
wonder if something is wrong with the value of CC in your environment.
I don't know why /lib/cpp would be used unless perhaps you have the CPP
environment variable set to it, but then that begs the question of why
that environment variable is set. It should not be set normally.
> $ CPP="/usr/bin/cpp" make
You may need to delete some config.cache files, and it is probably
better to rerun configure than run make. Actually, it is probably best
to rm -rf your entire build tree and try again, just to make sure you
are getting a clean build.
I would suggest trying CPP="cc -E", or whatever $CC is set to instead of
using /usr/bin/cpp directly. Or better yet, just set it to an empty
string, and let configure determine which program to use as the C
preprocessor.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build problem with gcc 3.4 on Mac OS X
2004-06-26 2:51 ` Jim Wilson
@ 2004-06-26 3:03 ` Phil Edwards
2004-06-27 17:27 ` Davide Angelocola
1 sibling, 0 replies; 6+ messages in thread
From: Phil Edwards @ 2004-06-26 3:03 UTC (permalink / raw)
To: Jim Wilson; +Cc: Davide Angelocola, gcc, gcc-help
On Fri, Jun 25, 2004 at 07:50:31PM -0700, Jim Wilson wrote:
> Davide Angelocola wrote:
> >checking how to run the C preprocessor... /lib/cpp
> >configure: error: C preprocessor "/lib/cpp" fails sanity check
> >$ grep cpp gcc/config.log
> >/Users/davang/gcc-3.4.0/gcc/configure: line 1: /lib/cpp: No such file or
> >directory
> >configure:2814: /lib/cpp conftest.c
>
> If you look at the gcc/config.log file instead of grepping it, you
> should see some useful info that might explain the failure.
>
> configure will try "$CC -E" first, if this doesn't work, then I might
> wonder if something is wrong with the value of CC in your environment.
>
> I don't know why /lib/cpp would be used unless perhaps you have the CPP
> environment variable set to it, but then that begs the question of why
> that environment variable is set. It should not be set normally.
It's autoconf, trying to be clever. Operating systems designed by morons
used to ship the preprocessor as /lib/cpp, so that's what autoconf's
generated script use as a universal fallback if '$CC -E' and other
combinations don't work.
Unfortunately, there's no good way to distinguish between
$CC -E is not the way to invoke the oreprocessor
and
$CC -E would be the way to invoke the oreprocessor, but $CC is broken
therefore autoconf always assumes the first is true.
The next step is as Jim wrote: you need to look in the log file, not just
grep for bits.
--
America may be unique in being a country which has leapt
from barbarism to decadence without touching civilization.
- John O'Hara
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build problem with gcc 3.4 on Mac OS X
2004-06-26 2:51 ` Jim Wilson
2004-06-26 3:03 ` Phil Edwards
@ 2004-06-27 17:27 ` Davide Angelocola
2004-06-28 18:12 ` Jim Wilson
1 sibling, 1 reply; 6+ messages in thread
From: Davide Angelocola @ 2004-06-27 17:27 UTC (permalink / raw)
To: Jim Wilson; +Cc: gcc-help
On Jun 26, 2004, at 4:50 AM, Jim Wilson wrote:
> Davide Angelocola wrote:
>> checking how to run the C preprocessor... /lib/cpp
>> configure: error: C preprocessor "/lib/cpp" fails sanity check
>> $ grep cpp gcc/config.log
>> /Users/davang/gcc-3.4.0/gcc/configure: line 1: /lib/cpp: No such file
>> or directory
>> configure:2814: /lib/cpp conftest.c
>
> If you look at the gcc/config.log file instead of grepping it, you
> should see some useful info that might explain the failure.
>
> configure will try "$CC -E" first, if this doesn't work, then I might
> wonder if something is wrong with the value of CC in your environment.
>
> I don't know why /lib/cpp would be used unless perhaps you have the
> CPP environment variable set to it, but then that begs the question of
> why that environment variable is set. It should not be set normally.
Ok, I've looked deeply. There are few interesting lines that should
point me to the solution:
configure:2111: gcc -g -O2 -no-cpp-precomp conftest.c >&5
configure:2205: gcc -o conftest -g -O2 -no-cpp-precomp conftest.c >&5
configure:2261: gcc -c -g -O2 -no-cpp-precomp conftest.c >&5
configure:2315: gcc -c -g -O2 -no-cpp-precomp conftest.c >&5
configure:2365: gcc -c -g -no-cpp-precomp conftest.c >&5
configure:2463: gcc -c -g -O2 -no-cpp-precomp conftest.c >&5
configure:2508: gcc -c -g -O2 -no-cpp-precomp conftest.c >&5
***configure:2749: gcc -c -Wno-long-long -no-cpp-precomp conftest.c >&5
****
configure:2896: result: /usr/bin/cpp
configure:2921: /usr/bin/cpp -no-cpp-precomp conftest.c
configure:2921: /usr/bin/cpp -no-cpp-precomp conftest.c
configure:2995: error: C preprocessor "/usr/bin/cpp" fails sanity check
The test fails when configure try to compile a conftest.c file with
-Wno-long-long.
>> $ CPP="/usr/bin/cpp" make
>
> You may need to delete some config.cache files, and it is probably
> better to rerun configure than run make. Actually, it is probably
> best to rm -rf your entire build tree and try again, just to make sure
> you are getting a clean build.
Yes, I've already tried.
> I would suggest trying CPP="cc -E", or whatever $CC is set to instead
> of using /usr/bin/cpp directly. Or better yet, just set it to an
> empty string, and let configure determine which program to use as the
> C preprocessor.
I've tried this too.
Thanks in advance.
-- Davide Angelocola
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Build problem with gcc 3.4 on Mac OS X
2004-06-27 17:27 ` Davide Angelocola
@ 2004-06-28 18:12 ` Jim Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Jim Wilson @ 2004-06-28 18:12 UTC (permalink / raw)
To: Davide Angelocola; +Cc: gcc-help
On Sun, 2004-06-27 at 10:28, Davide Angelocola wrote:
> Ok, I've looked deeply. There are few interesting lines that should
> point me to the solution:
> configure:2111: gcc -g -O2 -no-cpp-precomp conftest.c >&5
> configure:2205: gcc -o conftest -g -O2 -no-cpp-precomp conftest.c >&5
It looks like you are still grepping the config.log file. I can't do
anything with that info. You need to actually read it, or post extracts
from it, to see what the problem is.
> ***configure:2749: gcc -c -Wno-long-long -no-cpp-precomp conftest.c >&5
> ****
> The test fails when configure try to compile a conftest.c file with
> -Wno-long-long.
This is meaningless without additional context, such as the testcase
used, and the error message emitted.
> > I would suggest trying CPP="cc -E", or whatever $CC is set to instead
> > of using /usr/bin/cpp directly. Or better yet, just set it to an
> > empty string, and let configure determine which program to use as the
> > C preprocessor.
> I've tried this too.
If "cc -E" (or "gcc -E") doesn't work, then I would suspect there is
something wrong with your system or your setup. We would need info from
the log file to tell. Info you haven't provided yet.
Are you using anything that modifies how the compiler works? There are
some Mac users that use some strange package on top of their compiler,
the name of which I can't remember, but it is known that this package
causes problems, and use of it is not recommended.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-06-28 18:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-20 11:43 Build problem with gcc 3.4 on Mac OS X Davide Angelocola
[not found] ` <6.1.1.1.0.20040620082940.0327e008@iplan-mn.corp.adobe.com>
[not found] ` <jeekoadw5w.fsf@sykes.suse.de>
2004-06-20 21:26 ` Davide Angelocola
2004-06-26 2:51 ` Jim Wilson
2004-06-26 3:03 ` Phil Edwards
2004-06-27 17:27 ` Davide Angelocola
2004-06-28 18:12 ` Jim Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).