Hi, trying to build a fortran extension linked to lapack (f77), I faced a problem that I reduced to the following example.
------------ testfile.f90 ------------ subroutine testfunc integer,parameter :: n=2 integer :: iseed(4) real(kind=8) :: x(n) iseed = (/0,1,3,4/) call DLARUV(iseed, n, x) end subroutine testfunc -------------------------------------- Then : f2py -c -m testmod -llapack -lblas -L/home/raynaud/soft/lapack_gfortran/lib testfile.f90 It rises the following error (using gfortran) : /usr/bin/ld: /home/raynaud/soft/lapack_gfortran/lib/liblapack.a(dlaruv.o): relocation R_X86_64_32S against `.data' can not be used when making a shared object; recompile with -fPIC /home/raynaud/soft/lapack_gfortran/lib/liblapack.a: could not read symbols: Bad value BLAS and LAPACK where compilated with gfortran and options '-fPIC -O3'. I tried to use the DATA statement directly in a subroutine that I converted to a python module, and it worked. Any idea ? Thanks. -- Stephane Raynaud _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion