Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47517 - app-sci/netcdf needs -fPIC patch
Summary: app-sci/netcdf needs -fPIC patch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-11 09:31 UTC by Bryan Østergaard (RETIRED)
Modified: 2004-04-19 23:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
fPIC patch to /libsrc/Makefile (netcdf-fPIC.patch,209 bytes, patch)
2004-04-11 09:33 UTC, Bryan Østergaard (RETIRED)
Details | Diff
Relocation errors from missing -fPIC. (752-ScientificPython-2.4.5.log,7.88 KB, text/plain)
2004-04-19 12:11 UTC, Bryan Østergaard (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Østergaard (RETIRED) gentoo-dev 2004-04-11 09:31:37 UTC
The libnetcdf library should be compiled with -fPIC on alpha at least. I'll attach a patch for the libsrc/Makefile file. The patch has been tested on alpha and x86.
Comment 1 Bryan Østergaard (RETIRED) gentoo-dev 2004-04-11 09:33:06 UTC
Created attachment 29081 [details, diff]
fPIC patch to /libsrc/Makefile
Comment 2 Patrick Kursawe (RETIRED) gentoo-dev 2004-04-19 06:30:35 UTC
May I ask why you think -fPIC is necessary? As far as I can see it builds only static libraries, and PIC stuff is only relevant for shared libs. Please correct me if I'm wrong there.
What goes wrong if it is compiled without -fPIC?
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2004-04-19 10:39:11 UTC
Actually if static libs aren't compiled PIC, then some issues come up on 64-bit installs (e.g., amd64). See bug #44274 or bug #40646.
Comment 4 Bryan Østergaard (RETIRED) gentoo-dev 2004-04-19 12:11:14 UTC
Created attachment 29641 [details]
Relocation errors from missing -fPIC.

I'm getting gp-relative relocation errors when emerging ScientificPython which
links against netcdf. See attached emerge log.

Another solution would be to inherit the 64-bit.eclass and doing something like
'64-bit && append-flags -fPIC', although I think patching the Makefile is
cleaner.
Comment 5 Patrick Kursawe (RETIRED) gentoo-dev 2004-04-19 23:11:09 UTC
Ok, all docs I saw talked about "shared objects", which I thought is different from a static library, but you sound very convincing :-)

Have put that into portage, thanks.