Asm / socket.h: No such cross-compilation of files or directories Dart for Raspberry pi

I am cross-compiling the Dart runtime using the instruction here .

I installed all dependencies as stated. I also cloned the git repository with the required toolchain.

I run compilation at runtime with this command:

./tools/build.py -m release -a arm --toolchain=../tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf runtime

      

Compilation starts without issue, after which it stops with this error:

  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

      

Is there any dependency or package missing?

+3


source to share


4 answers


I faced the same problem. On my ubuntu 14.04 system / usr / include / asm was missing. Instead, it was called asm-generic. I linked this and the build was able to proceed.

cd /usr/include
sudo ln -s asm-generic/ asm

      



After that, the assembly was continued.

+4


source


This is probably because you are trying to build an application without the correct set of some of the paths included, for example using 32-bit gcc on a 64-bit platform. To solve:



sudo apt-get install gcc-multilib

+2


source


Are the Linux kernel headers set?

0


source


I'm not sure why this is happening, but sometimes it /usr/include/asm

gets deleted. My teammates who looked at their Ubuntu x86-64 workstations found the asm symbolic link:

0 lrwxrwxrwx 1 root root 20 May 22  2013 /usr/include/asm -> x86_64-linux-gnu/asm

      

And the command to recreate it:

$ cd /usr/include
$ sudo ln -s x86_64-linux-gnu/asm asm

      

Files in are /usr/include/asm-generic

sometimes, but not always, equivalent to files in a specific x86-64 directory; so it's hard to recommend symbolic binding to it as a workaround.

0


source







All Articles