[SciPy-user] hammer64 atlas binary

tom fogal tfogal at apollo.sr.unh.edu
Wed Jul 21 14:08:26 CDT 2004


Hi. Thanks for the interest, but I seem to have found the problem.

After much searching and hair-pulling, I've discovered that GNU fortran
links in something called 'frtbegin' when creating executables. This
includes the MAIN__ function, which is similar to a the C 'main'
function -- it is invoked after some initial things are setup by
_start.

When building a shared library however, it is incorrect to link with
'frtbegin'. The failure was occuring while SciPy was building
_fftpack.so, so I attempted to force it to build a shared library by
adding -shared to my g77 command line. Worked great. For reference, my
full commandline ended up being:

/usr/local/bin/g77 -shared -L/usr/X11R6/lib64 build/temp.linux-x86_64-2.3/build/src/Lib/fftpack/_fftpackmodule.o build/temp.linux-x86_64-2.3/Lib/fftpack/src/zfft.o build/temp.linux-x86_64-2.3/Lib/fftpack/src/drfft.o build/temp.linux-x86_64-2.3/Lib/fftpack/src/zrfft.o build/temp.linux-x86_64-2.3/Lib/fftpack/src/zfftnd.o build/temp.linux-x86_64-2.3/build/src/fortranobject.o -Lbuild/temp.linux-x86_64-2.3 -ldfftpack -lg2c -lpython2.3 -o build/lib.linux-x86_64-2.3/scipy/fftpack/_fftpack.so

I also had to add the '-lpython2.3' manually. See my earlier post
entitled

"undefined reference to `MAIN__'" while building

I'm not quite sure but this seems like more of a gcc/g77 3.4.1 issue
than a 64bit issue. Has anyone else tried with this compiler?

Thanks again,

-tom

 <40FE8B99.5040706 at enthought.com>Joe Cooper writes:
>Hi Tom,
>
>I'm not sure if anyone has tested SciPy with this version of Atlas 
>(though I have no idea if it makes a difference).  If someone doesn't 
>have answers sooner, I'll see if I can get around to doing x86_64 builds 
>of SciPy sometime later this week, and let you know what I figure out.
>
>tom fogal wrote:
>> Hi all, I've created a binary for an amd64 version of atlas on linux.
>> I noticed a binary for this processor did not already exist, so I made
>> one available at:
>> 
>> http://apollo.sr.unh.edu/~tfogal/scipy/atlas3.7.7_Linux_HAMMER64SSE2.tgz
>> 
>> They were compiled with gcc/g77 3.4.1.
>> 
>> Perhaps someone on this list has access to add the binary to the
>> website?
>> 
>> Even after installing atlas, I'm still having problems building scipy.
>> I'm getting undefined references to 'MAIN__'. From what I can tell this
>> is a C<->Fortran linking issue of sorts, but maybe I'm just
>> misinterpreting things. Any ideas?



More information about the SciPy-user mailing list