yt-project / yt

Main yt repository
http://yt-project.org
Other
468 stars 280 forks source link

install_script builds lapack without -fPIC #495

Closed yt-fido closed 7 years ago

yt-fido commented 11 years ago

Originally reported by: Kacper Kowalik (Bitbucket: xarthisius, GitHub: xarthisius)


As reported on #yt by clovell numpy fails to link with lapack installed using install_script.sh with following error:

#!bash

Installing numpy-1.6.1 (arguments: 'numpy-1.6.1 --fcompiler=gnu95')
********************************************
        FAILURE REPORT:
********************************************

gcc: numpy/linalg/lapack_litemodule.c
gcc: numpy/linalg/python_xerbla.c
/usr/bin/gfortran -Wall -Wall -shared build/temp.linux-x86_64-2.7/numpy/linalg/lapack_litemodule.o build/temp.linux-x86_64-2.7/numpy/linalg/python_xerbla.o -L/home/chris/Documents/enzo/yt/src/lapack-3.4.2 -L/home/chris/Documents/enzo/yt/src/BLAS -Lbuild/temp.linux-x86_64-2.7 -llapack -lfblas -lgfortran -o build/lib.linux-x86_64-2.7/numpy/linalg/lapack_lite.so
/usr/bin/ld: /home/chris/Documents/enzo/yt/src/lapack-3.4.2/liblapack.a(dgeev.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/home/chris/Documents/enzo/yt/src/lapack-3.4.2/liblapack.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

yt-fido commented 11 years ago

Original comment by Nathan Goldbaum (Bitbucket: ngoldbaum, GitHub: ngoldbaum):


Merged in xarthisius/yt (pull request #414)

Ensure that lapack is built with -fPIC. Fixes #495

yt-fido commented 11 years ago

Original comment by Nathan Goldbaum (Bitbucket: ngoldbaum, GitHub: ngoldbaum):


Ensure that lapack is built with -fPIC. Fixes #495

yt-fido commented 11 years ago

Original comment by Matt Turk (Bitbucket: MatthewTurk, GitHub: MatthewTurk):


The majority of systems will require -fPIC, right? As much as I really, really don't want to walk down the build-a-full-package-management-system road, this does seem like it could be a relatively straightforward fix. But maybe that will break other machines, like OSX?