-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compilation of python-bindings on ubuntu #18
Comments
I think if you add |
Yep, this works. Although on Mac everything compiles without problems, so this is definitely platform specific. PS my interest in this, is because I use freesasa as a submodule in my project https://github.com/molsim/HYDROID and I try to provide easy to use instructions for compilation. |
I had the same problem on a Debian system earlier, and the solution is mentioned in the Readme-file already. But maybe the configure script could detect the operating system and add this flag automatically if necessary. Although that might cause problems with other compilers that don't recognize this flag. I will think about it :) For your repo you could try always using |
Now I see the readme:) thank you. |
On a fresh install of Ubuntu 16.04.2 LTS
with
./configure --enable-python-bindings --disable-xml --disable-json
make
I get the error below - not sure, but configure/autoconf might need some tweeks.
make[2]: Entering directory '/media/freesasa-2.0/bindings'
running build_ext
building 'freesasa' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I../../src -I/usr/include/python2.7 -c freesasa.c -o build/temp.linux-x86_64-2.7/freesasa.o -w
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/freesasa.o ../../src/libfreesasa.a -o /media/ubuntu/data/junk/freesasa-2.0/bindings/python/freesasa.so
/usr/bin/ld: ../../src/libfreesasa.a(classifier.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
../../src/libfreesasa.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:804: recipe for target 'pylib' failed
make[2]: *** [pylib] Error 1
make[2]: Leaving directory '/media/freesasa-2.0/bindings'
Makefile:380: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/media/freesasa-2.0'
Makefile:319: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: