【问题标题】:build pyv8 got /usr/bin/ld: cannot find -lv8_base.x64 error构建 pyv8 得到 /usr/bin/ld: 找不到 -lv8_base.x64 错误
【发布时间】:2015-11-19 06:08:39
【问题描述】:

当我在 ubuntu 中构建 pyv8 时出现此错误,下载了所有依赖项似乎仍然遗漏了什么?

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

【问题讨论】:

    标签: ubuntu v8 pyv8


    【解决方案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
    

    【讨论】:

      猜你喜欢
      • 2021-05-07
      • 1970-01-01
      • 1970-01-01
      • 2013-01-03
      • 2014-07-09
      • 1970-01-01
      • 1970-01-01
      • 2011-07-16
      • 2014-08-17
      相关资源
      最近更新 更多