From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id CONKAVFbE2UfDwEAG6o9tA:P1 (envelope-from ) for ; Wed, 27 Sep 2023 00:29:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CONKAVFbE2UfDwEAG6o9tA (envelope-from ) for ; Wed, 27 Sep 2023 00:29:37 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8E16140423 for ; Wed, 27 Sep 2023 00:29:36 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elenq.tech header.s=protonmail2 header.b=MaGQCMzP; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=elenq.tech ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695767377; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=A5AXQJBvMi71RJjmz4hiSJtlfCzPKozHj2Q+J61zC0s=; b=Q3tOxJw6Wf7TpxYEqi3GRPwH6AviEeTRH0XlKFgxtRq/j62YwDZBdavu3tdAbG9RGFcKJG syWQFCKN3VNxOxahxUDkbBhVCdgbCVs6hTsoPc+FzM0yGqOE0EpZyiRYpaMvNC1qqh387W H4vdDX/zu7KK8dvE6lKDG56aPYf07fvH5TzPGOngzOb8jMIkt0GGEUH3CphBQoaQH6UamZ 1MdsSIDILlv+sGIxvUeABgjBmuojq6ntGJwdF5sFCHNuKDKNu5gkn6Ek/YTE80uWIfSvff Ee6iXoWFnvfDwtls90QzccbQM+hZ3uY6Z3RkoyPc8H4yViKwhVkqpRPycfJ7nA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695767377; a=rsa-sha256; cv=none; b=MfZF5aZa6jrKSv9qwxy6t2lfWvaGK/9m2q2j9mVb4y9bGH4BRvlVS4cgQGWNL45UZJ+YG3 Nb+GRNEHc6akiYGwfDe0e1y8TtHfl/iOL8P87vvTKfZb0RXffYNl/x8EIV2AVDrnDkSH7P JDeyedQobrC/EBTIaOj6quci2RrEnzTL71ZtAwAB6BQznMMrFMIWqiXMgYMgMWjcWes340 UmO6ee2FczHDdpqZPEoIwL1g5AM4FJ/7T8hXEyMhFugUsi1Vn7l30JL4PisaQe64Xn6p2r FW3fh1dxb2WHEXoXroBxH6z/iUwsojiS5MUBCd+X+24QW9sNGrnRP9bYjcRSpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=elenq.tech header.s=protonmail2 header.b=MaGQCMzP; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=elenq.tech Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlGY6-0002ZQ-4e; Tue, 26 Sep 2023 18:28:58 -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 ) id 1qlGY3-0002Z2-7b for help-guix@gnu.org; Tue, 26 Sep 2023 18:28:55 -0400 Received: from mail-40136.proton.ch ([185.70.40.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlGY0-0000DB-91 for help-guix@gnu.org; Tue, 26 Sep 2023 18:28:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail2; t=1695767321; x=1696026521; bh=A5AXQJBvMi71RJjmz4hiSJtlfCzPKozHj2Q+J61zC0s=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=MaGQCMzPqFn8vrSOcFxCcrg+zsBNmRobP0ToLtxAPEGraPPxd77BseBX2cy+Yclo3 DHiqNJnboPMZTTAIZXBI7usqrl8cFtAiYDqyIIBpCZSr2cOQ58ppbYUK2lm+8oVRXc dSfPH9cNhBqjTZKkOWNUQFT0+C21L2+hh8cHw5gxzmhCsxvHJ18V9so7OC1jDUGzOW jqCjyk7PYORRr6hiwmRjp2JmRajF5TaEcdtYqrrruW35CCrAl1UcBFeWRvUpECaBfE 07A1EBcSN9VE4AHtO79ISY9rFEgcbcP7t94t9UnZjQAD9ZZT9yR3CGbcgXcWeBCuiG w4IMRNZCLYGcw== Date: Tue, 26 Sep 2023 22:28:32 +0000 To: Ekaitz Zarraga From: Ekaitz Zarraga Cc: "help-guix\\\\@gnu.org" Subject: Re: arm-none-eabi-toolchain: stdlib.h not found Message-ID: In-Reply-To: References: Feedback-ID: 3263582:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.136; envelope-from=ekaitz@elenq.tech; helo=mail-40136.proton.ch X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 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_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TO_EQ_FM_DIRECT_MX=1.969 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.36 X-Migadu-Spam-Score: -9.36 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Queue-Id: 8E16140423 X-TUID: PLGlpg3lZ5W0 ------- Original Message ------- On Tuesday, September 5th, 2023 at 18:09, Ekaitz Zarraga wrote: > Hi, > > If I guix shell to arm-none-eabi-toolchain: > > `Ekaitz@tuxedo ~/projects/TESTS$ guix shell arm-none-eabi-toolchain` > > arm-none-eabi-toolchain can't use cstdlib because: > > ``` > Ekaitz@tuxedo ~/projects/TESTS [env]$ cat a.c > #include > > void operator delete(void *p) { std::free(p); } > > Ekaitz@tuxedo ~/projects/TESTS [env]$ arm-none-eabi-g++ a.c > In file included from a.c:1:0: > /gnu/store/6bq6svar4b2mkp2k3laxqqs1nsxykrvf-profile/arm-none-eabi/include= /c++/cstdlib:75:15: fatal error: stdlib.h: No such file or directory > #include_next > > ^~~~~~~~~~ > compilation terminated. > Ekaitz@tuxedo ~/projects/TESTS [env]$ > `But:` > Ekaitz@tuxedo ~/projects/TESTS [env]$ ls $CROSS_C_INCLUDE_PATH | grep std= lib > stdlib.h > ``` > > Ideas? Hi, I dug a little bit further and I found a very interesting behavior: Preprocessor doesn't work vanilla: ``` Ekaitz@tuxedo ~/projects/rp2040/TESTS/RANDOM [env]$ arm-none-eabi-cpp a.c # 1 "a.c" # 1 "" # 1 "" # 1 "a.c" a.c:1:10: fatal error: cstdlib: No such file or directory #include ^~~~~~~~~ compilation terminated. ``` We have CROSS_CPLUS_INCLUDE_PATH correctly set: ``` Ekaitz@tuxedo ~/projects/rp2040/TESTS/RANDOM [env]$ echo $CROSS_CPLUS_INCLU= DE_PATH /gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/include:/= gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/include/c+= +:/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/include= /c++/arm-none-eabi ``` If we insert exactly the same directories pointed by CROSS_CPLUS_INCLUDE_PA= TH manually to the preprocessor it works! ``` Ekaitz@tuxedo ~/projects/rp2040/TESTS/RANDOM [env]$ arm-none-eabi-cpp a.c -= I/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/include = -I/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/include= /c++ -I/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/in= clude/c++/arm-none-eabi # 1 "a.c" # 1 "" # 1 "" # 1 "a.c" # 1 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/incl= ude/c++/cstdlib" 1 # 39 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/inc= lude/c++/cstdlib" # 40 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/inc= lude/c++/cstdlib" 3 # 1 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/incl= ude/c++/arm-none-eabi/bits/c++config.h" 1 3 # 533 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/in= clude/c++/arm-none-eabi/bits/c++config.h" 3 # 1 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/incl= ude/c++/arm-none-eabi/bits/os_defines.h" 1 3 # 534 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/in= clude/c++/arm-none-eabi/bits/c++config.h" 2 3 # 1 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/incl= ude/c++/arm-none-eabi/bits/cpu_defines.h" 1 3 # 537 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/in= clude/c++/arm-none-eabi/bits/c++config.h" 2 3 # 42 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/inc= lude/c++/cstdlib" 2 3 # 75 "/gnu/store/6zcm3xq6d3a0j6pnjd09b3zj1c9qbmrl-profile/arm-none-eabi/inc= lude/c++/cstdlib" 3 ... ``` Anyone has an idea of what I'm missing here and why isn't it just automagic= ? It should just work, or am I superwrong? Thanks!