lzhang10/maxent — Issue #2: Python build failure
Author: jonaslejon
Created: 2012-01-10 12:51:30+00:00
State: open

This is on a x64 Ubuntu/Linux system:

$ python setup.py build
running build
running build_py
running build_ext
building 'maxent._cmaxent' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I../lib -I../src -I/usr/local/include -I/usr/include/python2.7 -c maxent_wrap.cxx -o build/temp.linux-x86_64-2.7/maxent_wrap.o -DNDEBUG -DPYTHON_MODULE -DBOOST_DISABLE_THREADS
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
In file included from /usr/include/c++/4.6/ext/hash_map:61:0,
from ../src/hash_map.hpp:53,
from ../src/itemmap.hpp:38,
from ../src/maxentmodel.hpp:41,
from maxent_wrap.cxx:1363:
/usr/include/c++/4.6/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
maxent_wrap.cxx:231:1: warning: ‘swig_type_info* SWIG_TypeDynamicCast(swig_type_info*, void**)’ defined but not used [-Wunused-function]
maxent_wrap.cxx:419:1: warning: ‘const char* SWIG_UnpackDataName(const char*, void*, size_t, const char*)’ defined but not used [-Wunused-function]
maxent_wrap.cxx:499:1: warning: ‘void SWIG_PropagateClientData(swig_type_info*)’ defined but not used [-Wunused-function]
maxent_wrap.cxx:1198:1: warning: ‘void* SWIG_Python_MustGetPtr(PyObject*, swig_type_info*, int, int)’ defined but not used [-Wunused-function]
maxent_wrap.cxx:1212:1: warning: ‘int SWIG_Python_ConvertPacked(PyObject*, void*, size_t, swig_type_info*, int)’ defined but not used [-Wunused-function]
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.7/maxent_wrap.o -L../src/opt -L../src -L/usr/local/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1 -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../.. -lmaxent -lz -lgfortran -lm -lquadmath -o build/lib.linux-x86_64-2.7/maxent/_cmaxent.so
/usr/bin/ld: ../src/opt/libmaxent.a(display.o): relocation R_X86_64_32 against `std::cout' can not be used when making a shared object; recompile with -fPIC
../src/opt/libmaxent.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1