configure / linking problem when using hdf5
Martin Maechler
Martin Maechler <maechler@stat.math.ethz.ch>
Mon, 16 Aug 1999 09:05:15 +0200
I've installed hdf5 [library & includes] here locally, last week.
[see ?hdf5save in R]
There is a remaining compilation / linking problem for me:
The hdf5 library uses "compress2" a routine defined in Gnu's zlib,
but not available in the zlib that comes with X11R6.3 (which we have installed).
Now unfortunately,
the final link statement for R (0.65) [for me, with hdf5 enabled] is
gcc -o ../../bin/R.X11 arithmetic.o ....[omitted] version.o \
../unix/libunix.a ../appl/libappl.a ../nmath/libmath.a -lSM -lICE -L/usr/local/X11R6.3/lib -R/usr/local/X11R6.3/lib -lX11 -lsocket -lnsl -R/opt/SUNWspro/lib -L/opt/SUNWspro/lib -L/opt/SUNWspro/SC4.2/lib -L/usr/ccs/lib -L/usr/lib /opt/SUNWspro/SC4.2/lib/libM77.a -lF77 -lsunmath -lm -lcx -lreadline -lhdf5 -lz -ldl -ltermcap -lm
Undefined first referenced
symbol in file
compress2 /usr/local/lib/libhdf5.a(H5Z.o)
ld: fatal: Symbol referencing errors. No output written to ../../bin/R.X11
-------------
Which happens because there was an -L/usr/local/X11R6.3/lib
before the "-lhdf5 -lz".
In the local LD_LIBRARY_PATH,
/usr/local/lib (which has the proper libz.a *with* compress2)
comes before the X11/lib (which has the wrong libz.a).
Of course, I can manually
put -L/usr/local/lib BEFORE the -L/usr/local/X11R6.3/lib,
but I wonder what would be recommended, "officially".
Putting " -lhdf5 -lz " BEFORE "-L/usr/local/X11R6.3/lib"
simply fails as well [undefined symbol "compress2"].
Having two different "libz.a" in LD_LIBRARY_PATH doesn't make sense anyway.
Would any of you know if I can safely get rid of X11's one now that I have
GNU's ?
Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum SOL G1 Sonneggstr.33
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1086 <><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._