undefined symbol:_ZTVN10__cxxabiv121__vmi_class_type_infoE error

Viewed 1762

When I run python eval.py, it comes to the error::

ImportError: /home/aa/EAST/lanms/adaptor.so: undefined symbol:_ZTVN10__cxxabiv121__vmi_class_type_infoE

I uses $make clean && make but it is still give me the same error and with some warring during execute the make

This is the makefile::

CXXFLAGS = -I include  -std=c++11 -O3 $(shell python3-config --cflags)
LDFLAGS = $(shell python3-config --ldflags)


DEPS = lanms.h $(shell find include -xtype f)
CXX_SOURCES = adaptor.cpp include/clipper/clipper.cpp

LIB_SO = adaptor.so

$(LIB_SO): $(CXX_SOURCES) $(DEPS)
    $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(CXX_SOURCES) --shared -fPIC




clean:
    rm -rf $(LIB_SO)

when I use make command it show these warning::

/usr/bin/gcc-7 -o adaptor.so -I include  -std=c++11 -O3 -I/home/ashwaq/anaconda3/include/python3.5m -I/home/aa/anaconda3/include/python3.5m  -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -flto -fuse-linker-plugin -ffat-lto-objects -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -L/home/ashwaq/anaconda3/lib/python3.5/config-3.5m -L/home/ashwaq/anaconda3/lib -lpython3.5m -lpthread -ldl  -lutil -lrt -lm  -Xlinker -export-dynamic adaptor.cpp include/clipper/clipper.cpp --shared -fPIC
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from include/pybind11/pytypes.h:12:0,
                 from include/pybind11/cast.h:13,
                 from include/pybind11/attr.h:13,
                 from include/pybind11/pybind11.h:43,
                 from adaptor.cpp:1:
adaptor.cpp: In function ‘PyObject* PyInit_adaptor()’:
include/pybind11/common.h:232:34: warning: ‘PyObject* pybind11_init()’ is deprecated: PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations]
             return pybind11_init();                                            \
                                  ^
adaptor.cpp:53:1: note: in expansion of macro ‘PYBIND11_PLUGIN’
 PYBIND11_PLUGIN(adaptor) {
 ^~~~~~~~~~~~~~~
include/pybind11/common.h:217:22: note: declared here
     static PyObject *pybind11_init();                                          \
                      ^
adaptor.cpp:53:1: note: in expansion of macro ‘PYBIND11_PLUGIN’
 PYBIND11_PLUGIN(adaptor) {
 ^~~~~~~~~~~~~~~
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
include/clipper/clipper.cpp: In member function ‘void ClipperLib::Clipper::FixupFirstLefts3(ClipperLib::OutRec*, ClipperLib::OutRec*)’:
include/clipper/clipper.cpp:3665:13: warning: unused variable ‘firstLeft’ [-Wunused-variable]
     OutRec* firstLeft = ParseFirstLeft(outRec->FirstLeft);

I use::
ubuntu-17.4
tensorflow-1.4.0
python-3.5
gcc-7.0.1
cuda-8.0

0 Answers
Related