1
votes

I'm trying to cross-compile nano-x for arm architecture.

I edited in config file next lines:

ARCH = LINUX-ARM
ARMTOOLSPREFIX = arm-none-linux-gnueabi-

After I run make and I have next error:

Compiling engine/image_jpeg.c ...
cc1: warning: include location "/usr/include/freetype2" is unsafe for cross-compilation
/home/user/oe/nanox/microwindows-0.92/src/engine/image_jpeg.c:49: fatal error: jpeglib.h: No such file or directory
compilation terminated.
make[1]: *** [/home/user/oe/nanox/microwindows-0.92/src/obj/engine/image_jpeg.o] Error 1
make: *** [subdir-/home/user/oe/nanox/microwindows-0.92/src/mwin] Error 2

Also after each compiling I have a warnings:

cc1: warning: include location "/usr/include/some file" is unsafe for cross-compilation

I tried to compile for my architecture, everything went well. Demo is running.

There is next problem:

In function 'MwSelect':
/home/user/oe/nanox/microwindows-0.92/src/mwin/winmain.c:356: error: impossible constraint in 'asm'
/home/user/oe/nanox/microwindows-0.92/src/mwin/winmain.c:357: error: impossible constraint in 'asm'
/home/user/oe/nanox/microwindows-0.92/src/mwin/winmain.c:358: error: impossible constraint in 'asm'
make[1]: *** [/home/user/oe/nanox/microwindows-0.92/src/obj/mwin/winmain.o] Error 1
make: *** [subdir-/home/user/oe/nanox/microwindows-0.92/src/mwin] Error 2
1
There is next problem: In function 'MwSelect': /home/user/oe/nanox/microwindows-0.92/src/mwin/winmain.c:356: error: impossible constraint in 'asm' /home/user/oe/nanox/microwindows-0.92/src/mwin/winmain.c:357: error: impossible constraint in 'asm' /home/user/oe/nanox/microwindows-0.92/src/mwin/winmain.c:358: error: impossible constraint in 'asm' make[1]: *** [/home/user/oe/nanox/microwindows-0.92/src/obj/mwin/winmain.o] Error 1 make: *** [subdir-/home/user/oe/nanox/microwindows-0.92/src/mwin] Error 2 Sergiy Baitala

1 Answers

1
votes

I suspect you're compiling against your build system's header files rather than the target's. This is a recipe for bizarre crashes due to version mismatches.

Compiling with --sysroot=<target-root> - where <target-root> is the root directory of the target filing system image, including headers and library files.