php curl v8js,v8环境搭建采坑记录

//问题解决

./../build/linux/debian_sid_amd64-sysroot/usr/include/features.h::: fatal error: sys/cdefs.h: No such fileor directory

解决方法:

apt-get --reinstall install libc6 libc6-dev //ubuntu环境

apt-get install gcc-multilib//ubuntu环境//centos环境

find / -name "cdefs.h" //系统中存在该文件/usr/include/sys/cdefs.h

vim/etc/profile

增加几行:

C_INCLUDE_PATH=/usr/include/#gcc找到头文件的路径

export C_INCLUDE_PATH

CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH #g++找到头文件的路径

export CPLUS_INCLUDE_PATH

并执行:

source/etc/profile

6 问题解决:

../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: cannot open crti.o: No such file or directory

配置动态链接库

//问题解决3

../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: cannot open crti.o: No such fileor directoryfind / -name "crti.o" //首先查看系统中是否存在该文件/usr/lib/crti.o和/usr/lib64/crti.o

vim/etc/profile

增加几行:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib #找到动态链接库的路径

export LD_LIBRARY_PATH

LIBRARY_PATH=$LIBRARY_PATH:/usr/lib #找到静态库的路径

export LIBRARY_PATH

并执行:

source/etc/profile

7 问题解决:

Failed to open startup resource './natives_blob.bin'.

Failed to open startup resource './snapshot_blob.bin'.

解决方法:在v8编译时配置下面的编译选项

//问题解决

Failed to open startup resource './natives_blob.bin'.

Failed to open startup resource'./snapshot_blob.bin'.

解决方法:

`make -j20 x64.release GYPFLAGS="-Dv8_use_external_startup_data=0"` should work.

google找到了解决方案:

20190718123458819jk4wmxemfspyiw0_0.png

8 问题解决:

../configure --enable-checking=release --enable-languages=c,c++ --enable-multilib

//设置enable-multilib后

/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory

解决方法:

解决方法:

yum install glibc-devel.i686

9 问题解决:

解决”fatal error: sys/cdefs.h: No such file or directory“的方法:

20190718123458819jk4wmxemfspyiw0_1.png

10 问题解决:

fetch v8 /usr/lib64/python2.7/subprocess.py in _execute_child OSError: [Errno 2] No such file or directory

#问题解决1

#fetch v8/usr/lib64/python2./subprocess.py in _execute_child OSError: [Errno ] No such fileor directory

#解答

You miss the svn binary.

Make sure you follow the instructions here andin particular that you run build/install-build-deps.sh

//INhttps://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md

Get the code

Create a chromium directoryfor the checkout and change to it (you can call this whatever you like and put it wherever you like, as longas the full path has no spaces):

$mkdir ~/chromium && cd ~/chromium

Run the fetch tool from depot_tools to check out the code and its dependencies.

$ fetch--nohooks --no-history chromium

If you don't want the full repo history, you can save a lot of time by adding the --no-history flag to fetch.

Expect the command to takeminutes on even a fast connection, and many hours on slower ones.

If you've already installed the build dependencies on the machine (from another checkout, for example), you can omit the --nohooks flag and fetch will automatically execute gclient runhooks at the end.

When fetch completes, it will have created a hidden .gclientfile and a directory called src inthe working directory. The remaining instructions assume you have switched to the src directory:

$ cd src

Install additional build dependencies

Once you have checked out the code, and assuming you're using Ubuntu, run build/install-build-deps.sh

$ ./build/install-build-deps.shYou may need to adjust the build dependenciesfor other distros. There are some notes at the end of this document, but we make no guarantees for their accuracy.

#问题解决2

参考博客:https://lizijie.github.io/2018/07/03/%E6%BA%90%E7%A0%81%E5%AE%89%E8%A3%85v8%E6%8A%A5%E9%94%99.html#%E5%A6%82%E4%BD%95%E9%85%8D%E7%BD%AEdepot_tools

#fetch v8 curl: (7) Failed to connect to chrome-infra-packages.appspot.com port 443: Connection timed out

官方建议使用depot_tools来下载v8,而不是简单地从github仓库git clone。然而v8和depot_tools都存放再googlesource,在国内访问不到。

可以使用网友下载好的depot_tool&v8

depot_tools:https://pan.baidu.com/s/10lWOMwv0BuKi2R5hlVcI9g

v8 6.9源码:https://pan.baidu.com/s/1wHmOynP6YfLmfm7tMkIUig

#问题解决

#gclient sync

Error: 10>

10> ____ v8/third_party/depot_tools at b3853afe341f2c478f07edba8ac4e60ea833c3b1

10>  You have unstaged changes.

10>  Please commit, stash, or reset.

参考博客:https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/TsMy80N6cZw

解决方法,执行如下:

#gclient sync --with_branch_heads --with_tags -Rv --disable-syntax-validation

11 问题解决:

解决类似 /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found 的问题

解决方法如下:

20190718123458819jk4wmxemfspyiw0_2.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值