[f2py] Shared Object Failure

Kevin Manross <[email protected]> Thu, 31 Jan 2013 10:10:26 -0700
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============8769115811192249867==
Content-Type: multipart/alternative;
 boundary="------------000700000406080005000906"

This is a multi-part message in MIME format.
--------------000700000406080005000906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit


Greetings,

I am trying to wrap a FORTRAN library and am running into the following 
error:


manross@yslogin3[BUFRTesting/BUFRLIB2PY] % set list1= ( *.f )
manross@yslogin3[BUFRTesting/BUFRLIB2PY] % f2py -c $list1 -m pybufrlib 
--f77flags="-fPIC" --f90flags="-fPIC" 
-L/glade/u/home/manross/BUFRTesting/BUFRLIB2PY -lbufr 
--fcompiler=intelem  --compiler=intelem

...
...
...


ld: 
/glade/apps/opt/python/2.7.3/gnu/4.7.1/lib/libpython2.7.a(abstract.o): 
relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be 
used when making a shared object; recompile with -fPIC
/glade/apps/opt/python/2.7.3/gnu/4.7.1/lib/libpython2.7.a: could not 
read symbols: Bad value
ld: 
/glade/apps/opt/python/2.7.3/gnu/4.7.1/lib/libpython2.7.a(abstract.o): 
relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be 
used when making a shared object; recompile with -fPIC
/glade/apps/opt/python/2.7.3/gnu/4.7.1/lib/libpython2.7.a: could not 
read symbols: Bad value

I have compiled the bufr library with -fPIC, included -fPIC as f77 and 
f90 flags in my f2py line.  I (believe) I have even verified that the 
python and numpy installs used -fPIC

BUILD_DIR/logs/DAVIDE.install.log:C compiler: icc -m64 -fPIC
BUILD_DIR/numpy-1.6.2/DAVIDE.install.log:C compiler: icc -m64 -fPIC

I am at a loss as to how to work through this error.  I am on a 64-bit 
machine, FWIW.

If anyone could shed some light on this, I would be much obliged!

-kevin.



-- 
Kevin Manross
NCAR/CISL/Data Support Section
Phone: (303)-497-1218
Email:[email protected] <mailto:[email protected]>
Web:http://rda.ucar.edu

--------------000700000406080005000906
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    Greetings,<br>
    <br>
    I am trying to wrap a FORTRAN library and am running into the
    following error:<br>
    <br>
    <br>
    manross@yslogin3[BUFRTesting/BUFRLIB2PY] % set list1= ( *.f )<br>
    manross@yslogin3[BUFRTesting/BUFRLIB2PY] % f2py -c $list1 -m
    pybufrlib --f77flags="-fPIC" --f90flags="-fPIC"
    -L/glade/u/home/manross/BUFRTesting/BUFRLIB2PY -lbufr
    --fcompiler=intelem&nbsp; --compiler=intelem<br>
    <br>
    ...<br>
    ...<br>
    ...<br>
    <br>
    <br>
    ld:
    /glade/apps/opt/python/2.7.3/gnu/4.7.1/lib/libpython2.7.a(abstract.o):
    relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not
    be used when making a shared object; recompile with -fPIC<br>
    /glade/apps/opt/python/2.7.3/gnu/4.7.1/lib/libpython2.7.a: could not
    read symbols: Bad value<br>
    ld:
    /glade/apps/opt/python/2.7.3/gnu/4.7.1/lib/libpython2.7.a(abstract.o):
    relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not
    be used when making a shared object; recompile with -fPIC<br>
    /glade/apps/opt/python/2.7.3/gnu/4.7.1/lib/libpython2.7.a: could not
    read symbols: Bad value<br>
    <br>
    I have compiled the bufr library with -fPIC, included -fPIC as f77
    and f90 flags in my f2py line.&nbsp; I (believe) I have even verified
    that the python and numpy installs used -fPIC<br>
    <br>
    BUILD_DIR/logs/DAVIDE.install.log:C compiler: icc -m64 -fPIC<br>
    BUILD_DIR/numpy-1.6.2/DAVIDE.install.log:C compiler: icc -m64 -fPIC<br>
    <br>
    I am at a loss as to how to work through this error.&nbsp; I am on a
    64-bit machine, FWIW.<br>
    <br>
    If anyone could shed some light on this, I would be much obliged!<br>
    <br>
    -kevin.<br>
    <br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      Kevin Manross<br>
      NCAR/CISL/Data Support Section<br>
      Phone: (303)-497-1218<br>
      Email:<a href="mailto:[email protected]">[email protected]</a><br>
      Web:<a href="http://rda.ucar.edu">http://rda.ucar.edu</a><br>
    </div>
  </body>
</html>

--------------000700000406080005000906--


--===============8769115811192249867==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
http://cens.ioc.ee/mailman/listinfo/f2py-users

--===============8769115811192249867==--