Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 75415
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Science Related Packages <sci@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Vincent Schut <schut@sarvision.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
hdf-4.2.0-shared-libs.patch Patch against hdf-4.2 Makefiles for shared library support patch Danny van Dyk (RETIRED) 2005-01-24 07:49 0000 17.38 KB Details | Diff
hdf-4.2.0-r3.ebuild.patch Patch against hdf-4.2.0-r3.ebuild to enable above patch + a little cleanup (e.g. fortan.eclass) patch Danny van Dyk (RETIRED) 2005-01-24 07:51 0000 1.34 KB Details | Diff
config.log config.log text/plain Stefan Knoblich (RETIRED) 2005-01-25 06:16 0000 62.71 KB Details
hdf-4.2.0-r3.ebuild.patch 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 patch Danny van Dyk (RETIRED) 2005-01-25 07:14 0000 1.60 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 75415 depends on: Show dependency tree
Bug 75415 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-12-23 00:56 0000
dev-libs/hdf4.2.0-r3 needs -fPIC on amd64. It compiles without, but then gives
problems when being linked with another application. 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51-r3 (default-linux/amd64/2004.3, gcc-3.4.3, 
glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r9n x86_64) 
================================================================= 
System uname: 2.6.9-gentoo-r9n x86_64 AMD Athlon(tm) 64 Processor 3200+ 
Gentoo Base System version 1.4.16 
Autoconf: sys-devel/autoconf-2.59-r5 
Automake: sys-devel/automake-1.8.5-r1 
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1 
Libtools: sys-devel/libtool-1.5.2-r7 
ACCEPT_KEYWORDS="amd64" 
AUTOCLEAN="yes" 
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" 
CHOST="x86_64-pc-linux-gnu" 
COMPILER="" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" 
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ 
ftp://212.219.56.152/sites/www.ibiblio.org/gentoo/ 
ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="amd64 X Xaw3d acpi alsa apache2 arts audiofile avi berkdb bitmap-fonts 
blas bzlib cdparanoia cdr crypt cscope cups dbase dga directfb divx4linux dvd 
dvdr escreen esd etwin exif f2c f77 fam fbcon fftw flac fortran ftp gd gdbm ggi 
gif gimpprint gphoto2 gpm gps gtk gtk2 gtkhtml imagemagick imlib ipv6 java 
javascript jikesjp2 jpeg junit kde lapack libgda libwww lzw lzw-tiff 
lzw-tiffmad mad mbox mime mng motif mozilla mpeg mpi mysql ncurses netcdf nls 
odbc oggvorbis opengl pam pdflib perl plotutils png postgres ppds python qt 
quicktime readline samba scanner sdl session slang sndfile spell ssl svg szip 
tcltk tcpd tetex threads tidy tiff truetype unicode usb userlocales wmf 
wxwindows xine xml xml2 xmms xpm xrandr xv xvid zlib"

------- Comment #1 From Philippe Trottier (RETIRED) 2005-01-24 01:22:49 0000 -------
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 ...

------- Comment #2 From Vincent Schut 2005-01-24 01:48:26 0000 -------
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?

------- Comment #3 From Danny van Dyk (RETIRED) 2005-01-24 07:49:13 0000 -------
Created an attachment (id=49375) [details]
Patch against hdf-4.2 Makefiles for shared library support

------- Comment #4 From Danny van Dyk (RETIRED) 2005-01-24 07:51:32 0000 -------
Created an attachment (id=49376) [details]
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.

------- Comment #5 From Vincent Schut 2005-01-24 08:06:46 0000 -------
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

------- Comment #6 From Danny van Dyk (RETIRED) 2005-01-24 08:18:57 0000 -------
Would you please try again after upgrading libtool to testing version 1.5.10-r3
?

------- Comment #7 From Stefan Knoblich (RETIRED) 2005-01-24 17:25:46 0000 -------
you need to pass -fPIC (and -DPIC) to g77 (see LLFLAGS in hdf/src/Makefile)

------- Comment #8 From Danny van Dyk (RETIRED) 2005-01-25 06:13:33 0000 -------
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/

------- Comment #9 From Stefan Knoblich (RETIRED) 2005-01-25 06:16:41 0000 -------
Created an attachment (id=49475) [details]
config.log

configure reports:

checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... no

------- Comment #10 From Vincent Schut 2005-01-25 06:29:56 0000 -------
> 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.

------- Comment #11 From Danny van Dyk (RETIRED) 2005-01-25 07:14:57 0000 -------
Created an attachment (id=49478) [details]
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

------- Comment #12 From Vincent Schut 2005-01-25 07:44:32 0000 -------
Works for me. Thanks.

------- Comment #13 From Danny van Dyk (RETIRED) 2005-01-25 14:06:36 0000 -------
InCVS now

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug