Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译pse.so报错 #80

Open
andy7166 opened this issue May 15, 2020 · 5 comments
Open

编译pse.so报错 #80

andy7166 opened this issue May 15, 2020 · 5 comments

Comments

@andy7166
Copy link

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
Copy link
Author

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
Copy link

arufus commented May 18, 2020

老哥,解决了吗?

@arufus
Copy link

arufus commented May 18, 2020

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

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

// detail/common.h

// #include <Python.h>
// #include <frameobject.h>
// #include <pythread.h>

#include <python3.5m/Python.h>
#include <python3.5m/frameobject.h>
#include <python3.5m/pythread.h>

@andy7166
Copy link
Author

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

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

// detail/common.h

// #include <Python.h>
// #include <frameobject.h>
// #include <pythread.h>

#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
Copy link

请问怎么编译。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants