Re: [hatari-devel] Windows cross compile build inconsistencies with SDL2 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Windows cross compile build inconsistencies with SDL2
- From: Chang Chong <codemonkey2x@xxxxxxxxx>
- Date: Tue, 6 Apr 2021 11:20:21 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=/CttWGF2nibzg1CsOvs9ChzwsGj6vdZOYqe4yHkx9No=; b=B8J2myUiPpSCprV7m+GZFn/xR2uTSag+tMCDuuYQOuT7Gayiu+lLmpbIz80XivDLnz 1FQz0yYIFTQPiafsh0CkXY4FRmhC2lUpeKEIWULVuM4sAuLB09XvoR8JChrhWD+58elG 1oUHhQPqITvMySVQp9TvY5OvYkE7IpkVnsjroVnkbjf4PSypmj6NJ+tJq0A7P0JSrWqd Bl9P+J3epZgwZ+0+HOmWSKegNuuWLr6xh9EdOmzI/TD3UyAjQS0sLTunAFchEdRK22fi 1H3yTJCYG8RpTeLV52MU9D2/kA+U8wZ2OUwlc+c4Ay9hnrGg8TMMiGe/YP3pzxU4kLD8 kJLA==
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
>>
>>
>