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

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
User avatar
Parduz
I live to help wx-kind
I live to help wx-kind
Posts: 193
Joined: Fri Jan 30, 2015 1:48 pm
Location: Bologna, Italy

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

Post 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)
Attachments
config and abjdump.zip
(28.59 KiB) Downloaded 104 times
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

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

Post 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.
Use the source, Luke!
iwbnwif
Super wx Problem Solver
Super wx Problem Solver
Posts: 282
Joined: Tue Mar 19, 2013 8:52 pm

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

Post 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 :)
wxWidgets 3.1.2, MinGW64 8.1.0, g++ 8.1.0, Ubuntu 19.04, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.
User avatar
Parduz
I live to help wx-kind
I live to help wx-kind
Posts: 193
Joined: Fri Jan 30, 2015 1:48 pm
Location: Bologna, Italy

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

Post 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 :)
Post Reply