Opened 11 years ago

Closed 10 years ago

#22191 closed defect (wontfix)

gnat-gcc 4.4.1 configure: error: C compiler cannot create executables

Reported by: rperrot@… Owned by: krischik@…
Priority: Low Milestone:
Component: ports Version: 1.8.0
Keywords: Cc:
Port: gnat-gcc

Description

Hi,

I'm trying to install gnat-gcc using gnat-gpl variant and it ends with that error :

"configure: error: C compiler cannot create executables"

here s an extract of config.log :

configure:3280: $? = 0
configure:3282: /opt/gnat-2009-x86_64-apple-darwin9.6.0-bin/bin/gcc -v </dev/null >&5
Using built-in specs.
Target: x86_64-apple-darwin9.6.0
Configured with: /lensk.a/gnatmail/release-gpl/build-lensk/src/configure --prefix=/usr/local/gnat --with-build-time-tools=/lensk.a/gnatmail/release-gpl/build-lensk/obj --with-gmp=/lensk.a/gnatmail/release-gpl/build-lensk/libmpfr/install --with-mpfr=/lensk.a/gnatmail/release-gpl/build-lensk/libmpfr/install --build=x86_64-apple-darwin9.6.0 --enable-languages=c,ada --disable-nls --without-libiconv-prefix --disable-libada --enable-checking=release --with-bugurl=URL:mailto:report@adacore.com
Thread model: posix
gcc version 4.3.4 20090511 for GNAT GPL 2009 (20090511) (GCC) 
configure:3285: $? = 0
configure:3287: /opt/gnat-2009-x86_64-apple-darwin9.6.0-bin/bin/gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:3290: $? = 1
configure:3313: checking for C compiler default output file name
configure:3316: /opt/gnat-2009-x86_64-apple-darwin9.6.0-bin/bin/gcc -O2 -arch i386 -I/opt/local/include -L/opt/local/lib conftest.c  >&5
cc1: error: unrecognized command line option "-arch"
configure:3319: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3357: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_lang_gnat-gcc/work/build':
configure:3360: error: C compiler cannot create executables
See `config.log' for more details.

I think the problem is the -arch option that cause this issue. Is there a way of turning-off that option ?

Change History (7)

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

Keywords: gnat-gcc removed
Owner: changed from macports-tickets@… to krischik@…
Port: gnat-gcc added

comment:2 Changed 11 years ago by krischik@…

Priority: NormalLow

I suggest to use the binary package provided from The GNU Ada Project:

http://sourceforge.net/projects/gnuada/files/

mind you: the compile on Snow Leopard still won't work - but at least you have a working compiler.

comment:3 in reply to:  2 Changed 11 years ago by rperrot@…

It doesn't seem to compile on Leopard too ...

port install gnat-gcc +gnuada ends with :

...
i686-apple-darwin9-gcc-4.0.1: xnmake.adb: Ada compiler not installed on this system
...

Replying to krischik@…:

I suggest to use the binary package provided from The GNU Ada Project:

http://sourceforge.net/projects/gnuada/files/

mind you: the compile on Snow Leopard still won't work - but at least you have a working compiler.

comment:4 Changed 11 years ago by krischik@…

i686-apple-darwin9-gcc-4.0.1? Now this seems very wrong! With the mentioned variant /opt/local/bin/gcc-gnat-4.4 should have been used instead.

Also note that with +gnuada you will ultimately need to force (-f) the installation as gnat-gcc-4.4.2.dmg already installed a compiler to /opt/local.

comment:5 Changed 11 years ago by krischik@…

Status: newassigned

comment:6 in reply to:  4 Changed 11 years ago by rperrot@…

Here is the full error message :

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_lang_gnat-gcc/work/build" && /usr/bin/make -j1 bootstrap " returned error 2
Command output: echo stage3 > stage_final
rm -f stage_current
make[4]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all'.
make[4]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all'.
true "AR_FLAGS=rc" "CC_FOR_BUILD=/opt/local/bin/gcc-gnat-4.4" "CFLAGS=-g -fkeep-inline-functions" "CXXFLAGS=-g -fkeep-inline-functions" "CFLAGS_FOR_BUILD=-O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=-L/opt/local/lib" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=/usr/bin/make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/opt/local" "infodir=/opt/local/share/info" "libdir=/opt/local/lib/gnat-gcc" "prefix=/opt/local" "tooldir=/opt/local/i386-apple-darwin9" "AR=ar" "AS=as" "CC=/opt/local/bin/gcc-gnat-4.4" "CXX=/opt/local/bin/g++-gnat-4.4" "LD=ld" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # /usr/bin/make
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all'.
Makefile:3355: warning: overriding commands for target `gt-darwin.h'
../../gcc-4.4.2/gcc/config/t-darwin:17: warning: ignoring old commands for target `gt-darwin.h'
mkdir -p ada/bldtools/nmake_b
rm -f ada/bldtools/nmake_b/sinfo.ads ada/bldtools/nmake_b/nmake.adt ada/bldtools/nmake_b/xnmake.adb ada/bldtools/nmake_b/xutil.ads ada/bldtools/nmake_b/xutil.adb
cp -p ../../gcc-4.4.2/gcc/ada/sinfo.ads ../../gcc-4.4.2/gcc/ada/nmake.adt ../../gcc-4.4.2/gcc/ada/xnmake.adb ../../gcc-4.4.2/gcc/ada/xutil.ads ../../gcc-4.4.2/gcc/ada/xutil.adb ada/bldtools/nmake_b
(cd ada/bldtools/nmake_b && /opt/local/bin/gnatmake -q xnmake && ./xnmake -b ../../nmake.adb )
i686-apple-darwin9-gcc-4.0.1: xnmake.adb: Ada compiler not installed on this system
gnatmake: "xnmake.adb" compilation error
make[3]: *** [ada/nmake.adb] Error 4
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2

Error: Status 1 encountered during processing.

As you can see CC_FOR_BUILD, CC, CXX seem to be OK but I don't understand why i686-apple-darwin9-gcc-4.0.1 is used then ...

Replying to krischik@…:

i686-apple-darwin9-gcc-4.0.1? Now this seems very wrong! With the mentioned variant /opt/local/bin/gcc-gnat-4.4 should have been used instead.

Also note that with +gnuada you will ultimately need to force (-f) the installation as gnat-gcc-4.4.2.dmg already installed a compiler to /opt/local.

It's noted ! ;)

comment:7 Changed 10 years ago by krischik@…

Resolution: wontfix
Status: assignedclosed

I am currently working on gnat-gcc 4.5.1 - any 4.4 bugs won't be fixed. gnat-gcc is a very time consuming port - any help is welcome. Drop me a mail an I send you the current Portfile and test scripts.

Note: See TracTickets for help on using tickets.