Opened 11 years ago

Last modified 7 years ago

#38311 assigned defect

libstdcxx +universal configure failure

Reported by: boydb@… Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: cooljeanius (Eric Gallager)
Port: libstdcxx

Description

When running the command "port install gcc44 +universal", libstdcxx is in the dependency tree and fails to compile.

The log file shows that it appears to be pulling libstdcxx 4.7, from under the gcc47 package and failing to configure:

:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/libstdcxx/work/build" && ../gcc-4.7.2/configure --prefix=/opt/local --build=x86_64-apple-darwin10 --includedir=/opt/local/include/gcc47 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/gcc47/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-ppl-version-check --enable-languages=c++ --disable-bootstrap --with-pkgversion="MacPorts gcc47 4.7.2_2+universal" 
:info:configure Exit code: 77
:error:configure org.macports.configure for port libstdcxx returned: configure failure: command execution failed

I tried installing the gcc47 package first, and then re-running "port install gcc44 +universal", but it still fails out.

I'm not sure if this is a failing on the part of the gcc44 package's "universal" variant (installing without the variant works fine), or libstdcxx (or myself misconfiguring something).

Attachments (4)

main.log (13.6 KB) - added by boydb@… 11 years ago.
main.log
config.log (13.8 KB) - added by boydb@… 11 years ago.
config.log
config2.log (34.9 KB) - added by boydb@… 11 years ago.
config2.log
main2.log (13.7 KB) - added by boydb@… 11 years ago.
main2.log

Download all attachments as: .zip

Change History (18)

Changed 11 years ago by boydb@…

Attachment: main.log added

main.log

comment:1 Changed 11 years ago by boydb@…

For clarity: The gcc ports I have installed are:

gcc44                          @4.4.7_6 
gcc45                          @4.5.4_6 
gcc47                          @4.7.2_2 
gcc_select                     @0.1_8 
$ port select --list gcc
Available versions for gcc:
	gcc40
	gcc42
	llvm-gcc42
	mp-gcc44
	mp-gcc45
	mp-gcc47
	none (active)

This is an OS 10.6.8 box, so the default gcc (/usr/bin/gcc) is i686-apple-darwin10-llvm-gcc-4.2

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

The log you attached says:

:info:configure configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/libstdcxx/work/build':
:info:configure configure: error: C compiler cannot create executables
:info:configure See `config.log' for more details.

Please also attach that config.log so that we can see what happened.

Changed 11 years ago by boydb@…

Attachment: config.log added

config.log

comment:3 Changed 11 years ago by boydb@…

There you go!

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

It says:

configure:4032: checking for C compiler version
configure:4041: /opt/local/bin/gcc-apple-4.2 -arch i386 -arch x86_64 --version >&5
../gcc-4.7.2/configure: line 4043: /opt/local/bin/gcc-apple-4.2: No such file or directory
configure:4052: $? = 127

Do you have the apple-gcc42 port installed? The error suggests that you don't. Please try installing it and see what happens.

Changed 11 years ago by boydb@…

Attachment: config2.log added

config2.log

comment:5 Changed 11 years ago by boydb@…

That's odd an odd requirement, since this machine's native GCC is the XCode one which is the apple 4.2 one. But I did install that port, which seems to allow configure to complete, but the port overall still fails. The relevant part of the main.log seems to be:

:notice:build --->  Building libstdcxx
:debug:build Executing org.macports.build (libstdcxx)
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/libstdcxx/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6' CPP='/opt/local/bin/gcc-apple-4.2 -E'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/libstdcxx/work/build" && /usr/bin/make -j7 -w all'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/libstdcxx/work/build" && /usr/bin/make -j7 -w all 
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/libstdcxx/work/build'
:info:build Makefile:376: *** missing separator.  Stop.
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/libstdcxx/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/libstdcxx/work/build" && /usr/bin/make -j7 -w all 
:info:build Exit code: 2
:error:build org.macports.build for port libstdcxx returned: command execution failed

The full log is attached as main2.log

Changed 11 years ago by boydb@…

Attachment: main2.log added

main2.log

comment:6 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

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

Cc: mww@… openmaintainer@… removed
Owner: changed from macports-tickets@… to mww@…
Port: libstdcxx added; gcc44 removed
Summary: gcc4.4 +universal requiring libstdcxx from gcc4.7?libstdcxx +universal configure failure

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

It looks like libstdcxx does fail to add an apple-gcc42 dependency in the case where you have a too-old clang, a too-old llvm-gcc-4.2, and no gcc-4.2.

comment:9 Changed 11 years ago by boydb@…

There is a clang binary on my system, the native one at /usr/bin/clang rather than a macports one:

$ clang -v
Apple clang version 3.0 (tags/Apple/clang-210.3) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin10.8.0
Thread model: posix

The gcc42 port doesn't compile on Leopard or later, so I can't add that one. Installing llvm-gcc42 didn't help the issue, and neither did clang-3.3, so it seems to be something more than not finding one of those on the system.

comment:10 in reply to:  9 Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to boydb@…:

There is a clang binary on my system, the native one at /usr/bin/clang rather than a macports one:

$ clang -v
Apple clang version 3.0 (tags/Apple/clang-210.3) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin10.8.0
Thread model: posix

This Clang is too old. libstdcxx requires at least clang-425.

Installing llvm-gcc42 didn't help the issue, and neither did clang-3.3, so it seems to be something more than not finding one of those on the system.

Did you specify those compilers when trying to install?

sudo port install libstdcxx +universal configure.compiler=macports-llvm-gcc-4.2
sudo port install libstdcxx +universal configure.compiler=macports-clang-3.3

In the current MacPorts release, the compiler fallback list for Xcode 3.2 is gcc-4.2 > clang > llvm-gcc-4.2 > gcc-4.0 > apple-gcc-4.0, so none of the compilers you tried would have gotten picked up automatically.

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

I suspect boydb is using Xcode 4.2, which would be why gcc-4.2 is not in the fallback list.

comment:12 Changed 11 years ago by boydb@…

I gave a go with:

sudo port clean libstdcxx
sudo port install clang-3.3 clang_select
sudo port select clang mp-clang-3.3
sudo port install libstdcxx +universal configure.compiler=macports-clang-3.3

The clang_select did update my clang binary:

$ which clang
/opt/local/bin/clang
$ clang -v
clang version 3.3 (trunk 180025)
Target: x86_64-apple-darwin10.8.0
Thread model: posix

But doing just sudo port install libstdcxx +universal still failed out. I was able to get it to compile correctly with the full command I listed (with the configure.compiler option set). So, yay, I've finally got libstdcxx +universal installed! Though as a minor follow-up, should the install of libstdcxx been able to find the Macports clang without me having to explicitly define it? I do have Xcode 4.2 installed on this machine, so is "clang" not on the fallback list for this system?

comment:13 in reply to:  12 Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to boydb@…:

Though as a minor follow-up, should the install of libstdcxx been able to find the Macports clang without me having to explicitly define it? I do have Xcode 4.2 installed on this machine, so is "clang" not on the fallback list for this system?

The fallback list for Xcode 4.2 is clang > llvm-gcc-4.2 > apple-gcc-4.2. However, “clang” refers explicitly to the Clang included with Xcode. The Clang selected by port select is “macports-clang”, the use of which is more or less unsupported. We don’t really want users choosing their own compiler.

The port should probably append macports-clang-3.2 to its fallback list, though.

comment:14 Changed 7 years ago by mf2k (Frank Schima)

Owner: mww@… deleted
Status: newassigned

See #53012.

Note: See TracTickets for help on using tickets.