Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Cross compiling WxWidget application for Debian64 and Debian

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
VdBergh.Paul
Posts: 2
Joined: 2016-03-03 10:17

Cross compiling WxWidget application for Debian64 and Debian

#1 Post by VdBergh.Paul »

I'm building a WxWidget application targetting both Debian 64-bits and Debian armhf (Raspberry). I'm using eclipse as IDE running in a Debian 9.4 Virtualbox. The VB Host is Windows10.

The eclipse workspace is organized as tree projects :
  • - one project set up for Debian 64-bits architecture
    - one project set up for Debian armhf architecture (using multiarch)
    - one project with common source files.
In both the 64-bits as the armhf projects, the source code is linked in from the common project.

I installed WxWidgets for 64-bits with the following command:

Code: Select all

sudo apt install libwxgtk3.0-dev
Now, the 64-bits project compiles without errors and the executable works fine under Debian64.

Next, I like to cross-compile for armhf, so

Code: Select all

sudo apt install libwxgtk3.0-dev:armhf
Now, the armhf project compiles without errors and the executable works fine on the Raspberry Pi.
However, the compilation of the 64-bit project is broken...

Apparently, the platform specific setting for WxWidgets are defined/declared in a file called

Code: Select all

    setup.h
this file is located at

Code: Select all

    /usr/lib/PLATFORM/wx/include/gtk2-unicode-3.0/wx/
where PLATFORM is either

Code: Select all

 x86_64-linux-gnu
for Debian64 or

Code: Select all

arm-linux-gnueabihf
for Debian armhf.

My observation is that installing one version of the development package installs the correct setup.h, but also removes the other...
So, how do I setup WxWidgets for multi-arch compilation for both platforms?

Thanks in advance,

Paul

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Cross compiling WxWidget application for Debian64 and De

#2 Post by stevepusser »

If I understand you correctly, you want to have both versions of the -dev package installed at the same time. That's not possible, as you have found out. The normal procedure is just to install the version for your target arch before the compilation, which will remove the other version. It seems to be working for you already, so I really can't see what the problem is, especially when the changeover can be scripted.

If you set up chroots with QEMU for the different architectures, it's supposed to be possible to build in those, too. At least looking at some docs for sbuild...
MX Linux packager and developer

Post Reply