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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Dariqq <dariqq@HIDDEN>; dated Sun, 18 Aug 2024 13:42:01 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Aug 2024 13:41:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 18 09:41:39 2024
Received: from localhost ([127.0.0.1]:55603 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sfgA7-0006fY-Dj
	for submit <at> debbugs.gnu.org; Sun, 18 Aug 2024 09:41:39 -0400
Received: from lists.gnu.org ([209.51.188.17]:46042)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dariqq@HIDDEN>) id 1sfgA5-0006fR-H1
 for submit <at> debbugs.gnu.org; Sun, 18 Aug 2024 09:41:38 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dariqq@HIDDEN>) id 1sfg9Q-0005iM-FP
 for bug-guix@HIDDEN; Sun, 18 Aug 2024 09:40:56 -0400
Received: from mout01.posteo.de ([185.67.36.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dariqq@HIDDEN>) id 1sfg9O-0000JD-I9
 for bug-guix@HIDDEN; Sun, 18 Aug 2024 09:40:56 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 79632240027
 for <bug-guix@HIDDEN>; Sun, 18 Aug 2024 15:40:49 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1723988450; bh=PWXQUTTdx7hNoPbBUL+pyakjixT3XNj95/z7na0NyLs=;
 h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type:
 Content-Transfer-Encoding:From;
 b=e/HMK1rSHXHgPxkHQVBtzwjaVZogSj50lQ4GtbqQtOlzdqN2eFQQshjPQOd0JLSPh
 vUvlaFMqUtp1mkxuifYzdP10jHqT12/HXyTF/wziw2jranqUqOB/aaiZVw7wLgHE1G
 ykz7RJzEJbTKA8oT+xZeTWI/B0udjRmL6Nt/4PDsVoRAAJPJqjaGAnNTtQMUJ/S+K7
 vTOFGcny6Yobb0QKI5bWOl/Md93KbOp9+5hrDIrteB1skYTFdHx3C0GV7IwL+dpnKl
 lOcDta57jT8gDi6OH5TKXNYEd3V3nbD/jp+/PVrCaqdPLmsrlCEYeFSkmbIiXCA5jW
 t6iBzsrHwO5gQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Wmxh14wT8z9rxB
 for <bug-guix@HIDDEN>; Sun, 18 Aug 2024 15:40:49 +0200 (CEST)
Message-ID: <f7026fdc-078b-450a-a1ae-252811b8aa03@HIDDEN>
Date: Sun, 18 Aug 2024 13:40:43 +0000
MIME-Version: 1.0
Content-Language: en-US
To: bug-guix@HIDDEN
From: Dariqq <dariqq@HIDDEN>
Subject: cmake-build-system sets wrong CMAKE_SYSTEM_NAME when crossbuilding
 for Hurd
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=185.67.36.65; envelope-from=dariqq@HIDDEN;
 helo=mout01.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

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.




Acknowledgement sent to Dariqq <dariqq@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#72697; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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