GNU bug report logs - #72697
cmake-build-system sets wrong CMAKE_SYSTEM_NAME when crossbuilding for Hurd

Previous Next

Package: guix;

Reported by: Dariqq <dariqq <at> posteo.net>

Date: Sun, 18 Aug 2024 13:42:01 UTC

Severity: normal

Done: Dariqq <dariqq <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dariqq <dariqq <at> posteo.net>
Subject: bug#72697: closed (Closing bugs)
Date: Tue, 14 Jan 2025 20:09:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#72697: cmake-build-system sets wrong CMAKE_SYSTEM_NAME when crossbuilding for Hurd

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 72697 <at> debbugs.gnu.org.

-- 
72697: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72697
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dariqq <dariqq <at> posteo.net>
To: 72697-done <at> debbugs.gnu.org, 68366-done <at> debbugs.gnu.org
Subject: Closing bugs
Date: Tue, 14 Jan 2025 20:07:43 +0000
Hello,

I sent https://issues.guix.gnu.org/72751 to move the cross compile logic 
out of the build side code, also adding GNU as a CMAKE_SYSTEM_NAME with 
a  fallback of Generic.

Because this no longer lives in build code it should now be easier to 
add a new SYSTEM_NAME without recompiling the cmake world.

This is now in master.
 ad672d80d7 * build-system: cmake: Rework cross compilation

So I am closing these.

[Message part 3 (message/rfc822, inline)]
From: Dariqq <dariqq <at> posteo.net>
To: bug-guix <at> gnu.org
Subject: cmake-build-system sets wrong CMAKE_SYSTEM_NAME when crossbuilding
 for Hurd
Date: Sun, 18 Aug 2024 13:40:43 +0000
Hi,

I was playing around with a package using cmake and got an error when 
crossbuilding for i586-pc-gnu. The reason seems to be that cmake build 
system only checks for a mingw target and assumes all other targets are 
Linux and sets CMAKE_SYSTEM_NAME accordingly.

I am able to work around it by adding something like

#$@(if (and (%current-target-system)
	    target-hurd?)
       '("-DCMAKE_SYSTEM_NAME=GNU")
       '())

to the configure-flags of my package.


I am unsure how a fix should look like. I was thinking of moving the 
entire crossbuild code out of the build side and instead prepend the 
right configure flags for the target to configure-flags for the cross 
builder kind of similar how meson-build-system does it.

Unfortunately a change like this causes a lot of rebuilds.



This bug report was last modified 185 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.