At the moment, x86_64-w64-mingw32-emerge doesn't work for a number of packages that use cmake (e.g. dev-cpp/nlohmann_json). Because CMAKE_SYSTEM_NAME gets set to "Linux" rather than "Windows", the WIN32 conditional variable doesn't function as expected. The root cause of this is the symlink of /usr/x86_64-w64-mingw32/etc/portage/make.profile to /usr/portage/profiles/embedded, which has kernel_linux hardcoded in /usr/portage/profiles/embedded/use.force. The suggestion in the Wiki to set KERNEL="-linux Winnt" in make.conf doesn't work, and confuses cmake even further. I suggest that we probably need a dedicated mingw profile, identical to embedded but with kernel_Winnt forced instead of kernel_linux, and that crossdev should symlink to this instead. Reproducible: Always
KERNEL="-linux Winnt" in make.conf suggestion is probably incorrect. These should be profiles variables only. Note that crossdev already creates a small profile overlay to account for the offset: """ $ for f in /usr/i686-w64-mingw32/etc/portage/profile/*; do echo "#$f"; cat $f; done #/usr/i686-w64-mingw32/etc/portage/profile/make.defaults ARCH="x86" KERNEL="-linux Winnt" ELIBC="mingw" #/usr/i686-w64-mingw32/etc/portage/profile/package.provided #/usr/i686-w64-mingw32/etc/portage/profile/use.force -kernel_linux kernel_Winnt """ Please provide example faulty build.log and ${CTARGET}-emerge --info. That would help me to reproduce it locally.
That file wasn't there for me, but when I cleaned the overlay and rebuilt it it showed up. Sorry for this, you've obviously fixed it already. Thanks for responding quickly.
No problem. Was probably fixed in https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=393e1cd0c6d3ac81fa166bafe6065d42849f622c Yeah, stale overlay metadata keeps biting users. We should probably add something to cross-emerge to suggest overlay's regeneration when major changes like that happen.