Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#10 Compile needs -fPIC on AMD64

open
nobody
None
5
2012-12-10
2006-04-09
Tim Cera
No

Pyfort seems to install correctly, but when trying the
first test...

% pyfort -i testpyf
Building project
/home/tcera/Pyfort-8.5.3.new/test/testpyf.pfp
minusg =
project_name = testpyf
command = install
fortran_compiler_id = g77
outdir =
Reading /home/tcera/Pyfort-8.5.3.new/test/testpyf.pfp
Building Pyfort module testpyf
Creating a simple Makefile at
/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf/Makefile
make
g77 -c /home/tcera/Pyfort-8.5.3.new/test/testme.f
ld -r -o libpyfort_testpyf.a *.o
Generating documentation file
Generating Pyfort interface in
/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf
Your extension has been generated in
/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf.
Executing setup install using these arguments:
version = '8.5.3'
External module specified by:
libraries = ['pyfort_testpyf', 'g2c']
sources =
['/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf/testpyfmodule.c']
library_dirs =
['/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf']
name = 'testpyf'
name = 'testpyf_extension'
extra_path = 'testpyf_dir'
---------------------------------
running install
running build
running build_ext
building 'testpyf' extension
creating build/temp.linux-x86_64-2.4
creating build/temp.linux-x86_64-2.4/home
creating build/temp.linux-x86_64-2.4/home/tcera
creating
build/temp.linux-x86_64-2.4/home/tcera/Pyfort-8.5.3.new
creating
build/temp.linux-x86_64-2.4/home/tcera/Pyfort-8.5.3.new/test
creating
build/temp.linux-x86_64-2.4/home/tcera/Pyfort-8.5.3.new/test/build
creating
build/temp.linux-x86_64-2.4/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf
x86_64-pc-linux-gnu-gcc -pthread -fno-strict-aliasing
-DNDEBUG -fPIC -I/usr/include/python2.4 -c
/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf/testpyfmodule.c
-o
build/temp.linux-x86_64-2.4/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf/testpyfmodule.o
creating build/lib.linux-x86_64-2.4
x86_64-pc-linux-gnu-gcc -pthread -shared
build/temp.linux-x86_64-2.4/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf/testpyfmodule.o
-L/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf
-lpyfort_testpyf -lg2c -o
build/lib.linux-x86_64-2.4/testpyf.so
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/../../../../x86_64-pc-linux-gnu/bin/ld:
/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf/libpyfort_testpyf.a:
relocation R_X86_64_32 against `a local symbol' can not
be used when making a shared object; recompile with -fPIC
/home/tcera/Pyfort-8.5.3.new/test/build/pyfort_testpyf/libpyfort_testpyf.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'x86_64-pc-linux-gnu-gcc' failed with
exit status 1
Exit 1

Discussion