Opened 18 years ago

Closed 17 years ago

#9170 closed defect (wontfix)

gcc34 build fails on Intel Mac

Reported by: Shaun.Amy@… Owned by: gwright@…
Priority: Normal Milestone:
Component: ports Version: 1.2
Keywords: Cc: ccowart@…
Port:

Description

Hi,

We just received our first Intel MAC, and I was trying to build "pgplot" (which requires "gcc34" amongst other things) in order to build some local data analysis software (that we use on various UNIX flavours).

Well into the build process, it fails with the errors below.

Prior to this I installed the latest XCode 2.3 release. This means I now have gcc 3.3 and gcc 4.0 with the default being gcc 4.0 but nothing that resembles FORTRAN which is what PGPLOT needs to build I beleive. As you can see the "gcc 3.4" build is using "gcc 4.0".

Any help is appreciated.

Kind regards, Shaun.

--

... echo timestamp > s-specs (SHLIB_LINK= \ SHLIB_MULTILIB=; \ /usr/bin/gcc-4.0 -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-error -DHAVE_CONFIG_H -I. -I. -I/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc -I/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/. -I/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/../include \

-DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/opt/local/lib/gcc-3.4/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/opt/local/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"3.4.6\" -DDEFAULT_TARGET_MACHINE=\"i686-apple-darwin8.6.1\" -DSTANDARD_BINDIR_PREFIX=\"/opt/local/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" test "X${SHLIB_LINK}" = "X" || test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC" test "X${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB" \ -c /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/gcc.c -o gcc.o)

/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/gcc.c:716: warning: string length '2483' is greater than the length '509' ISO C89 compilers are required to support /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/gcc.c:723: warning: string length '636' is greater than the length '509' ISO C89 compilers are required to support /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/gcc.c:906: warning: string length '529' is greater than the length '509' ISO C89 compilers are required to support /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/gcc.c:924: warning: string length '608' is greater than the length '509' ISO C89 compilers are required to support In file included from ./specs.h:3,

from /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/gcc.c:957:

/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/objc/lang-specs.h:27: warning: string length '603' is greater than the length '509' ISO C89 compilers are required to support /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/objc/lang-specs.h:42: warning: string length '783' is greater than the length '509' ISO C89 compilers are required to support /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/gcc.c:1095: error: parse error before ',' token /opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_lang_gcc34/work/gcc-3.4.6/gcc/gcc.c:1506: warning: string length '833' is greater than the length '509' ISO C89 compilers are required to support make[2]: * [gcc.o] Error 1 make[1]: * [stage1_build] Error 2 make: * [bootstrap-lean] Error 2

Warning: the following items did not execute (for gcc34): com.apple.activate com.apple.build com.apple.destroot com.apple.archive com.apple.install Error: The following dependencies failed to build: gcc34 libpng zlib Error: /opt/local/bin/port: Status 1 encountered during processing.

Change History (11)

comment:1 Changed 18 years ago by gwright@…

Owner: changed from darwinports-bugs@… to gwright@…

It is strange that the gcc34 build is using gcc 4.0. It shouldn't. The portfile specifies gcc 3.3 for building the gcc34 port.

Can you attach the output of

sudo port -dv build gcc34

to the bug report? Thanks.

-Greg

comment:2 Changed 18 years ago by Shaun.Amy@…

attachments.mimetype: application/octet-streamtext/plain

comment:3 Changed 18 years ago by gwright@…

Hi Shaun,

There was an error in the portfile. It tried to build gcc34 using gcc40. This was a mistake. (Building an older gcc with a newer compiler is an unsupported configuration according to the developers.)

Could you update and try again? Thanks

-Greg

comment:4 Changed 18 years ago by gwright@…

Status: newassigned

comment:5 Changed 18 years ago by Shaun.Amy@…

Hi Greg,

Thanks for the reply.

I just had a chance to try this and to me, it looks like the gcc-3.3 compiler on Intel OS/X is broken. I don't know if this is/was a result of installing XCode 2.3 which provided "gcc-4.0". The build of "gcc 3.4" fails early on, so I thought I would simplily things by using a "Hello World" bit of code.

# gcc-3.3 -o test ./test.c gcc-3.3: installation problem, cannot exec `cc1': No such file or directory

which isn't good.

Checking the compilers, gives:

# gcc-3.3 --version gcc-3.3 (GCC) 3.3 20030304 (Apple Computer, Inc. build 1819) Copyright (C) 2002 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.

# gcc-4.0 --version i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5341) Copyright (C) 2005 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.

I am not sure where to look now. It appears that gcc-3.3 is really broken on this machine (it is the only Intel MAC we have so I can't do any comparisons with another box).

I would love to know if this is particular to me or a more general problem with the latest XCode etc.

Any advice or suggestions are most defintely welcome!

Kind regards, Shaun.

comment:6 Changed 18 years ago by gwright@…

Hi Shaun,

If you can't run gcc-3.3 on "Hello, world", there must be a real problem ;-)

I don't know if there is anything I can do further until a working gcc-3.3 is available on intel. Can you tell me specifically why you need to build gcc34? Is it to build a particular application? Maybe we can find a different way to solve your problem.

Best Wishes, Greg

comment:7 Changed 18 years ago by Shaun.Amy@…

Hi Greg,

We did a bit more poking around and discovered that the Apple provided gcc-3.3 appears to be for PPC only - here is the find output (under /usr) for the cc1 preprocessor:

./libexec/gcc/darwin/ppc/3.3/cc1 ./libexec/gcc/darwin/ppc/3.3/cc1obj ./libexec/gcc/darwin/ppc/3.3/cc1objplus ./libexec/gcc/darwin/ppc/3.3/cc1plus ./libexec/gcc/darwin/ppc/3.3-fast/cc1 ./libexec/gcc/darwin/ppc/3.3-fast/cc1obj ./libexec/gcc/darwin/ppc/3.3-fast/cc1objplus ./libexec/gcc/darwin/ppc/3.3-fast/cc1plus ./libexec/gcc/i686-apple-darwin8/4.0.1/cc1 ./libexec/gcc/i686-apple-darwin8/4.0.1/cc1obj ./libexec/gcc/i686-apple-darwin8/4.0.1/cc1objplus ./libexec/gcc/i686-apple-darwin8/4.0.1/cc1plus ./libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1 ./libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1obj ./libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1objplus ./libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1plus

Note that there is no i686 version for 3.3.

What I really need is a FORTRAN compiler so I can build PGPLOT (which is in Darwinports) and once that is built we can then build some in house scientific software. I couldn't find any of the GNU FORTRAN stuff in Darwinports.

Any advice is greatly appreciated.

Shaun.

comment:8 Changed 18 years ago by gwright@…

OK, I see the issue now. The gcc-3.3 compiler you have is only for cross-compiling for ppc. The only gcc release which has successfully compiled on OS X/intel is gcc42. I suggest you build the gcc42 port, which should give you a working gfortran compiler. (It is known that octave can be successfully built on OS X/intel using this compiler.)

-Greg

comment:9 Changed 18 years ago by ccowart@…

Cc: ccowart@… added

I'm having the same problem, only I'm trying to build rtorrent.

rtorrent lists gcc34 as a dependency, and when the gcc34 port tries to build, the system's gcc-3.3 fails, cause it doesn't have i686 support.

Is gcc34 really necessary to build rtorrent? It compiles fine with gcc-4.1.1 on gentoo for a pentium m box.

comment:10 Changed 18 years ago by m@…

gcc34 is important because it provides g77, while gfortran is obviously a good choice it does not provide legacy support for g77 in all cases, either because something was dropped or something has not been implented yet. Programs such as pgplot don't seem to want to build with gfortran, I tried patching the Portfile for pgplot and got it to attempt to compile with gfortran but it seems gfortran does not support the extension %val which allows it to pass variables by value, which I think is needed for the c/c++ interop. of pgplot.

Anyways, gcc34 is needed, it seems it only fails to build because it can't compile without a working version of gcc3 so maybe you can add a darwin_8_i386 variant that downloads a gcc3 binary enviornment to "boot-strap" gcc34.

comment:11 Changed 17 years ago by gwright@…

Resolution: wontfix
Status: assignedclosed

gcc34 on OS X/intel is not really a macports issue. Either Apple and the gcc team support this version on OS X/intel or they don't. If they don't, then programs depending on, say, g77 will have to be updated to build with gfortran. If they and when they do support this configuration, we can update the portfile.

I'm closing this bug with "wontfix".

Note: See TracTickets for help on using tickets.