liuheng92 / tensorflow_PSENet

This is a tensorflow re-implementation of PSENet: Shape Robust Text Detection with Progressive Scale Expansion Network.My blog:
https://blog.csdn.net/liuxiaoheng1992/article/details/87646951
MIT License
490 stars 162 forks source link

编译pse.so报错 #80

Open andy7166 opened 4 years ago

andy7166 commented 4 years ago

g++ -o pse.so -I include -std=c++11 -O3 -I/home/light/anaconda3/include/python3.7m -I/home/light/anaconda3/include/python3.7m -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -ffunction-sections -pipe -fdebug-prefix-map=/tmp/build/80754af9/python_1553721932202/work=/usr/local/src/conda/python-3.7.3 -fdebug-prefix-map=/home/light/anaconda3=/usr/local/src/conda-prefix -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -flto -DNDEBUG -fwrapv -O3 -Wall -L/home/light/anaconda3/lib/python3.7/config-3.7m-x86_64-linux-gnu -L/home/light/anaconda3/lib -lpython3.7m -lcrypt -lpthread -ldl -lutil -lrt -lm -Xlinker -export-dynamic pse.cpp --shared -fPIC g++: error: unrecognized command line option ‘-fstack-protector-strong’ g++: error: unrecognized command line option ‘-fno-plt’ Makefile:10: recipe for target 'pse.so' failed make: *** [pse.so] Error 1

andy7166 commented 4 years ago

2

g++ -o pse.so -I include -std=c++11 -O3 -I/home/light/anaconda3/include/python3.7m -I/home/light/anaconda3/include/python3.7m -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -ffunction-sections -pipe -fdebug-prefix-map=/tmp/build/80754af9/python_1553721932202/work=/usr/local/src/conda/python-3.7.3 -fdebug-prefix-map=/home/light/anaconda3=/usr/local/src/conda-prefix -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -flto -DNDEBUG -fwrapv -O3 -Wall -L/home/light/anaconda3/lib/python3.7/config-3.7m-x86_64-linux-gnu -L/home/light/anaconda3/lib -lpython3.7m -lcrypt -lpthread -ldl -lutil -lrt -lm -Xlinker -export-dynamic pse.cpp --shared -fPIC g++: error: unrecognized command line option ‘-fstack-protector-strong’ g++: error: unrecognized command line option ‘-fno-plt’ Makefile:10: recipe for target 'pse.so' failed make: *** [pse.so] Error 1

2.7可以正常编译

arufus commented 4 years ago

老哥,解决了吗?

arufus commented 4 years ago

已经解决了老哥,以下是可能用得上的参考:

https://github.com/argman/EAST/issues/233 https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

// detail/common.h

// #include // #include // #include

include <python3.5m/Python.h>

include <python3.5m/frameobject.h>

include <python3.5m/pythread.h>

andy7166 commented 4 years ago

已经解决了老哥,以下是可能用得上的参考:

argman/EAST#233 https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

// detail/common.h

// #include // #include // #include

include <python3.5m/Python.h>

include <python3.5m/frameobject.h>

include <python3.5m/pythread.h>

3.5和3.6应该是没问题的,我用2.7直接转换的,然后用的3.6可以,3.7不行

lx-rookie commented 4 years ago

请问怎么编译。。