Re: [hatari-devel] Windows cross compile build inconsistencies with SDL2

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


I hate to hash this back out again, but I wanted to provide a safety warning to cross-compilers on debian hosts.

The changes to CMakeFiles.txt with the package config is spot on.. the issue is with debian.. there’s a problem with pkg-config and cross compilation.

if you execute the correctly generated pkg-config application, it fails for debian with the error message:

“Please install dpkg-dev to use pkg-config when cross-building”

And because of this, pkg config won’t find the correct mingw SDL2 additional cflags.

This is super stupid since dpkg-dev is already installed. A little more research pointed to a bug raised in 2020 that has been addressed but not released (mingw-w64 bug #930492). this patch is released in mingw-w64 version 7.0.0-3. The current installed version is 6.0.0-3.

If you’re hell bent on making it work, you will need to comment some lines in /usr/share/pkg-config-crosswrapper/

Chang


> On Apr 3, 2021, at 8:54 AM, Chang Chong <codemonkey2x@xxxxxxxxx> wrote:
> 
> I’m late to the party. I just finished building on windows mingw and I concur with Jens.
> 
> Looking at the build logs, I now only see the additional SDL2 cflags in the compilation of the hatari project only. The hatari executable fired up with no obvious failures.
> 
> I was going to test out the cross compile scenario, but Jens beat me to it.
> 
> I feel this change provides more clarity and consistency to the project across build scenarios.
> 
> Thanks,
> Chang
> 
> 
>> On Apr 3, 2021, at 8:47 AM, Jens Guenther <dbotw@xxxxxxx> wrote:
>> 
>> # 03. Apr 2021 (08:26:38) Thomas Huth:
>> 
>>> So let's give it a try and use target_compile_definitions instead.
>> 
>> Works with MinGW-w64 and cross compiling on Linux with MinGW-w64.
>> 
>> Jens
>> 
>> 
> 




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/