Opened 13 years ago

Closed 12 years ago

#33151 closed defect (fixed)

gcc43, gcc44, gcc45, gcc46, gcc47: fails to compile universal

Reported by: hackdefendr (HackDefendr) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: anddam (Andrea D'Amore), ryandesign (Ryan Carsten Schmidt), gabor.orosz@…, dplr, warrensomebody@…
Port: gcc43, gcc44, gcc45, gcc46, gcc47

Description

Below is the ending crash information, and the debug log is attached.

checking how to run the C preprocessor... none needed
/lib/cpp
checking build system type... x86_64-apple-darwin11
checking host system type... x86_64-apple-darwin11
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
checking for x86_64-apple-darwin11-ranlib... ranlib
checking for library containing strerror... /lib/cpp
none required
checking how to run the C preprocessor... make[2]: *** [configure-build-libiberty] Error 1
make[2]: *** Waiting for unfinished jobs....
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[2]: *** [configure-stage1-libiberty] Error 1
/lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[2]: *** [configure-stage1-intl] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc43/gcc43/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc43/gcc43/work/build'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc43/gcc43/work/build'
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc43/gcc43/work/build" && /usr/bin/make -j3 -w all BOOT_CFLAGS="-O2 -g -D_FORTIFY_SOURCE=0" STAGE1_CFLAGS="-O1 -fkeep-inline-functions -D_FORTIFY_SOURCE=0 -std=gnu89" " returned error 2
Error: Target org.macports.build returned: shell command failed (see log for details)
DEBUG: Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for gcc43): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for gcc43 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc43/gcc43/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Additionally...there is no /lib/cpp:

root /opt/local # ls /lib                                                                                                                                
ls: /lib: No such file or directory

Here is my PATH:

root /opt/local # echo $PATH                                                                                                                             
/opt/local/bin:/opt/local/sbin:/opt/X11/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/android/sdk/platform-tools:/opt/android/sdk/tools:/var/root/bin

Xcode version:

root /opt/local # xcodebuild -version                                                                                                                    
Xcode 4.2.1
Build version 4D502

System Info (yes I am booted to 32 bit kernel):

root /opt/local # uname -a                                                                                                                               
Darwin media 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:48:32 PST 2012; root:xnu-1699.24.23~1/RELEASE_I386 i386

-- Jeff

Attachments (6)

config.log (28.1 KB) - added by hackdefendr (HackDefendr) 13 years ago.
config.log requested by ryan…
gcc4x.diff (397 bytes) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
proposed patch
main.log (37.1 KB) - added by hackdefendr (HackDefendr) 13 years ago.
debug main.log per requirements for opening a bug.
config.logs.tar.gz (3.2 KB) - added by hackdefendr (HackDefendr) 13 years ago.
All config.log files in gcc43 build
main.2.log (17.2 KB) - added by dplr 13 years ago.
main.log.gz (784.8 KB) - added by dplr 13 years ago.

Download all attachments as: .zip

Change History (36)

comment:1 Changed 13 years ago by anddam (Andrea D'Amore)

Cc: and.damore@… added

Cc Me!

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Owner: changed from macports-tickets@… to mww@…

The error "C preprocessor "/lib/cpp" fails sanity check" has been observed in other ports before. When the configure script decides that "/lib/cpp" is the name of your C preprocessor (and then it fails, because that's not where OS X's C preprocessor ever is), it's because the configure script has tried all other common C preprocessor possibilities and decided they are unsuitable. I don't know why that is, but the usual fix for this has been to explicitly inform the configure script where the C preprocessor is, using "configure.env-append CPP=${configure.cpp}". I'll try to reproduce the issue, and see if that fixes it.

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

I cannot reproduce the issue, but because I don't have Lion or Xcode 4.2, I'm testing on Snow Leopard and compiling using the compiler from the clang-3.0 port, which may not be completely comparable. Could you please attach the config.log from your failed build attempt? Maybe it has more details about the problem.

Changed 13 years ago by hackdefendr (HackDefendr)

Attachment: config.log added

config.log requested by ryan...

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Hmm, I didn't realize that gcc43 actually creates 37 different files called "config.log"; from your error above, it looks like the one I actually want to see is build/stage1-intl/config.log. Could you attach that?

comment:5 Changed 13 years ago by hackdefendr (HackDefendr)

there is no build/stage1-intl/config.log ... only the below:

ls -l /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc43/gcc43/work/build
total 1456
drwxr-xr-x  17 macports  admin     578 Feb  6 13:48 .
drwxr-xr-x   6 macports  admin     204 Feb  6 13:48 ..
-rw-r--r--   1 macports  admin  656557 Feb  6 13:48 Makefile
drwxr-xr-x   4 macports  admin     136 Feb  6 13:48 build-x86_64-apple-darwin11
-rw-r--r--   1 macports  admin   28804 Feb  6 13:48 config.log
-rwxr-xr-x   1 macports  admin   32776 Feb  6 13:48 config.status
drwxr-xr-x   2 macports  admin      68 Feb  6 13:48 gcc
drwxr-xr-x   4 macports  admin     136 Feb  6 13:48 intl
drwxr-xr-x   2 macports  admin      68 Feb  6 13:48 libcpp
drwxr-xr-x   2 macports  admin      68 Feb  6 13:48 libdecnumber
drwxr-xr-x   4 macports  admin     136 Feb  6 13:48 libiberty
-rw-r--r--   1 macports  admin      13 Feb  6 13:48 serdep.tmp
-rw-r--r--   1 macports  admin       7 Feb  6 13:48 stage_current
-rw-r--r--   1 macports  admin       7 Feb  6 13:48 stage_final
-rw-r--r--   1 macports  admin       7 Feb  6 13:48 stage_last
drwxr-xr-x   2 macports  admin      68 Feb  6 13:48 x86_64-apple-darwin11
drwxr-xr-x   2 macports  admin      68 Feb  6 13:48 zlib

--Jeff

comment:6 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: clang universal added; gcc43 lion xcode 4.2.1 removed
Summary: gcc43 fails to compile on Lion with XCode 4.2.1gcc43 fails to compile universal with clang

Hmm, ok. Well that log at least confirms:

configure:2724: checking how to run the C preprocessor
configure:2759: /Developer/usr/bin/clang -arch i386 -arch x86_64 -E  conftest.c
clang: error: cannot use 'cpp-output' output with multiple -arch options

I'm wondering why this port is sending -arch flags to cpp; MacPorts doesn't usually do that since the C preprocessor has no use for -arch flags.

It looks like this is fallout from r89472, which was to fix #28376.

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: gcc4x.diff added

proposed patch

comment:7 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

Please try the attached gcc4x.diff patch.

comment:8 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: gabor.orosz@… added
Port: gcc42 gcc44 gcc45 gcc46 gcc47 added
Summary: gcc43 fails to compile universal with clanggcc42, gcc43, gcc44, gcc45, gcc46, gcc47: fails to compile universal with clang

Has duplicate #33169.

Changed 13 years ago by hackdefendr (HackDefendr)

Attachment: main.log added

debug main.log per requirements for opening a bug.

Changed 13 years ago by hackdefendr (HackDefendr)

Attachment: config.logs.tar.gz added

All config.log files in gcc43 build

comment:9 Changed 13 years ago by jmroot (Joshua Root)

Port: gcc42 removed
Summary: gcc42, gcc43, gcc44, gcc45, gcc46, gcc47: fails to compile universal with clanggcc43, gcc44, gcc45, gcc46, gcc47: fails to compile universal with clang

gcc42 doesn't even have a universal variant.

comment:10 Changed 13 years ago by jmroot (Joshua Root)

Keywords: clang universal haspatch removed
Summary: gcc43, gcc44, gcc45, gcc46, gcc47: fails to compile universal with clanggcc43, gcc44, gcc45, gcc46, gcc47: fails to compile universal

comment:11 Changed 13 years ago by jmroot (Joshua Root)

Check if it works for you after r89719.

comment:12 Changed 13 years ago by hackdefendr (HackDefendr)

The compile of gcc43 has progressed well beyond what it has done in the past 5 days. I don't want to ruin it by claiming victory, but it definitely looks promising. Since I have plenty of disk space, and a powerful system, I will go ahead and build gcc44, and gcc45 to knock those off the list. However, gcc46 requires ppl, which also will not build for some other reason, so once the bug I have opened for ppl is resolved, I can build gcc46 and gcc47. Its not a problem for me to do this in the effort of completeness for bug closure...I am glad to help.

comment:13 Changed 13 years ago by hackdefendr (HackDefendr)

Ok...gcc43 was successful. Starting on Gcc44 next.

comment:14 Changed 13 years ago by warrensomebody@…

I'm having this same problem building gcc45 with Snow Leopard 10.6.8 and Xcode 3.2.4 (gcc44 built just fine, however):

version:1
:debug:main epoch: in tree: 0 installed: 0
:debug:main gmp 5.0.2_1 exists in the ports tree
:debug:main gmp 5.0.2_1 +universal is the latest installed
:debug:main gmp 5.0.2_1 +universal is active
:debug:main Merging existing variants '+universal' into variants
:debug:main new fully merged portvariants: universal +
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/gmp
:debug:main OS darwin/10.8.0 (Mac OS X 10.6) arch i386
:debug:main org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
:debug:main Using group file /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/muniversal-1.0.tcl
:debug:main Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
:debug:main universal variant already exists, so not adding the default one
:debug:main Executing variant universal provides universal
:debug:main No need to upgrade! gmp 5.0.2_1 >= gmp 5.0.2_1
:debug:main epoch: in tree: 0 installed: 0
:debug:main mpfr 3.1.0-p3_0 exists in the ports tree
:debug:main mpfr 3.1.0-p3_0 +universal is the latest installed
:debug:main mpfr 3.1.0-p3_0 +universal is active
:debug:main Merging existing variants '+universal' into variants
:debug:main new fully merged portvariants: universal +
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/mpfr
:debug:main OS darwin/10.8.0 (Mac OS X 10.6) arch i386
:debug:main org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
:debug:main Using group file /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/muniversal-1.0.tcl
:debug:main Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
:debug:main universal variant already exists, so not adding the default one
:debug:main Executing variant universal provides universal
:debug:main No need to upgrade! mpfr 3.1.0-p3_0 >= mpfr 3.1.0-p3_0
:debug:main epoch: in tree: 0 installed: 0
:debug:main libiconv 1.14_0 exists in the ports tree
:debug:main libiconv 1.14_0 +universal is the latest installed
:debug:main libiconv 1.14_0 +universal is active
:debug:main Merging existing variants '+universal' into variants
:debug:main new fully merged portvariants: universal +
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/textproc/libiconv
:debug:main OS darwin/10.8.0 (Mac OS X 10.6) arch i386
:debug:main org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
:debug:main Using group file /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/muniversal-1.0.tcl
:debug:main Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
:debug:main universal variant already exists, so not adding the default one
:debug:main Executing variant universal provides universal
:debug:main No need to upgrade! libiconv 1.14_0 >= libiconv 1.14_0
:debug:main epoch: in tree: 0 installed: 0
:debug:main libmpc 0.9_0 exists in the ports tree
:debug:main libmpc 0.9_0 +universal is the latest installed
:debug:main libmpc 0.9_0 +universal is active
:debug:main Merging existing variants '+universal' into variants
:debug:main new fully merged portvariants: universal +
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/libmpc
:debug:main OS darwin/10.8.0 (Mac OS X 10.6) arch i386
:debug:main org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
:debug:main adding the default universal variant
:debug:main Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
:debug:main Executing variant universal provides universal
:debug:main No need to upgrade! libmpc 0.9_0 >= libmpc 0.9_0
:debug:main epoch: in tree: 0 installed: 0
:debug:main gcc_select 0.1_5 exists in the ports tree
:debug:main gcc_select 0.1_5  is the latest installed
:debug:main gcc_select 0.1_5  is active
:debug:main Merging existing variants '' into variants
:debug:main new fully merged portvariants: universal +
:debug:main Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/gcc_select
:debug:main OS darwin/10.8.0 (Mac OS X 10.6) arch i386
:debug:main org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
:debug:main org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
:debug:main Using group file /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/select-1.0.tcl
:debug:main universal_variant is false, so not adding the default universal variant
:debug:main Requested variant universal is not provided by port gcc_select.
:debug:main No need to upgrade! gcc_select 0.1_5 >= gcc_select 0.1_5
:msg:main --->  Computing dependencies for gcc45:info:main .:debug:main Searching for dependency: gmp
:debug:main Found Dependency: receipt exists for gmp
:debug:main Searching for dependency: mpfr
:debug:main Found Dependency: receipt exists for mpfr
:debug:main Searching for dependency: libiconv
:debug:main Found Dependency: receipt exists for libiconv
:debug:main Searching for dependency: libmpc
:debug:main Found Dependency: receipt exists for libmpc
:debug:main Searching for dependency: gcc_select
:debug:main Found Dependency: receipt exists for gcc_select
:msg:main 
:debug:main Executing org.macports.main (gcc45)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 501
:debug:main Skipping completed org.macports.archivefetch (gcc45)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (gcc45)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (gcc45)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.extract (gcc45)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.patch (gcc45)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:configure configure phase started at Sun Feb 19 17:15:00 PST 2012
:notice:configure --->  Configuring gcc45
:debug:configure Using compiler 'Mac OS X llvm-gcc 4.2'
:debug:configure Executing proc-pre-org.macports.configure-configure-0
:debug:configure Executing org.macports.configure (gcc45)
:debug:configure Environment: CPATH='/opt/local/include' CXXFLAGS='-pipe -O2' CPPFLAGS='-I/opt/local/include' AS_FOR_TARGET='/usr/bin/as' CFLAGS='-pipe -O2' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.6' CXX='/Developer/usr/bin/llvm-g++-4.2' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/work/.CC_PRINT_OPTIONS' F90FLAGS='-pipe -O2' LD_FOR_TARGET='/usr/bin/ld' RANLIB_FOR_TARGET='/usr/bin/ranlib' LDFLAGS='-L/opt/local/lib' OBJDUMP_FOR_TARGET='/usr/bin/objdump' FCFLAGS='-pipe -O2' OBJC='/Developer/usr/bin/llvm-gcc-4.2' INSTALL='/usr/bin/install -c' AR_FOR_TARGET='/usr/bin/ar' NM_FOR_TARGET='/usr/bin/nm' FFLAGS='-pipe -O2' OBJCFLAGS='-pipe -O2' CC_PRINT_OPTIONS='YES' STRIP_FOR_TARGET='/usr/bin/strip' CC='/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -arch x86_64'
:debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/work/build" && ../gcc-4.5.3/configure --prefix=/opt/local --build=x86_64-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,fortran,java --libdir=/opt/local/lib/gcc45 --includedir=/opt/local/include/gcc45 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.5 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.5 --with-gxx-include-dir=/opt/local/include/gcc45/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --enable-stage1-checking --enable-lto --enable-fully-dynamic-string'
:debug:configure Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/work/build" && ../gcc-4.5.3/configure --prefix=/opt/local --build=x86_64-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,fortran,java --libdir=/opt/local/lib/gcc45 --includedir=/opt/local/include/gcc45 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.5 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.5 --with-gxx-include-dir=/opt/local/include/gcc45/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --enable-stage1-checking --enable-lto --enable-fully-dynamic-string 
:info:configure checking build system type... x86_64-apple-darwin10
:info:configure checking host system type... x86_64-apple-darwin10
:info:configure checking target system type... x86_64-apple-darwin10
:info:configure checking for a BSD-compatible install... /usr/bin/install -c
:info:configure checking whether ln works... yes
:info:configure checking whether ln -s works... yes
:info:configure checking for a sed that does not truncate output... /usr/bin/sed
:info:configure checking for gawk... gawk
:info:configure checking for gcc... /Developer/usr/bin/llvm-gcc-4.2 -arch i386 -arch x86_64
:info:configure checking for C compiler default output file name... a.out
:info:configure checking whether the C compiler works... yes
:info:configure checking whether we are cross compiling... no
:info:configure checking for suffix of executables... 
:info:configure checking for suffix of object files... o
:info:configure checking whether we are using the GNU C compiler... yes
:info:configure checking whether /Developer/usr/bin/llvm-gcc-4.2 -arch i386 -arch x86_64 accepts -g... yes
:info:configure checking for /Developer/usr/bin/llvm-gcc-4.2 -arch i386 -arch x86_64 option to accept ISO C89... none needed
:info:configure checking whether we are using the GNU C++ compiler... yes
:info:configure checking whether /Developer/usr/bin/llvm-g++-4.2 accepts -g... yes
:info:configure checking for gnatbind... no
:info:configure checking for gnatmake... no
:info:configure checking whether compiler driver understands Ada... no
:info:configure checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
:info:configure checking for objdir... .libs
:info:configure checking for the correct version of gmp.h... yes
:info:configure checking for the correct version of mpfr.h... yes
:info:configure checking for the correct version of mpc.h... yes
:info:configure checking for the correct version of the gmp/mpfr/mpc libraries... yes
:info:configure checking for version 0.10 (or later revision) of PPL... no
:info:configure checking how to run the C preprocessor... /lib/cpp
:info:configure configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/work/build':
:info:configure configure: error: C preprocessor "/lib/cpp" fails sanity check
:info:configure See `config.log' for more details.
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/work/build" && ../gcc-4.5.3/configure --prefix=/opt/local --build=x86_64-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,fortran,java --libdir=/opt/local/lib/gcc45 --includedir=/opt/local/include/gcc45 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.5 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.5 --with-gxx-include-dir=/opt/local/include/gcc45/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --enable-stage1-checking --enable-lto --enable-fully-dynamic-string " returned error 1
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
:debug:configure Backtrace: configure failure: shell command failed (see log for details)
    while executing
"$procedure $targetname"
:info:configure Warning: the following items did not execute (for gcc45): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Log for gcc45 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/main.log

comment:15 Changed 13 years ago by dplr

Cc: david.raulo@… added

Cc Me!

comment:16 in reply to:  11 Changed 13 years ago by dplr

Replying to jmr@…:

Check if it works for you after r89719.

Trying to compile gcc45 +universal on OSX 10.6.8, XCode 4.0.2, MacPorts up-to-date as of today. I'm getting the same error than the original poster.

checking how to run the C preprocessor... /lib/cpp
configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/work/build':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/work/build" && ../gcc-4.5.3/configure --prefix=/opt/local --build=x86_64-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,fortran,java --libdir=/opt/local/lib/gcc45 --includedir=/opt/local/include/gcc45 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.5 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.5 --with-gxx-include-dir=/opt/local/include/gcc45/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --enable-stage1-checking --enable-fully-dynamic-string " returned error 1
Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details)
DEBUG: Backtrace: configure failure: shell command failed (see log for details)
Warning: the following items did not execute (for gcc45): org.macports.install org.macports.configure org.macports.build org.macports.destroot
Log for gcc45 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/main.log

comment:17 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: warrensomebody@… added

warrensomebody, yours was not a clean attempt; please "sudo port selfupdate", "sudo port clean gcc45" and try again. david.raulo, please try this as well.

comment:18 Changed 13 years ago by dplr

I did "sudo port selfupdate", "sudo port clean gcc45"; no change.

comment:19 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Then please attach your new complete main.log.

Changed 13 years ago by dplr

Attachment: main.2.log added

comment:20 Changed 13 years ago by dplr

See attachment main.2.log. You didn't ask for config.log, but I saw something potentially interesting there:

configure:6002: checking how to run the C preprocessor
configure:6033: /usr/bin/clang -arch i386 -arch x86_64 -E -I/opt/local/include conftest.c
clang: error: cannot use 'cpp-output' output with multiple -arch options
configure:6033: $? = 1

comment:21 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

In r89719 we set CPP in build.env but yours is failing in the configure phase. So we need to set it in configure.env. (Note that's what my patch did.) I'm not certain if setting it in configure.env is enough—not sure if we also need to set it in build.env.

comment:22 Changed 13 years ago by dplr

With the line

build.env-append CPP="${configure.cc} -E"

replaced with

configure.env-append CPP=${configure.cpp}

as in your patch, my build still fails early in the configure phase. If I use instead

configure.env-append CPP="${configure.cc} -E"

I get a little further (configure fails in build/intl). Now using

configure.env-append CPP="${configure.cc} -E"
build.env-append CPP="${configure.cc} -E"

the entire configure phase passes. I'll post an update when the build finishes.

Changed 13 years ago by dplr

Attachment: main.log.gz added

comment:23 Changed 13 years ago by dplr

I believe adding the line

configure.env-append CPP="${configure.cc} -E"

fixes this bug. My build now fails for entirely different reasons (related to java, see main.log.gz attached). I guess I should open a separate ticket. Thanks

comment:24 Changed 13 years ago by warrensomebody@…

I did the "sudo port selfupdate" and "sudo port clean gcc45", but still no go:

:info:configure checking for version 0.10 (or later revision) of PPL... no
:info:configure checking how to run the C preprocessor... /lib/cpp
:info:configure configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc45/gcc45/work/build':
:info:configure configure: error: C preprocessor "/lib/cpp" fails sanity check
:info:configure See `config.log' for more details.

The config.log file shows this:

configure:5839: checking for version 0.10 (or later revision) of PPL
configure:5856: /usr/bin/clang -arch i386 -arch x86_64 -c -pipe -O2  -I/opt/local/include -I/opt/local/include -I/opt/local/include  -I/opt/local/include conftest.c >&5
conftest.c:10:10: fatal error: 'ppl_c.h' file not found
#include "ppl_c.h"
         ^
1 error generated.
configure:5856: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include "ppl_c.h"
| int
| main ()
| {
| 
|   #if PPL_VERSION_MAJOR != 0 || PPL_VERSION_MINOR < 10
|   choke me
|   #endif
| 
|   ;
|   return 0;
| }
configure:5860: result: no

comment:25 Changed 13 years ago by warrensomebody@…

After manually installing ppl, I tried again, and hit this one:

configure:5934: checking for version 0.15.5 (or later revision) of CLooG
configure:5951: /usr/bin/clang -arch i386 -arch x86_64 -c -pipe -O2  -DCLOOG_PPL_BACKEND  -I/opt/local/include -I/opt/local/include -I/opt/local/include   -I/opt/local/include conftest.c >&5
conftest.c:10:10: fatal error: 'cloog/cloog.h' file not found
#include "cloog/cloog.h"
         ^
1 error generated.
configure:5951: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include "cloog/cloog.h"
| int
| main ()
| {
| 
|   #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 5
|   choke me
|   #endif
| 
|   ;
|   return 0;
| }
configure:5976: result: no

comment:26 in reply to:  24 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to david.raulo@…:

I believe adding the line

configure.env-append CPP="${configure.cc} -E"

fixes this bug.

Great, thanks for testing. Fixed in r91015.

Replying to warrensomebody@…:

I did the "sudo port selfupdate" and "sudo port clean gcc45", but still no go:

Not surprising, if you had not manually applied the fix we were discussing above, that I have now committed in r91015. Does it work now if you wait 30 minutes, "sudo port selfupdate", "sudo port clean gcc45" and try again?

comment:27 in reply to:  24 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to warrensomebody@…:

The config.log file shows this:

configure:5839: checking for version 0.10 (or later revision) of PPL
configure:5856: /usr/bin/clang -arch i386 -arch x86_64 -c -pipe -O2  -I/opt/local/include -I/opt/local/include -I/opt/local/include  -I/opt/local/include conftest.c >&5
conftest.c:10:10: fatal error: 'ppl_c.h' file not found

ppl is apparently an optional feature that gets used if the ppl library is present. gcc46 has a dependency on ppl; gcc45 and gcc47 do not but will link with it if present. Therefore I have added the dependency and corresponding configure argument to gcc45 and gcc47 in r91016.

comment:28 in reply to:  25 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to warrensomebody@…:

After manually installing ppl, I tried again, and hit this one:

configure:5934: checking for version 0.15.5 (or later revision) of CLooG
configure:5951: /usr/bin/clang -arch i386 -arch x86_64 -c -pipe -O2  -DCLOOG_PPL_BACKEND  -I/opt/local/include -I/opt/local/include -I/opt/local/include   -I/opt/local/include conftest.c >&5
conftest.c:10:10: fatal error: 'cloog/cloog.h' file not found

cloog is another optional feature that gcc apparently uses if present. gcc46 has a cloog variant you can select if you want this feature; gcc45 and gcc47 should apparently be given this variant too. It's troubling that gcc is looking for cloog even though you haven't selected the (nonexistent) cloog variant; this implies it will opportunistically link with it, just like it opportunistically linked with ppl. We should either fix the ports to not use cloog unless requested, or enable cloog all the time. But, I don't believe this matter has anything to do with this ticket; we should file a new ticket for this.

comment:29 Changed 13 years ago by mf2k (Frank Schima)

r91016 causes a circular dependency. ppl +gcc45 cannot be built. See #33795.

comment:30 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.