cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/Utils.o build/temp.linux-x86_64-2.7/src/Exception.o build/temp.linux-x86_64-2.7/src/Context.o build/temp.linux-x86_64-2.7/src/Engine.o build/temp.linux-x86_64-2.7/src/Wrapper.o build/temp.linux-x86_64-2.7/src/Debug.o build/temp.linux-x86_64-2.7/src/Locker.o build/temp.linux-x86_64-2.7/src/AST.o build/temp.linux-x86_64-2.7/src/PrettyPrinter.o build/temp.linux-x86_64-2.7/src/PyV8.o -L/usr/local/lib -L/opt/pyv8me/build/v8_r19632//out/x64.release/obj.target/tools/gyp/ -lboost_python -lboost_thread -lboost_system -lrt -lv8_base.x64 -lv8_snapshot -o build/lib.linux-x86_64-2.7/_PyV8.so -fPIC -lrt
/usr/bin/ld: cannot find -lv8_base.x64
/usr/bin/ld: cannot find -lv8_snapshot
collect2: error: ld returned 1 exit status
error: command 'c++' failed with exit status 1
答案 0 :(得分:1)
如果同一问题在命令python setup.py build
上失败,但我可以通过运行在新安装的Ubuntu 16上安装pyv8:
#Utilities
sudo apt-get install git
sudo apt-get install python-setuptools
#Boost
sudo apt-get install libboost-all-dev
#Pyv8
git clone https://github.com/buffer/pyv8.git
cd pyv8
sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev
sudo easy_install greenlet
sudo easy_install gevent
python setup.py build
sudo python setup.py install