[Ifeffit] Compiling Ifeffit wrapper, Athena, etc on AMD64 Linux Box

Carlo U. Segre segre at iit.edu
Wed Dec 8 23:39:41 CST 2004


Jake:

I think that I have a reason (if not a solution) for this.  The AMD64 is 
an architecture in which Position Independent Code matters.  I believe 
that this is not the case for i386 (the 32 bit mode for the Opteron).  The 
problem you are having is that ifeffit needs to be compiled with -fPIC so 
that you can link it to the wrapper.  This means that you need to 
recompile ifeffit itself.

Matt, Bruce?  Is this correct?  Can you suggest where Jake might make a 
change in the ifeffit configure script to make this work?  I am not an 
expert on automake.

I am interested in this myself as I have an opteron but have not been 
brave enough to try for a pure 64 bit install.

Carlo


On Wed, 8 Dec 2004 mjpushie at ucalgary.ca wrote:

> I've been running in to some problems getting Athena, Artemis, and the other
> add-on packages to ifeffit, compiled on my AMD Athlon-64 Linux box (running
> Fedora Core 3, 64-bit version). I can run "perl Makefile.PL" without any
> problems and get the message:
> Yay! Now type "make" then "make install" to finish    ...
>
> Once I run "make" it gets to the point of putting everything together and I
> get the following message (after the rest of it appears to run successfully):
>
> gcc  -shared ifeffit_wrap.o  -o blib/arch/auto/Ifeffit/Ifeffit.so
> -L/usr/local/lib -lifeffit -L/usr/local/pgplot -lpgplot -lpng -lz
> -L/usr/X11R6/lib -lX11 -L/usr/lib/gcc/x86_64-redhat-linux/3.4.2
> -L/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../lib64 -L/lib/../lib64
> -L/usr/lib/../lib64 -lfrtbegin -lg2c -lm -lgcc_s
> /usr/bin/ld: /usr/local/lib/libifeffit.a(ifeffit.o): relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC
> /usr/local/lib/libifeffit.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [blib/arch/auto/Ifeffit/Ifeffit.so] Error
>
>
> Thus far I have:
> 1) Successfully installed PGPLOT-5.2.0, editing the makefile to read:
> LIBS=-L/usr/X11R6/lib64 -lX11 `$(SRC)/cpg/libgcc_path.sh` -lgcc -lm -lc
> instead of ... -L/usr/X11R6/lib -lX11 ...
>
> 2) Successfully installed ifeffit-1.2.6 after editing:
> src/Makefile
> src/cmdline/Makefile
> src/test/Makefile
> to contain:
> PGPLOT_LIBS = -L/usr/local/pgplot -lpgplot -lpng -lz -L/usr/X11R6/lib64 -lX11
> instead of ... -L/usr/X11R6/lib -lX11 ...
>
> 3) Successfully installed Tk-804.027 after editing Makefile.PL to read:
> X11LIB=/usr/X11R6/lib64
>
> 4) began installing the ifeffit wrapper, athena and artemis with
> $ perl Makefile.PL           (which completed successfully)
> $ make                       (gives errors)
>
> I've edited the Makefile in the horae-046 directory where ifeffit_wrap.c and
> ifeffit_wrap.o are located to append -fPIC following the call to gcc, producing:
>
> gcc  -shared ifeffit_wrap.o -fPIC -o blib/arch/auto/Ifeffit/Ifeffit.so
> -L/usr/local/lib -lifeffit -L/usr/local/pgplot -lpgplot -lpng -lz
> -L/usr/X11R6/lib -lX11 -L/usr/lib/gcc/x86_64-redhat-linux/3.4.2
> -L/usr/lib/gcc/x86_64-redhat-linux/3.4.2/../../../../lib64 -L/lib/../lib64
> -L/usr/lib/../lib64 -lfrtbegin -lg2c -lm -lgcc_s
> /usr/bin/ld: /usr/local/lib/libifeffit.a(ifeffit.o): relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC
> /usr/local/lib/libifeffit.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [blib/arch/auto/Ifeffit/Ifeffit.so] Error 1
>
>
>
> I'm no compiling wizard, and I'm not even certain that -fPIC is supposed to be
> passed to gcc in this manner.  Is there some other way around the whole
> shared/static thing, or is this not even the real issue?
>
> If anyone on the list has any suggestions, by all means please send them
> along. I'd like to get some work done!! Sorry for the length of the post.
>
>
> Jake
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Ifeffit mailing list
> Ifeffit at millenia.cars.aps.anl.gov
> http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
>

-- 
Carlo U. Segre -- Professor of Physics
Associate Dean for Special Projects, Graduate College
Illinois Institute of Technology
Voice: 312.567.3498            Fax: 312.567.3494
Carlo.Segre at iit.edu    http://www.iit.edu/~segre



More information about the Ifeffit mailing list