| Summary: | dev-libs/hdf4.2.0-r3 needs -fPIC on amd64 | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Vincent Schut <schut> |
| Component: | [OLD] Library | Assignee: | Gentoo Science Related Packages <sci> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | amd64 |
| Priority: | High | Keywords: | InVCS |
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
Patch against hdf-4.2 Makefiles for shared library support
Patch against hdf-4.2.0-r3.ebuild to enable above patch + a little cleanup (e.g. fortan.eclass) config.log Patch against hdf-4.2.0-r3.ebuild to enable above patch + a little cleanup (e.g. fortan.eclass) + sed magic to disallow -Wsign-compare for g77 in FFLAGS |
||
|
Description
Vincent Schut
2004-12-23 00:56:22 UTC
I could test on other platform but I'd first need to know "another" application that uses it and what type of failure are we talking about ... doesn't compile, doesn't return good data , doesn't ... I'm using a library called GDAL (http://www.gdal.org/index.html) which can link against libHDF. If libhdf has not been compiled using -fPIC, the linking fails and the final GDAL shared library file will not be built. I get an message saying I should recompile with -fPIC. This is the only app that I use that uses libhdf, and I know it is not in portage (and I am always using the cvs version, so for me it makes no sense to put it in portage too), but it is a library I am using almost daily and relying on to read satellite data in HDF format, so it is quite important for me. If you don't want to change the compile options of libhdf just for this case, maybe a -fpic use flag could be considered? Or is there already one? Created attachment 49375 [details, diff]
Patch against hdf-4.2 Makefiles for shared library support
Created attachment 49376 [details, diff]
Patch against hdf-4.2.0-r3.ebuild to enable above patch + a little cleanup (e.g. fortan.eclass)
Please test these 2 patches and report back ;-)
The first one goes to /usr/portage/sci-libs/hdf/files, the second one has to be
applied on the ebuild itself.
Doesn't even compile for me now (with the above 2 patches applied): g77 -shared .libs/atom.o .libs/bitvect.o .libs/cdeflate.o .libs/cnbit.o .libs/cnone.o .libs/crle.o .libs/cskphuff.o .libs/cszip.o .libs/df24.o .libs/df24f.o .libs/dfan.o .libs/dfcomp.o .libs/dfconv.o .libs/dfgr.o.libs/dfgroup.o .libs/dfimcomp.o .libs/dfjpeg.o .libs/dfkconv.o .libs/dfkcray.o .libs/dfkfuji.o .libs/dfknat.o .libs/dfkswap.o .libs/dfkvms.o .libs/dfp.o .libs/dfr8.o .libs/dfrle.o .libs/dfsd.o .libs/dfstubs.o .libs/dfufp2i.o .libs/dfunjpeg.o .libs/dfutil.o .libs/dynarray.o .libs/glist.o .libs/hbitio.o .libs/hblocks.o .libs/hbuffer.o .libs/hchunks.o .libs/hcomp.o .libs/hcompri.o .libs/hdfalloc.o .libs/herr.o .libs/hextelt.o.libs/hfile.o .libs/hfiledd.o .libs/hkit.o .libs/linklist.o .libs/mcache.o .libs/mfan.o .libs/mfgr.o .libs/mstdio.o .libs/tbbt.o .libs/vattr.o .libs/vconv.o .libs/vg.o .libs/vgp.o .libs/vhi.o .libs/vio.o .libs/vparse.o .libs/vrw.o .libs/vsfld.o .libs/df24ff.o .libs/dfanf.o .libs/dfanff.o .libs/dff.o .libs/dfff.o .libs/dfpf.o .libs/dfpff.o .libs/dfr8f.o .libs/dfr8ff.o .libs/dfsdf.o .libs/dfsdff.o .libs/dfufp2if.o .libs/dfutilf.o .libs/herrf.o .libs/hfilef.o .libs/hfileff.o .libs/mfanf.o .libs/mfgrf.o .libs/mfgrff.o .libs/vattrf.o.libs/vattrff.o .libs/vgf.o .libs/vgff.o -Wl,--rpath -Wl,/usr/lib -Wl,--rpath -Wl,/usr/lib -lm -lsz /usr/lib/libjpeg.so -lz -Wl,-soname -Wl,libdf.so.0 -o .libs/libdf.so.0.0.0 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/df24ff.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC .libs/df24ff.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[3]: *** [libdf.la] Error 1 make[3]: Leaving directory `/var/tmp/portage/hdf-4.2.0-r3/work/hdf4.2r0/hdf/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/hdf-4.2.0-r3/work/hdf4.2r0/hdf/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/hdf-4.2.0-r3/work/hdf4.2r0/hdf' make: *** [all-recursive] Error 1 Would you please try again after upgrading libtool to testing version 1.5.10-r3 ? you need to pass -fPIC (and -DPIC) to g77 (see LLFLAGS in hdf/src/Makefile) Stkn pointed me on a flaw during ./configure. Vincent: please attach the config.log file generated during ./configure from /var/tmp/portage/hdf-4.2.0-r2/work/hdf-4.2r0/ Created attachment 49475 [details]
config.log
configure reports:
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... no
> checking if g77 PIC flag -fPIC works... no
That's what I found too. I thought I did post that to this bug, but somehow it has disappeared somewhere on in between my pc and bugzilla...
Indeed the configure script finds that g77 doesn't support -fPIC. However, when manually setting FFLAGS to -fPIC before emerging, the emerge finishes without errors. So the configure test for g77 supporting -fPIC is wrong.
Created attachment 49478 [details, diff]
Patch against hdf-4.2.0-r3.ebuild to enable above patch + a little cleanup (e.g. fortan.eclass) + sed magic to disallow -Wsign-compare for g77 in FFLAGS
Vincent + stkn: Please test this new patch against hdf-4.2.0-r3.ebuild
Works for me. Thanks. InCVS now |