From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 QNYwJ31TamNBCwAAbAwnHQ (envelope-from ) for ; Tue, 08 Nov 2022 14:02:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yPwYJ31TamOsTAEAauVa8A (envelope-from ) for ; Tue, 08 Nov 2022 14:02:53 +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 47505290EE for ; Tue, 8 Nov 2022 14:02:53 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osOFQ-0001jC-6k; Tue, 08 Nov 2022 08:02:36 -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 1osOEy-0001V9-Qe for help-guix@gnu.org; Tue, 08 Nov 2022 08:02:10 -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 1osOEv-0002sI-EG for help-guix@gnu.org; Tue, 08 Nov 2022 08:02:08 -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 2A8D1w1j022166 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Tue, 8 Nov 2022 14:01:59 +0100 Message-ID: <6847ccc8-2848-e22e-1706-97df345d52a5@iphc.cnrs.fr> Date: Tue, 8 Nov 2022 14:01:58 +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: Wojtek Kosior Cc: Sergiu Ivanov , help-guix@gnu.org References: <87o7thd8lt.fsf@colimite.fr> <23e9300e-b105-d32e-4fa6-3a6451f5cb35@iphc.cnrs.fr> <20221108123926.6fcc8360@koszkonutek-tmp.pl.eu.org> From: Emmanuel Medernach In-Reply-To: <20221108123926.6fcc8360@koszkonutek-tmp.pl.eu.org> 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=1667912573; 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=FGATYv/ihrNQFpbb7nYzuq14NxEjwuZy8ZiCrQspUhA=; b=izYm04AEh+AFcsnW0Tx8q6ZWRzrajgLhjWz8soDk830HrW0e9zRWuSWimXcj53hca2kUOQ uFQR+QIkBemx44wBzE1zuqXHnjBgdtdJU+hA0u8pN6Dm1/Ts4wKEXlZ+/eT/eCb3vjWLP5 gbzIMr7cxnXYEE2dZUskJ4n2Dd5HfD076BfwOEc+PQd4gc+ffuAdudLGlYltLipxFZWFCd 7e58vPGfns38no43DTkoQ9FsQPP7FXwUkCaOmgTudi5h9cLJqNGuicgjLf+MY6zGKqrhsZ 2+YSuiVc5/FjzZIZQQLS1nJZGn7XvBr/JIbPJFeNTPZUyTf/hsZdlTPs/yKEWw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667912573; a=rsa-sha256; cv=none; b=t/VaJVqLWLO5YvhFHbFRXcpGo4cjq3S3dx7ym4Bzd4ZxXokac1ATEMYUA9MhIAcZUHgGxA 0ws/bpnB2Kly4yBxv1yiSmOXsEBuCQAeFhG+9lnaVvNU2acLfGHbvLA2VB653QUY2lf07q Q4cN2sdDtHTgtGKQdapJqVLjC9UoLeBLOuW8e2xF9tc9om+TUji1lC7LsoTVblFMpKMAJ8 kHg2SiYOjaXu3CvfkR+2eAfv6g5svIyMppR5NpHkiMwE7Y/BIeDjusUpQMd6fMYLiyBys/ Qps5JkPjDo849QKGfzaZXJWClmssWQJl2glOCbF+n5x5TDvmdz6qLJPPRgAAdQ== 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.81 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: 47505290EE X-Spam-Score: -3.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8AhSbzHbBQ8w Le 08/11/2022 à 12:39, Wojtek Kosior 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 > Perhaps `find /gnu/store/ -name "crt1.o"` will give further hints? Yes, it is already part of gcc-toolchain (gcc-toolchain-9.4.0/lib/crt1.o) Adding "-L" flags to gcc does not help Emmanuel > Good luck! > > Wojtek > > -- (sig_start) > website: https://koszko.org/koszko.html > PGP: https://koszko.org/key.gpg > fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A > > Meet Kraków saints! #10: blessed Hilary Januszewski > Poznaj świętych krakowskich! #10: błogosławiony Hilary Januszewski > https://pl.wikipedia.org/wiki/Hilary_Januszewski > -- (sig_end) > > > On Tue, 8 Nov 2022 11:58:41 +0100 > Emmanuel Medernach wrote: > >> 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 >