asm/socket.h:没有这样的文件或目录交叉编译Dart for Raspberry pi

Fed*_*dy2 6 cross-compiling dart raspberry-pi raspbian

我正在使用这里的指令交叉编译Dart运行时.

我已按指定安装了所有依赖项.我还用必要的工具链克隆了git存储库.

我正在使用此命令运行运行时编译:

./tools/build.py -m release -a arm --toolchain=../tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf runtime
Run Code Online (Sandbox Code Playgroud)

编译开始没有问题然后它停止与此错误:

  LINK(target) out/ReleaseXARM/libdart_dependency_helper.target
  CXX(host) out/ReleaseXARM/obj.host/libdart_lib_withcore/runtime/vm/bootstrap.o
In file included from /usr/include/sys/socket.h:38:0,
                 from /usr/include/netinet/in.h:23,
                 from /usr/include/arpa/inet.h:22,
                 from runtime/platform/globals.h:56,
                 from runtime/platform/assert.h:16,
                 from runtime/vm/allocation.h:8,
                 from runtime/vm/bootstrap.h:9,
                 from runtime/vm/bootstrap.cc:5:
/usr/include/bits/socket.h:345:24: fatal error: asm/socket.h: No such file or directory
 #include <asm/socket.h>
                        ^
compilation terminated.
  CXX(host) out/ReleaseXARM/obj.host/libdart_lib_withcore/gen/async_gen.o
In file included from /usr/include/sys/socket.h:38:0,
                 from /usr/include/netinet/in.h:23,
                 from /usr/include/arpa/inet.h:22,
                 from runtime/platform/globals.h:56,
                 from runtime/platform/assert.h:16,
                 from runtime/vm/allocation.h:8,
                 from runtime/vm/bootstrap.h:9,
                 from out/ReleaseXARM/obj/gen/async_gen.cc:5:
/usr/include/bits/socket.h:345:24: fatal error: asm/socket.h: No such file or directory
 #include <asm/socket.h>
                        ^
compilation terminated.
runtime/libdart_lib_withcore.host.mk:978: recipe for target 'out/ReleaseXARM/obj.host/libdart_lib_withcore/runtime/vm/bootstrap.o' failed
make: *** [out/ReleaseXARM/obj.host/libdart_lib_withcore/runtime/vm/bootstrap.o] Error 1
make: *** Waiting for unfinished jobs....
runtime/libdart_lib_withcore.host.mk:986: recipe for target 'out/ReleaseXARM/obj.host/libdart_lib_withcore/gen/async_gen.o' failed
make: *** [out/ReleaseXARM/obj.host/libdart_lib_withcore/gen/async_gen.o] Error 1
BUILD FAILED
Run Code Online (Sandbox Code Playgroud)

我错过了任何依赖或包裹吗?

Sam*_*der 7

我遇到了同样的问题.在我的ubuntu 14.04系统/ usr/include/asm上不存在.它被称为asm-generic.我sym链接它,构建能够继续.

cd /usr/include
sudo ln -s asm-generic/ asm
Run Code Online (Sandbox Code Playgroud)

之后构建能够继续.


小智 6

这可能是因为您尝试构建应用程序时未正确设置某些包含路径,例如在 64 位平台上使用 32 位 gcc。解决:

sudo apt-get install gcc-multilib