From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0CMpKXE0amPOhwAAbAwnHQ (envelope-from ) for ; Tue, 08 Nov 2022 11:50:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EHMnKHE0amOMRgAAG6o9tA (envelope-from ) for ; Tue, 08 Nov 2022 11:50:25 +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 5E2CB2C600 for ; Tue, 8 Nov 2022 11:50:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osMBC-0005N1-4p; Tue, 08 Nov 2022 05:50:06 -0500 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 1osMBA-0005GC-0l for help-guix@gnu.org; Tue, 08 Nov 2022 05:50:04 -0500 Received: from marvid.fr ([163.172.81.107] helo=courriel.marvid.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osMB8-0003jJ-2t for help-guix@gnu.org; Tue, 08 Nov 2022 05:50:03 -0500 Received: from localhost (eduroam-083059.grenet.fr [130.190.83.59]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by sahkopoika (Postfix) with ESMTPSA id 35366792C65F; Tue, 8 Nov 2022 11:49:18 +0100 (CET) References: User-agent: mu4e 1.8.11; emacs 28.2 From: Sergiu Ivanov To: Emmanuel Medernach Cc: help-guix@gnu.org Subject: Re: Error using gcc with trivial-build-system Date: Tue, 08 Nov 2022 11:45:37 +0100 In-reply-to: Message-ID: <87o7thd8lt.fsf@colimite.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: none client-ip=163.172.81.107; envelope-from=sivanov@colimite.fr; helo=courriel.marvid.fr X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, FORGED_SPF_HELO=1, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667904625; 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; bh=ZYEx3JZnHRfMB0KX5EMJ6ZefP6GV0HNNDr2CmF8UH1o=; b=RRTzzCWhv5XBe6TwnJdGWtx5Bv56zfHP6UCAnnjxjc/x5AuAj7yKuAyWKg72XvM/lOlJh+ Cv77Mr8HegDjBzkAEThkEv7zp5yT/bAfGCaq0nUB/EWub8VKq2MR4LVuXGhxpWXMBUmu9O 9c3uFdubrfByrBtJ/zp6vctwR+WOT5HvoT+7JSpeJvt1ttDJYgSvokEcMzxZl93air5bFr 8CiTVW1/IEs61fEiLTxpS/gqerS7QFT7zUrUOFTodr8iWBmYfqyvDDSVv+UCRqvhr0HwJo zZajqXhrMQIgQjgicEqBFrVvg3bHYyFUuGQkgRVIrs7D3sRFsdmOKaI5WSD5ew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667904625; a=rsa-sha256; cv=none; b=kpA4NDsOcm7TAjuUC3KKxKqkeGg0kfuv3QPpS8+PgO643LcBRp7qR+zpKgw4lJ2UYQX/N6 G/S4gJRD77ihiMW01VMiCzBcBo50LLosvytG4JKOmN4KdRwZghNTLPCvxsgQQbu6Pd01q2 lha2bVkGZT6FbSGz4I/EA05OclfZR8I1elSLkNvH8o18hPcEbMTen7wXH3CVAzET3DV4Bw a3WTWTRkvryLDoTYzvkHHBy7UsyJW6Ba3eJiKXBHOARsLtA7GQlv79F0L3jRCOWvPNPy+a Yz4lf2/b7KhE65hIhdqBylekQz/IM2w+oikj7xpiqV69B1e8lPGdhskcpQxDNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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" X-Migadu-Spam-Score: -3.61 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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" X-Migadu-Queue-Id: 5E2CB2C600 X-Spam-Score: -3.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: MBp94ZlMzk1a Hi, I have little experience with Guix packages, but I ran into a similar issue using guix shell --pure recently, and I believe that you need to add glibc to your dependencies. I suppose that guix shell works for you because you already have glibc available in the active profile. I'd expect guix shell --pure to fail with the same error. - HTH, Sergiu Emmanuel Medernach [2022-11-08T11:23:16+0= 100]: > Hello Guix, > > I have a local package with a compile script that > I need to add to our local GUIX packages. > > I tried to use trivial-build-system with > gcc-toolchain input, all works well when I compile > it manually in a 'guix shell' but when I try to > define a package I ran into this error: > > ld: cannot find crt1.o: No such file or directory > ld: cannot find crti.o: No such file or directory > collect2: error: ld returned 1 exit status > > I cannot produce correct binaries with > gcc-toolchain, here is a minimal package > definition with the above problem. Could you > please tell me how to solve this problem ? > > (define-public SimpleTest > =C2=A0 (package > =C2=A0=C2=A0 (name "SimpleTest") > =C2=A0=C2=A0 (version "0.0.0") > =C2=A0=C2=A0 (source > =C2=A0=C2=A0=C2=A0 (origin > =C2=A0=C2=A0=C2=A0=C2=A0 (method url-fetch) > =C2=A0=C2=A0=C2=A0=C2=A0 (uri ".../simpletest.tgz") > =C2=A0=C2=A0=C2=A0=C2=A0 (sha256 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (base32 "0nx8dgs5n4s1alp8lnp7a96czdll8bb7l= jbg152yk7m0mr07728d")))) > =C2=A0=C2=A0 (inputs `(("gcc-toolchain" ,gcc-toolchain-9) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = ("gzip" ,gzip) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = ("tar" ,tar))) > =C2=A0=C2=A0 (build-system trivial-build-system) > =C2=A0=C2=A0 (arguments > =C2=A0=C2=A0=C2=A0 `(#:modules > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ((guix build utils)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:builder > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (begin > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (use-modules (guix build utils= )) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (let* ((source (assoc-ref %bui= ld-inputs "source")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (out (assoc-ref %outputs "out")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (gzip (assoc-ref %build-inputs "gzip")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (gunzip-bin (string-append gzip "/bin/gunzip")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (tar (assoc-ref %build-inputs "tar")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (tar-bin (string-append tar "/bin/tar")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (gcc-dir (assoc-ref %build-inputs "gcc-toolchain")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (gcc-bin (string-append gcc-dir "/bin/gcc"))) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (let* ((packages (= alist-delete "source" %build-inputs)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (packages-path (map cdr packages))) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setenv > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = "PATH" > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = (apply > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 string-append > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (getenv "PATH") ":" > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (map (lambda (p) (string-append p "/bin:")) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 packages-path)))) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; (setenv "GCC_EX= EC_PREFIX" gcc-dir) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; gcc: fatal erro= r: cannot execute 'cc1': execvp: No such > file or directory > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (display (list "gc= c-bin" gcc-bin)) (newline) > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mkdir-p out) (chd= ir out) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (copy-file source = "simpletest.tar.gz") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (invoke gunzip-bin= "simpletest.tar.gz") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (invoke tar-bin "x= vf" "simpletest.tar") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (delete-file "simp= letest.tar") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (chdir "simpletest= ") > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (invoke gcc-bin "s= impletest.c" "-o" "simpletest") > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #t)))) > > =C2=A0=C2=A0 (synopsis "Simple Test") > =C2=A0=C2=A0 (description "Simple Test") > =C2=A0=C2=A0 (home-page "None") > =C2=A0=C2=A0 (license license:gpl3+))) > > Best regards, > > Emmanuel Medernach