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 ms5.migadu.com with LMTPS id 2LhWMYM2amO93gAAbAwnHQ (envelope-from ) for ; Tue, 08 Nov 2022 11:59:15 +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 qORWMIM2amPm+AAAG6o9tA (envelope-from ) for ; Tue, 08 Nov 2022 11:59:15 +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 71EB31291C for ; Tue, 8 Nov 2022 11:59:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osMJm-0008Le-B1; Tue, 08 Nov 2022 05:58:58 -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 1osMJj-0008L4-M6 for help-guix@gnu.org; Tue, 08 Nov 2022 05:58:55 -0500 Received: from cczrelay02.in2p3.fr ([134.158.66.142]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osMJh-0003iV-Jg for help-guix@gnu.org; Tue, 08 Nov 2022 05:58:55 -0500 Received: from [192.168.1.11] (buc10-1_migr-88-170-139-253.fbx.proxad.net [88.170.139.253] (may be forged)) (authenticated bits=0) by cczrelay02.in2p3.fr (8.14.4/8.14.4) with ESMTP id 2A8Awfck028506 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Tue, 8 Nov 2022 11:58:42 +0100 Message-ID: <23e9300e-b105-d32e-4fa6-3a6451f5cb35@iphc.cnrs.fr> Date: Tue, 8 Nov 2022 11:58:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: Error using gcc with trivial-build-system Content-Language: en-US To: Sergiu Ivanov Cc: help-guix@gnu.org References: <87o7thd8lt.fsf@colimite.fr> From: Emmanuel Medernach In-Reply-To: <87o7thd8lt.fsf@colimite.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=134.158.66.142; envelope-from=Emmanuel.Medernach@iphc.cnrs.fr; helo=cczrelay02.in2p3.fr X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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=1667905155; 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=rOnkE5QDiCA96s6oK0CBYivmfvPY6yG9X2jqQNBXS0s=; b=h0n6AUdApeylV020FvTVDX00OiXCJTS92OuLvBif/1UW2TNMjJsqra3b3RoY+QUh+kTYFx o3tMnhXqTOEpXAs7G3DWgKfn7g3nnfHvrJ6qHIonrnXouipN/l5kxJl7TAFKjiZ5GHSBcG 2rrE89JRnSzJa4HnxgwDUEbXaNcE8eoMnKga0LPjNNGBh1uiA3VeGntPHQO/bz1JDjfUKx y6G3rSn+CcLPhQBx0zWnON+NKPwJOYmyadYZuxboxpz1Xqga6S3qdWDHJwZlezfukH7RlI mZTX0Qm0jjjB20IsLyzonDQ6nfbD5Jhi3Rt55oYQPGngTSO0r6Sshp8avhrmVg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667905155; a=rsa-sha256; cv=none; b=e1Z4ZGHHEgrJ1TGMYaOVtdYSq/0VNKiDMNIKtBgH5agB7BHVQZQ6RClEJDOrtXqkQJAUe9 F7oII36eMwRfeJs3QbExX05fTm3OsT6QYn8QFAsBlK+9w2aVGdEy7sT3tjrwxyr46XRGGa zwnDzyMSxVsideXmbCwHIWaWa/DPJX+FCNQLUtMdUz2X2Wtdd/j9aBGRpyNhhJzTdIegkS +LQNNVJZu4Y/kLt16AYnPQ9AFjCIHYIxas+KP7TgXkDGc/HqihkgJyBVnBRw+ZFRIW51oe sGSRGeXL5URVZni2nLWGgTWFSRqIZu36rBTXjZJZf73PhswVeam5PjRS2tDIMg== 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: -2.91 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: 71EB31291C X-Spam-Score: -2.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: Vi37bZonZgXQ Le 08/11/2022 à 11:45, Sergiu Ivanov a écrit : > 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. Thanks for your idea but no luck, still the same error with glibc added :-/ Emmanuel > - > HTH, > Sergiu > > > Emmanuel Medernach [2022-11-08T11:23:16+0100]: >> 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 >>   (package >>    (name "SimpleTest") >>    (version "0.0.0") >>    (source >>     (origin >>      (method url-fetch) >>      (uri ".../simpletest.tgz") >>      (sha256 >>       (base32 "0nx8dgs5n4s1alp8lnp7a96czdll8bb7ljbg152yk7m0mr07728d")))) >>    (inputs `(("gcc-toolchain" ,gcc-toolchain-9) >>              ("gzip" ,gzip) >>              ("tar" ,tar))) >>    (build-system trivial-build-system) >>    (arguments >>     `(#:modules >>       ((guix build utils)) >>       #:builder >>       (begin >>         (use-modules (guix build utils)) >> >>         (let* ((source (assoc-ref %build-inputs "source")) >>                (out (assoc-ref %outputs "out")) >>                (gzip (assoc-ref %build-inputs "gzip")) >>                (gunzip-bin (string-append gzip "/bin/gunzip")) >>                (tar (assoc-ref %build-inputs "tar")) >>                (tar-bin (string-append tar "/bin/tar")) >>                (gcc-dir (assoc-ref %build-inputs "gcc-toolchain")) >>                (gcc-bin (string-append gcc-dir "/bin/gcc"))) >> >>           (let* ((packages (alist-delete "source" %build-inputs)) >>                  (packages-path (map cdr packages))) >>             (setenv >>              "PATH" >>              (apply >>               string-append >>               (getenv "PATH") ":" >>               (map (lambda (p) (string-append p "/bin:")) >>                    packages-path)))) >> >>           ;; (setenv "GCC_EXEC_PREFIX" gcc-dir) >>           ;; gcc: fatal error: cannot execute 'cc1': execvp: No such >> file or directory >> >>           (display (list "gcc-bin" gcc-bin)) (newline) >> >>           (mkdir-p out) (chdir out) >>           (copy-file source "simpletest.tar.gz") >>           (invoke gunzip-bin "simpletest.tar.gz") >>           (invoke tar-bin "xvf" "simpletest.tar") >>           (delete-file "simpletest.tar") >>           (chdir "simpletest") >>           (invoke gcc-bin "simpletest.c" "-o" "simpletest") >> >>           #t)))) >> >>    (synopsis "Simple Test") >>    (description "Simple Test") >>    (home-page "None") >>    (license license:gpl3+))) >> >> Best regards, >> >> Emmanuel Medernach