Alright, I've been trying to compile the new version of OB without the dynamically linked libraries (which I already can compile without issue). Unfortunately I keep running into this issue when I am building the SWIG wrappers:
[ 99%] Built target test_runner Scanning dependencies of target bindings_java [ 99%] Building CXX object scripts/CMakeFiles/bindings_java.dir/java/openbabel-java.cpp.o [ 99%] Linking CXX shared module ../lib/libopenbabel_java.so /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libz.a(crc32.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libz.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [lib/libopenbabel_java.so] Error 1 make[1]: *** [scripts/CMakeFiles/bindings_java.dir/all] Error 2 make: *** [all] Error 2 I'm using cmake 2.8 (although I have tried 3.0.11 as well) and I am on CentOS 7. All I did was the following: cmake -DBUILD_SHARED=OFF -DJAVA_AWT_LIBRARY=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/amd64/libawt.so -DJAVA_JVM_LIBRARY=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/amd64/server/libjvm.so -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DPYTHON_BINDINGS=ON -DJAVA_BINDINGS=ON -DRUN_SWIG=ON .. Has anyone seen this error before? All I could find was a reference to adding -lm or -lz (which were both already happening) on google. And, before anyone asks, yes I am trying to throw the -fPIC flag. Thanks, Matt -- Sent from: http://forums.openbabel.org/General-discussion-f3090658.html ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss