Compilation Error (related to fortran?)

Hi,

I’m having a problem getting root to compile.

thanks for any suggestions

Setup:
root version

v5.22.00


gcc details

Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.3/specs
Configured with: …/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f77 --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)


gfortran details

gfortran -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/4.0.0/specs
Configured with: …/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --with-gxx-include-dir=/usr/include/c++/3.4.3 --enable-languages=c,c++,f95 --disable-libgcj --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.0.0 20041214 (Red Hat 4.0.0-0.14.EL4)


distro

Red Hat Linux Enterprise Version 4
2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64 x86_64 x86_64 GNU/Linux


root configuration command

./configure --enable-mysql --prefix=/usr/local


last make command that fails

g++ -O2 -pipe -m64 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR__HAVE_CONFIG -pthread -DLDAP_DEPRECATED -o net/ldap/src/TLDAPServer.o -c net/ldap/src/TLDAPServer.cxx
bin/rmkdepend -R -fmisc/minicern/src/cernlib.d -Y -w 1000 – -pipe -m64 -Wall -W -fPIC -Iinclude -DR__HAVE_CONFIG -pthread – misc/minicern/src/cernlib.c
gcc -O2 -pipe -m64 -Wall -W -fPIC -Iinclude -DR__HAVE_CONFIG -pthread -o misc/minicern/src/cernlib.o -c misc/minicern/src/cernlib.c
gfortran -O2 -fPIC -m64 -std=legacy -o misc/minicern/src/hbook.o -c misc/minicern/src/hbook.f
f951: error: unrecognized command line option "-std=legacy"
make: *** [misc/minicern/src/hbook.o] Error 1
make: *** Waiting for unfinished jobs…
rm core/utils/src/RStl_tmp.cxx core/utils/src/rootcint_tmp.cxx
[coganp@pcp177897pcs root]$

Hi,

I think I have been able to get over some of the problem - or else I am just getting bogged down somewhere else.

Now I am getting the following:

g++ -pipe -m64 -Wall -W -Woverloaded-virtual -fPIC -Iinclude -DR__HAVE_CONFIG -pthread -Igraf2d/asimage/src/libAfterImage -I. -Icint/cint/inc -o graf2d/asimage/src/G__ASImage.o -c graf2d/asimage/src/G__ASImage.cxx
g++ -shared -Wl,-soname,libASImage.so -m64 -O2 -o lib/libASImage.so graf2d/asimage/src/TASImage.o graf2d/asimage/src/TASPluginGS.o graf2d/asimage/src/G__ASImage.o lib/libAfterImage.a lib/libfreetype.a -L/usr/local/lib -ljpeg -ltiff -lungif -lpng -lz -L/usr/X11R6/lib64 -lXpm -L/usr/X11R6/lib64 -lXext -lX11 -L/usr/X11R6/lib64 -lXft
/usr/bin/ld: /usr/local/lib/libz.a(crc32.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/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [lib/libASImage.so] Error 1
rm core/utils/src/RStl_tmp.cxx core/utils/src/rootcint_tmp.cxx

(system details in first thread)

many thanks for any suggestions!

Two issues, your /usr/local/lib/libz is build without the -fPIC option and it seems to be compiled for 32 bit. Please remove this lib and let ROOT use the system version of libz.

Cheers, Fons.

got it - thanks!!