xuperchain / xuperchain

A highly flexible blockchain architecture with great transaction performance.

Home Page:https://xuper.baidu.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make编译报错

chaunsin opened this issue · comments

Brief of the issue
clone代码完代码make编译出错

Your environment

os:Linux version 3.10.0-957.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 8 23:39:32 UTC 2018
go:1.15.15
gcc:gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

Repo steps
这边尝试了 release-5.1 5.2 master都出现了以下错误,希望解答

[root@service-cluster-worker-1 xuperchain]# make
rm -rf /root/xuperchain/output
bash /root/xuperchain/auto/build_xvm.sh
start downloading xvm pkg...
Cloning into '/root/xuperchain/.compile_cache/xvm/xvm'...
remote: Enumerating objects: 626, done.
remote: Counting objects: 100% (113/113), done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 626 (delta 61), reused 46 (delta 40), pack-reused 513
Receiving objects: 100% (626/626), 4.32 MiB | 5.12 MiB/s, done.
Resolving deltas: 100% (125/125), done.
Note: checking out '21b97ad8a173529ea5b8e40d2631e5e8af259e3b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

make[1]: Entering directory `/root/xuperchain/.compile_cache/xvm/xvm/compile/wabt'
mkdir -p build/src/tools/
mkdir -p build/./src/
mkdir -p build/./src/
mkdir -p build/./src/
g++ -I. -Isrc -MMD -MP -std=c++11  -c src/tools/wasm2c.cc -o build/src/tools/wasm2c.cc.o
g++ -I. -Isrc -MMD -MP -std=c++11  -c src/apply-names.cc -o build/./src/apply-names.cc.o
g++ -I. -Isrc -MMD -MP -std=c++11  -c src/binary.cc -o build/./src/binary.cc.o
g++ -I. -Isrc -MMD -MP -std=c++11  -c src/binary-reader.cc -o build/./src/binary-reader.cc.o
In file included from /usr/include/errno.h:35:0,
                 from /usr/include/c++/4.8.2/cerrno:41,
                 from /usr/include/c++/4.8.2/ext/string_conversions.h:44,
                 from /usr/include/c++/4.8.2/bits/basic_string.h:2815,
                 from /usr/include/c++/4.8.2/string:52,
                 from /usr/include/c++/4.8.2/random:41,
                 from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8.2/algorithm:62,
                 from ./src/common.h:20,
                 from ./src/apply-names.h:20,
                 from src/apply-names.cc:17:
/usr/include/bits/errno.h:24:26: fatal error: linux/errno.h: No such file or directory
 # include <linux/errno.h>
                          ^
compilation terminated.
In file included from /usr/include/errno.h:35:0,
                 from /usr/include/c++/4.8.2/cerrno:41,
                 from /usr/include/c++/4.8.2/ext/string_conversions.h:44,
                 from /usr/include/c++/4.8.2/bits/basic_string.h:2815,
                 from /usr/include/c++/4.8.2/string:52,
                 from /usr/include/c++/4.8.2/random:41,
                 from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8.2/algorithm:62,
                 from ./src/common.h:20,
                 from ./src/apply-names.h:20,
                 from src/tools/wasm2c.cc:22:
/usr/include/bits/errno.h:24:26: fatal error: linux/errno.h: No such file or directory
 # include <linux/errno.h>
                          ^
compilation terminated.
In file included from /usr/include/errno.h:35:0,
                 from /usr/include/c++/4.8.2/cerrno:41,
                 from /usr/include/c++/4.8.2/ext/string_conversions.h:44,
                 from /usr/include/c++/4.8.2/bits/basic_string.h:2815,
                 from /usr/include/c++/4.8.2/string:52,
                 from /usr/include/c++/4.8.2/random:41,
                 from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8.2/algorithm:62,
                 from ./src/common.h:20,
                 from ./src/binary.h:20,
                 from ./src/binary-reader.h:23,
                 from src/binary-reader.cc:17:
/usr/include/bits/errno.h:24:26: fatal error: linux/errno.h: No such file or directory
 # include <linux/errno.h>
                          ^
compilation terminated.
In file included from /usr/include/errno.h:35:0,
                 from /usr/include/c++/4.8.2/cerrno:41,
                 from /usr/include/c++/4.8.2/ext/string_conversions.h:44,
                 from /usr/include/c++/4.8.2/bits/basic_string.h:2815,
                 from /usr/include/c++/4.8.2/string:52,
                 from /usr/include/c++/4.8.2/random:41,
                 from /usr/include/c++/4.8.2/bits/stl_algo.h:65,
                 from /usr/include/c++/4.8.2/algorithm:62,
                 from ./src/common.h:20,
                 from ./src/binary.h:20,
                 from src/binary.cc:17:
/usr/include/bits/errno.h:24:26: fatal error: linux/errno.h: No such file or directory
 # include <linux/errno.h>
                          ^
compilation terminated.
make[1]: *** [build/./src/apply-names.cc.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [build/src/tools/wasm2c.cc.o] Error 1
make[1]: *** [build/./src/binary-reader.cc.o] Error 1
make[1]: *** [build/./src/binary.cc.o] Error 1
make[1]: Leaving directory `/root/xuperchain/.compile_cache/xvm/xvm/compile/wabt'
make: *** [xvm] Error 2

Expected behaviours
Describe what you expected to happen.

What actually happened
Describe what actually happened. Include the full traceback if there was an exception.

Additional information
If possible, include a minimal, complete, and verifiable example to help us identify the issue. This also helps check that the issue is not with your own code.

/usr/include/bits/errno.h:24:26: fatal error: linux/errno.h: No such file or directory
include <linux/errno.h>

一般这个问题是没有安装kernel-headers,可以自行搜索下自己系统对应的解决方案~

感谢已解决