GXYM/DRRG

报错 undefined symbol: _Py_ZeroStruct

HanazawaKanana opened this issue · 5 comments

编译lanms下的Makefile文件,产生如下报错:
g++ -o adaptor.so -I include -std=c++11 -O3 -I/home/zhangmingzhou1/anaconda3/envs/pytorch/include/python3.7m -I/home/zhangmingzhou1/anaconda3/envs/pytorch/include/python3.7m -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -flto -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -DNDEBUG -fwrapv -O3 -Wall -L/home/zhangmingzhou1/anaconda3/envs/pytorch/lib/python3.7/config-3.7m-x86_64-linux-gnu -L/home/zhangmingzhou1/anaconda3/envs/pytorch/lib -lpython3.7m -lpthread -ldl -lutil -lrt -lm -Xlinker -export-dynamic adaptor.cpp include/clipper/clipper.cpp --shared -fPIC
g++: error: unrecognized command line option ‘-fno-plt’
Makefile:10: recipe for target 'adaptor.so' failed
make: *** [adaptor.so] Error 1
查阅网上的资料后,把makefile文件中的$(shell python3-config --cflags)中的python3改为python,执行训练代码又报如下错误:
adaptor.so: undefined symbol: _Py_ZeroStruct

python环境问题吧,修改CXXFLAGS = -I include -std=c++11 -O3 -I/XXXXyour python path/conda/include/python3.7m

python环境问题吧,修改CXXFLAGS = -I include -std=c++11 -O3 -I/XXXXyour python path/conda/include/python3.7m

好了,谢谢

python环境问题吧,修改CXXFLAGS = -I include -std=c++11 -O3 -I/XXXXyour python path/conda/include/python3.7m

又遇到个新问题,代码卡住不动。。

python环境问题吧,修改CXXFLAGS = -I include -std=c++11 -O3 -I/XXXXyour python path/conda/include/python3.7m

解决了

请问在哪里修改CXXFLAGS额