From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oA5bHiL6HGIozQAAgWs5BA (envelope-from ) for ; Mon, 28 Feb 2022 17:36:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GC3WFiL6HGKIegAAG6o9tA (envelope-from ) for ; Mon, 28 Feb 2022 17:36:50 +0100 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 D9A1CEE83 for ; Mon, 28 Feb 2022 17:36:49 +0100 (CET) Received: from localhost ([::1]:41322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOj0z-00014x-1m for larch@yhetil.org; Mon, 28 Feb 2022 11:36:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOj0i-00014k-Of for guix-devel@gnu.org; Mon, 28 Feb 2022 11:36:32 -0500 Received: from [2607:f8b0:4864:20::62d] (port=40759 helo=mail-pl1-x62d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOj0g-0004HA-MK for guix-devel@gnu.org; Mon, 28 Feb 2022 11:36:32 -0500 Received: by mail-pl1-x62d.google.com with SMTP id z11so2805431pla.7 for ; Mon, 28 Feb 2022 08:36:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greghogan-com.20210112.gappssmtp.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=gidh4Xkdr+BWr9AkAbuyJ+bkPTc05OaP5BjKaWWEsIs=; b=vV8W8j9113ql5aLmvIMJ4lKrK8KylYzgkqF2cxh2DYeNZUy646h+FHhrHhOi9sG9WG mX7FeSx6QNz9Aqd0SaCVUHENeaj2P4CUaabUJADlVhRcoXgLzcU+q2OlzvuD36GepsS3 Vf3CMLeSBglyUXez17TXpQU7IUB4S0iZB/KUrCDQvxFwdsc86hiCoWnd0gdmrG6GJE2J xG/T+og+qn3JqNZgQoH8TKvkhlCzXXQ8eN9rMZPHH1JferG3rQwMGpTKNg8UGnypmK6Z gJYj4djkJDlpq97G+olBjX0ey80rUTB9HFjzwwOoy1IWEaSZDjGYtcS0KS9gvJnCG1Ui ZOEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=gidh4Xkdr+BWr9AkAbuyJ+bkPTc05OaP5BjKaWWEsIs=; b=zpaw6TmnPM+a5kcZh6F76b7Bk94oSnCVhlqg03DGbZYqJhI8boeVEssFh4/EdRfNaj Xlj/DJMPXREZ0IR86jcdNnhhIUCmWnkfskFjbMQFvmtTycvTGIekuDMOjdxJ8GdMPHI1 qX0r8do9ygSq2d0XWhxnbp48eKiVaob9WuD8v7hxZAK30vjdTYMw2kxHWqqS0rvIAd6y CthOczV8wNbmeEz8bzaoPAw8Tl7ahkg+cAVK6FAc0lc1cDq/JKD9JQeCuoCvpoyM76iL /4muCL6j3z+/m0Ruoqoyl8vSlWCe196IRkTwVpBQUM/KLepTZ9Q4xIO7ubVZ8XyfJLQX YeOg== X-Gm-Message-State: AOAM533CwjjX8lBZLM1XcFokY+Tvl+Q7exDVIPL4bUc26wD3/VPXEJZI A6w1mnRVhselKfNF+1yIkOf0M4ge2UpzRXxMWs7VrlBPn1pfbjfWM5s= X-Google-Smtp-Source: ABdhPJwwOQ1+nHY2Ra6I3wNaY2WSUUwF1aFyYbLoYylEf7ufDmnR+Lb9g3OKXmXifVQSWsOgQe8BmWIEbOXO5dNBcJc= X-Received: by 2002:a17:902:b58d:b0:14d:3d38:2690 with SMTP id a13-20020a170902b58d00b0014d3d382690mr20922763pls.78.1646066188546; Mon, 28 Feb 2022 08:36:28 -0800 (PST) MIME-Version: 1.0 From: Greg Hogan Date: Mon, 28 Feb 2022 11:36:17 -0500 Message-ID: Subject: Building clang with gcc-toolchain@11 To: guix-devel@gnu.org Content-Type: multipart/alternative; boundary="0000000000007204e705d916a65c" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::62d (failed) Received-SPF: none client-ip=2607:f8b0:4864:20::62d; envelope-from=code@greghogan.com; helo=mail-pl1-x62d.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646066210; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gidh4Xkdr+BWr9AkAbuyJ+bkPTc05OaP5BjKaWWEsIs=; b=dIuF0Ve4GDhfhgpuQ+7nNXjltI1FqwrYAsH7Yf2h/YoTaD7iFTDt3Se7CwbODXCwFBuFMj 389LdTu8aevZNcn+vqnynSsLxdc9+e/OQRKGHyNpKAi4qAFaLucLHeFBpDqFYGCTEhH7LQ 2hvz2JRW+gs2iRG+5QvoeMWRsR2QUts3Wm+8F/6P3DEiLWK7l6SGr7eZ7fuXfF5g0slSsP b2UduLTKretY6jFu0Ma6H5TCkbQ0yZ2HuAssGtYOWM8ukkCcsGNfehVNuVis7En+JOw9iW /SEtN4Zukd6N6NObaj8moCYbNJ6SUw4W3YNp0LVYoIdGlGPbBGlC5rnRLtGdpQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646066210; a=rsa-sha256; cv=none; b=tUnHVvX/baalQA25jD0Z4PgQwxrBaeeEa5XLJGd+EgvNmucuqnn3cvkz6oUIO8PMTBdE6K cRjbHCnGdWutTMDDTFne5NCAmTslzmWI5Q33gZffeMQZirU13nIhA2NN3GgFl+dPXrcsXe 0fOHIUu12O+isxrB4sOPhamooyYzOJEW2UKisxsqGpUqQeV3eBYVJL5thyYI6A8l86Tk+7 QJsHJBRqXS9VhTGQ6RSlNSoWP9puv6jk3UrIR0WyHMWQe6JQM/3FSieSTekYZ83AtYM0oQ BjlaqjX+R1ZphmKU7s2J0crjAl2YamLeX27upkqPkejAE89CK+7c8kY9OVzJ7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=greghogan-com.20210112.gappssmtp.com header.s=20210112 header.b=vV8W8j91; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.30 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=greghogan-com.20210112.gappssmtp.com header.s=20210112 header.b=vV8W8j91; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D9A1CEE83 X-Spam-Score: -7.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: C7qixYOXGjx7 --0000000000007204e705d916a65c Content-Type: text/plain; charset="UTF-8" When creating a profile containing both clang-toolchain and gcc-toolchain I see the same issue as in #43023; however, if I specify the default gcc-toolchain (currently gcc-toolchain@10) then clang and gcc work just fine together. --8<---------------cut here---------------start------------->8--- $ guix time-machine --commit=0dc99fd1 -- shell --container gcc-toolchain@10 clang-toolchain coreutils grep $ env | grep CPLUS_INCLUDE_PATH CPLUS_INCLUDE_PATH=/gnu/store/4nd3abfcmf1zdqgrvi94ymwwijad9rkq-profile/include/c++:/gnu/store/4nd3abfcmf1zdqgrvi94ymwwijad9rkq-profile/include $ g++ hello.cpp && ./a.out Hello World! $ clang++ hello.cpp && ./a.out Hello World! --8<---------------cut here---------------end--------------->8--- This is nice, but necessitates use of an old version of GCC until such time as core-updates is updated then eventually merged. I'd like to instead use the latest gcc-toolchain (currently gcc-toolchain@11) and have clang-toolchain built with that gcc-toolchain. No matter what I offer in the "--with-c-toolchain" or "--with-input" options I always see the following error regarding '(assoc-ref %build-inputs "libc")' evaluating as false, even when specifying "--with-c-toolchain=clang=gcc-toolchain@10" that should currently be in use by default. Any ideas for fixing this? Thanks, Greg --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build clang --with-c-toolchain=clang=gcc-toolchain@11 The following derivation will be built: /gnu/store/7da3w2r437f78q22rqxnqzpcv13fhrfb-clang-13.0.1.drv building /gnu/store/7da3w2r437f78q22rqxnqzpcv13fhrfb-clang-13.0.1.drv... Backtrace: 14 (primitive-load "/gnu/store/8qmqddxxzgfvvslwffm9xwfay7a?") In ice-9/eval.scm: 214:21 13 (_ #f) 217:50 12 (lp (# ?)) 217:50 11 (lp (# ?)) 217:50 10 (lp (# ?)) 217:50 9 (lp (# ?)) 217:50 8 (lp (# ?)) 217:50 7 (lp (# ?)) 217:50 6 (lp (# ?)) 217:50 5 (lp (# ?)) 217:50 4 (lp (# ?)) 217:50 3 (lp (# ?)) 217:33 2 (lp (# ?)) 202:51 1 (_ #f) In unknown file: 0 (string-append "-DC_INCLUDE_DIRS=" #f "/include") ERROR: In procedure string-append: In procedure string-append: Wrong type (expecting string): #f builder for `/gnu/store/7da3w2r437f78q22rqxnqzpcv13fhrfb-clang-13.0.1.drv' failed with exit code 1 build of /gnu/store/7da3w2r437f78q22rqxnqzpcv13fhrfb-clang-13.0.1.drv failed View build log at '/var/log/guix/drvs/7d/a3w2r437f78q22rqxnqzpcv13fhrfb-clang-13.0.1.drv.gz'. guix build: error: build of `/gnu/store/7da3w2r437f78q22rqxnqzpcv13fhrfb-clang-13.0.1.drv' failed --8<---------------cut here---------------end--------------->8--- --0000000000007204e705d916a65c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When creating a profile containing both clang-toolcha= in and gcc-toolchain=C2=A0I see the same issue as in #43023; however, if I = specify the default gcc-toolchain=C2=A0(currently gcc-toolchain@10) then cl= ang and gcc work just fine together.

--8<------= ---------cut=C2=A0here---------------start------------->8---
$ guix time-machine --commit=3D0dc99fd1 -- shell --container gcc-toolcha= in@10 clang-toolchain coreutils grep
$=C2=A0env | grep CPLUS_INCLUD= E_PATH
CPLUS_INCLUDE_PATH=3D/gnu/store/4nd3abfcmf1zdqgrvi9= 4ymwwijad9rkq-profile/include/c++:/gnu/store/4nd3abfcmf1zdqgrvi94ymwwijad9r= kq-profile/include
$=C2=A0g++ hello.cpp && ./a.out
Hello World!
$ clang++ hello.cpp && ./a.= out
Hello World!
--8<---------------cut=C2=A0her= e---------------end--------------->8---

This is nice, but necessitates use=C2=A0of an old version of GCC until s= uch time as core-updates is updated then eventually=C2=A0merged.
=
I'd like to instead use the latest gcc-toolchain=C2=A0(c= urrently gcc-toolchain@11) and have clang-toolchain=C2=A0built with that gc= c-toolchain. No matter what I=C2=A0offer in the "--with-c-toolchain&qu= ot; or "--with-input" options I always see the following error re= garding '(assoc-ref %build-inputs "libc")' evaluating as = false, even when specifying "--with-c-toolchain=3Dclang=3Dgcc-toolchai= n@10" that should currently be in use by default. Any ideas for fixing= this?

Thanks,
Greg

=

--8<---------------cut=C2=A0here<= /span>---------------start------------->8---
$ ./pre-inst-env g= uix build clang --with-c-toolchain=3Dclang=3Dgcc-toolchain@11
The follow= ing derivation will be built:
=C2=A0 =C2=A0/gnu/store/7da3w2r437f78q22rq= xnqzpcv13fhrfb-clang-13.0.1.drv
building /gnu/store/7da3w2r437f78q22rqxn= qzpcv13fhrfb-clang-13.0.1.drv...
Backtrace:
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 14 (primitive-load "/gnu/store/8qmqddxxzgfvvslwffm9xwfay7a?= ")
In ice-9/eval.scm:
=C2=A0 =C2=A0214:21 13 (_ #f)
=C2=A0 = =C2=A0217:50 12 (lp (#<procedure 7ffff4bff920 at ice-9/eval.scm:282:?>= ; ?))
=C2=A0 =C2=A0217:50 11 (lp (#<procedure 7ffff4bff900 at ice-9/e= val.scm:282:?> ?))
=C2=A0 =C2=A0217:50 10 (lp (#<procedure 7ffff4b= ff8a0 at ice-9/eval.scm:649:?> ?))
=C2=A0 =C2=A0217:50 =C2=A09 (lp (#= <procedure 7ffff4bff880 at ice-9/eval.scm:282:?> ?))
=C2=A0 =C2=A0= 217:50 =C2=A08 (lp (#<procedure 7ffff4bff820 at ice-9/eval.scm:649:?>= ?))
=C2=A0 =C2=A0217:50 =C2=A07 (lp (#<procedure 7ffff4bff800 at ice= -9/eval.scm:282:?> ?))
=C2=A0 =C2=A0217:50 =C2=A06 (lp (#<procedur= e 7ffff4bff7e0 at ice-9/eval.scm:282:?> ?))
=C2=A0 =C2=A0217:50 =C2= =A05 (lp (#<procedure 7ffff4bff7c0 at ice-9/eval.scm:282:?> ?))
= =C2=A0 =C2=A0217:50 =C2=A04 (lp (#<procedure 7ffff4bff580 at ice-9/eval.= scm:649:?> ?))
=C2=A0 =C2=A0217:50 =C2=A03 (lp (#<procedure 7ffff4= bff560 at ice-9/eval.scm:282:?> ?))
=C2=A0 =C2=A0217:33 =C2=A02 (lp (= #<procedure 7ffff4b91660 at ice-9/eval.scm:202:?> ?))
=C2=A0 =C2= =A0202:51 =C2=A01 (_ #f)
In unknown file:
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A00 (string-append "-DC_INCLUDE_DIRS=3D" #f "/in= clude")

ERROR: In procedure string-append:
In procedure stri= ng-append: Wrong type (expecting string): #f
builder for `/gnu/store/7da= 3w2r437f78q22rqxnqzpcv13fhrfb-clang-13.0.1.drv' failed with exit code 1=
build of /gnu/store/7da3w2r437f78q22rqxnqzpcv13fhrfb-clang-13.0.1.drv f= ailed
View build log at '/var/log/guix/drvs/7d/a3w2r437f78q22rqxnqzp= cv13fhrfb-clang-13.0.1.drv.gz'.
guix build: error: build of `/gnu/st= ore/7da3w2r437f78q22rqxnqzpcv13fhrfb-clang-13.0.1.drv' failed
--8&l= t;---------------cut=C2=A0here---------------end-= -------------->8---
--0000000000007204e705d916a65c--