首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >asm/socket.h: Raspberry pi没有这样的文件或目录交叉编译Dart

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

Stack Overflow用户
提问于 2014-11-15 21:01:18
回答 3查看 7.9K关注 0票数 9

我正在使用指令here交叉编译Dart运行时。

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

我使用以下命令运行运行时编译:

代码语言:javascript
复制
./tools/build.py -m release -a arm --toolchain=../tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf runtime

编译开始时没有任何问题,然后停止,并显示以下错误:

代码语言:javascript
复制
  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

我是否遗漏了任何依赖项或包?

EN

回答 3

Stack Overflow用户

发布于 2015-01-25 09:58:34

我遇到了同样的问题。在我的ubuntu 14.04系统上,/usr/include/asm不存在。它被称为asm-generic。我对它进行了sym链接,这样构建就可以继续了。

代码语言:javascript
复制
cd /usr/include
sudo ln -s asm-generic/ asm

在那之后,构建能够继续进行。

票数 9
EN

Stack Overflow用户

发布于 2017-01-03 19:15:57

这可能是因为您试图在没有正确设置某些包含路径的情况下构建应用程序,例如,在64位平台上使用32位的gcc。要解决以下问题:

sudo apt-get install gcc-multilib

票数 4
EN

Stack Overflow用户

发布于 2015-09-06 03:25:02

我不确定为什么会发生这种情况,但有时/usr/include/asm会被删除。我的队友查看了他们的Ubuntu x86-64工作站,发现asm符号链接是:

代码语言:javascript
复制
0 lrwxrwxrwx 1 root root 20 May 22  2013 /usr/include/asm -> x86_64-linux-gnu/asm

重新创建它的命令是:

代码语言:javascript
复制
$ cd /usr/include
$ sudo ln -s x86_64-linux-gnu/asm asm

/usr/include/asm-generic中的文件有时(但不总是)等同于x86-64特定目录中的文件;因此,很难建议使用符号链接作为解决方法。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26946108

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档