[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_FC_DUMMY_MAIN broken with gcc4/gfortran

From: Bill Northcott
Subject: Re: AC_FC_DUMMY_MAIN broken with gcc4/gfortran
Date: Fri, 25 Aug 2006 06:36:55 +1000

On 24/08/2006, at 11:03 PM, Peter O'Gorman wrote:
Following my last post I have done some digging on AC_FC_DUMMY_MAIN.

Using gcc4 and gfortran FLIBS include '-lgfortranbegin - lgfortran'. libgfortranbegin defines _main and needs _MAIN__

Since the test program also defines _main it will never link because of the multiply defined symbol! So the test for a dummy main will never succeed.

This seems odd, my libgfortranbegin is a static archive, is yours? Are you passing odd flags like -all_load which would force the main defined in libgfortranbegin to be loaded?

What happens for me is that the main defined in the object is used and the one in libgfortranbegin is ignored because a main has already been found. At least that is what used to happen for me, I haven't looked at it in quite a while...

Funny that. I am definitely not using -all_load and libgfortranbegin is static, or more correctly the libgfortranbegins are static. The compiler is the one distributed with the R 2.3.1 MacOS binary package. So it has fat (ppc i386) compiler executables and three possible targets (ppc ppc64 and i386). It is built from FSF not Apple sources. You could get the compiler and try it yourself.

I will hack about with it some more.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]