Page 1 of 1

Cross compiling from Linux PC for ARM: what am i doing wrong?

Posted: Wed May 22, 2019 2:15 pm
by Parduz
I'm trying to build my program from a Debian PC for a BBB, instead of compiling in ON the BBB.

To do this i first tried to build the WX libraries (3.0.4), then i planned to build the samples and see if they works on the BBB.

So i created another folder in the main WXWidgets one (~/wxWidgets/wxWidgets-3.0.4/build-debug-GTK2-arm/) and run:
../configure --disable-shared --enable-debug --with-gtk=2 --with-libtiff=no --with-opengl=no --enable-unicode --host=arm-linux-gnueabihf

make

It compiles, (also the samples) but the result is still a 386 code.... what am i doing wrong?


(attached files contains config.log and the output of objdump -f minimal)

Re: Cross compiling from Linux PC for ARM: what am i doing wrong?

Posted: Wed May 22, 2019 4:02 pm
by doublemax
I can't help myself, but i remembered this article, which sounds related to your problem:
http://yasriady.blogspot.com/2015/10/ho ... ry-pi.html

Maybe you find some useful information there.

Re: Cross compiling from Linux PC for ARM: what am i doing wrong?

Posted: Fri May 24, 2019 1:29 pm
by iwbnwif
The article that Doublemax links does illustrate how to do this. Please look also at the updated version of the article (it is linked in the original, but just in case).

http://yasriady.blogspot.com/2016/01/ra ... chain.html

I have to say that the process is quite hard work, especially the buildroot part. Also, the blog post is a couple of years old and no doubt there have been several changes in the meantime.

Depending on your application, you may be better off looking at wxPython on ARM. It is constantly updated (there was a new release just a few days ago) and it is easy to develop on a PC and run on an ARM board.

https://pypi.org/project/wxPython/

I don't intend to start an argument about c++ / python (90% of my work is in c++), but for creating UI on ARM boards I think that wxPython is quite a good option :)

Re: Cross compiling from Linux PC for ARM: what am i doing wrong?

Posted: Fri May 24, 2019 3:00 pm
by Parduz
Thanks to all.
Found part of the solution: configure did'nt found arm-linux-gnueabihf-XXX executables and proceeded to the standard "XXX" without other advice than the log.

Found that "XXX" (say "gcc") is a link to "gcc-6", which is a link to "i686-linux-gnu-gcc-6" (this also for g++,cpp, etc.);
so i've manually create links called arm-linux-gnueabihf-XXX for arm-linux-gnueabihf-XXX-6 and it finally compiled, and the libraries now appears to be ARM code.

Problem is now that i can't compile "minimal": LD can't find the libraries listed in the makefile EXTRALIBS_GUI variable.

Any clue?


About python: my project is 4 years old already, i can't go back :)