Opened 14 years ago

Closed 13 years ago

#28912 closed defect (fixed)

i386-elf-gcc fails to compile with XCode 4 installed

Reported by: egavrilov@… Owned by: stepan@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: XCode4 Cc: plowrytx@…, wcmiii@…, andreas@…, konya.vic@…, dongsheng@…
Port: i386-elf-gcc

Description

i386-elf-gcc won't compile after upgrading XCode to version 4 (GCC version 4.2.1 (i686-apple-darwin10-gcc-4.2.1).

On the same Mac, i386-elf-gcc compiled correctly earlier (under XCode 3.2). But after I uninstalled i386-elf-gcc and upgraded XCode to version 4, compilation no longer succeeds.

port error message:

--->  Building i386-elf-gcc
Error: Target org.macports.build returned: shell command failed (see log for details)

main.log: attached

:info:build Checking multilib configuration for libgcc...
:info:build Configuring in i386-elf/libgcc
:info:build configure: loading cache ./config.cache
:info:build checking for --enable-version-specific-runtime-libs... no
:info:build checking for a BSD-compatible install... /usr/bin/install -c
:info:build checking for gawk... no
:info:build checking for mawk... no
:info:build checking for nawk... no
:info:build checking for awk... awk
:info:build checking build system type... x86_64-apple-darwin10
:info:build checking host system type... i386-pc-elf
:info:build checking for i386-elf-ar... i386-elf-ar
:info:build checking for i386-elf-lipo... i386-elf-lipo
:info:build checking for i386-elf-nm... /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/nm
:info:build checking for i386-elf-ranlib... i386-elf-ranlib
:info:build checking for i386-elf-strip... /opt/local/i386-elf/bin/strip
:info:build checking whether ln -s works... yes
:info:build checking for i386-elf-gcc... /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/ -nostdinc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/ -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/targ-include -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/gcc-4.3.2/newlib/libc/include -B/opt/local/i386-elf/bin/ -B/opt/local/i386-elf/lib/ -isystem /opt/local/i386-elf/include -isystem /opt/local/i386-elf/sys-include
:info:build checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
:info:build See `config.log' for more details.
:info:build make[1]: *** [configure-target-libgcc] Error 1
:info:build make: *** [all] Error 2

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/libgcc/config.log: attached

configure:2055: checking for i386-elf-gcc
configure:2081: result: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/ -nostdinc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/ -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/targ-include -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/gcc-4.3.2/newlib/libc/include -B/opt/local/i386-elf/bin/ -B/opt/local/i386-elf/lib/ -isystem /opt/local/i386-elf/include -isystem /opt/local/i386-elf/sys-include
configure:2363: checking for C compiler version
configure:2366: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/ -nostdinc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/ -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/targ-include -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/gcc-4.3.2/newlib/libc/include -B/opt/local/i386-elf/bin/ -B/opt/local/i386-elf/lib/ -isystem /opt/local/i386-elf/include -isystem /opt/local/i386-elf/sys-include --version </dev/null >&5
xgcc (GCC) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2369: $? = 0
configure:2371: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/ -nostdinc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/ -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/targ-include -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/gcc-4.3.2/newlib/libc/include -B/opt/local/i386-elf/bin/ -B/opt/local/i386-elf/lib/ -isystem /opt/local/i386-elf/include -isystem /opt/local/i386-elf/sys-include -v </dev/null >&5
Reading specs from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/specs
Target: i386-elf
Configured with: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/gcc-4.3.2/configure --prefix=/opt/local --infodir=/opt/local/share/info --mandir=/opt/local/share/man --target=i386-elf --program-prefix=i386-elf- --program-suffix=-4.3.2 --without-included-gettext --enable-obsolete --with-newlib --disable-libgfortran --with-gxx-include-dir=/opt/local/i386-elf/include/c++/4.3.2/ --enable-languages=c,c++,objc --build=x86_64-apple-darwin10
Thread model: single
gcc version 4.3.2 (GCC) 
configure:2374: $? = 0
configure:2376: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/ -nostdinc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/ -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/targ-include -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/gcc-4.3.2/newlib/libc/include -B/opt/local/i386-elf/bin/ -B/opt/local/i386-elf/lib/ -isystem /opt/local/i386-elf/include -isystem /opt/local/i386-elf/sys-include -V </dev/null >&5
xgcc: '-V' must come at the start of the command line
configure:2379: $? = 1
configure:2398: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/ -nostdinc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/ -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/targ-include -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/gcc-4.3.2/newlib/libc/include -B/opt/local/i386-elf/bin/ -B/opt/local/i386-elf/lib/ -isystem /opt/local/i386-elf/include -isystem /opt/local/i386-elf/sys-include -o conftest -O2 -g -pipe -O2     conftest.c  >&5
conftest.c:16: internal compiler error: in execute_ipa_pass_list, at passes.c:1190
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:2401: $? = 1
configure:2567: checking for suffix of object files
configure:2588: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/./gcc/ -nostdinc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/ -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/newlib/targ-include -isystem /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/gcc-4.3.2/newlib/libc/include -B/opt/local/i386-elf/bin/ -B/opt/local/i386-elf/lib/ -isystem /opt/local/i386-elf/include -isystem /opt/local/i386-elf/sys-include -c -O2 -g -pipe -O2    conftest.c >&5
conftest.c:16: internal compiler error: in execute_ipa_pass_list, at passes.c:1190
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:2591: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2605: error: cannot compute suffix of object files: cannot compile

Attachments (2)

config.log (16.6 KB) - added by egavrilov@… 14 years ago.
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/libgcc/config.loh
main.log (14.7 KB) - added by egavrilov@… 14 years ago.
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/main.log

Download all attachments as: .zip

Change History (20)

Changed 14 years ago by egavrilov@…

Attachment: config.log added

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/work/build/i386-elf/libgcc/config.loh

Changed 14 years ago by egavrilov@…

Attachment: main.log added

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-elf-gcc/main.log

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to stepan@…
Port: i386-elf-gcc added

Please remember to fill in the Port field and cc the maintainer.

comment:2 Changed 14 years ago by plowrytx@…

Cc: plowrytx@… added

Cc Me!

comment:3 Changed 13 years ago by plowrytx@…

This was fixed in gcc upstream: GCC Bug 41180

comment:4 Changed 13 years ago by wcmiii@…

Cc: wcmiii@… added

Cc Me!

comment:5 Changed 13 years ago by andreas@…

Cc: andreas@… added

Cc Me!

comment:6 Changed 13 years ago by andreas@…

I don't think this is fixed in GCC upstream.

I'm having the same problem when compiling a GCC outside of macports. If I make all, I'm failing with this "suffix" error message and if I only make all-gcc the compiler throws internal compiler errors as soon as it is invoked.

See my bugreport here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49656

comment:7 Changed 13 years ago by wcmiii@…

This continues to be an issue on OS X Lion.

comment:8 Changed 13 years ago by mirrorballu2@…

After I've made these changes, configure succeeds: https://trac.macports.org/attachment/ticket/29104/patch-gcc46-xcode4.diff

comment:9 in reply to:  8 Changed 13 years ago by mirrorballu2@…

Replying to mirrorballu2@…:

After I've made these changes, configure succeeds: https://trac.macports.org/attachment/ticket/29104/patch-gcc46-xcode4.diff

Sorry, it still fails.

comment:10 Changed 13 years ago by konya.vic@…

Cc: konya.vic@… added

Cc Me!

comment:11 Changed 13 years ago by dongsheng@…

I am having the same issue.

comment:12 Changed 13 years ago by dongsheng@…

Cc: dongsheng@… added

Cc Me!

comment:13 Changed 13 years ago by dongsheng@…

Cc: dongsheng@… removed

Cc Me!

comment:14 Changed 13 years ago by dongsheng@…

Cc: dongsheng@… added

Cc Me!

comment:15 Changed 13 years ago by dongsheng@…

The bug has been open for 6 months, and do we know if this will be fixed?

I want to help, but I am not sure where to start. Maybe someone can give me some hints?

comment:16 Changed 13 years ago by konya.vic@…

Just successfully compiled and installed i386-elf-gcc. port version: 2.0.3

My workaround:

  1. use port select to change gcc to gcc42 (i686-apple-darwin11-gcc-4.2.1)
  2. fix the following line in Portfile:

configure.cc "gcc -no-cpp-precomp -I${prefix}/include"

It was using cc as the compiler, but cc in mac is a symlink to llvm-gcc, so it will not reflect the version of gcc. (probably affected by xcode4?)

comment:17 Changed 13 years ago by dongsheng@…

Thanks, konya.vic@…

Works like a Charm!

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

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