GNU bug report logs - #24416
avr-gcc@5 is broken

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: "Thompson, David" <dthompson2@HIDDEN>; dated Sun, 11 Sep 2016 23:25:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 24416 <at> debbugs.gnu.org:


Received: (at 24416) by debbugs.gnu.org; 22 Dec 2017 14:45:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 22 09:45:50 2017
Received: from localhost ([127.0.0.1]:47098 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eSOa6-0005sD-9k
	for submit <at> debbugs.gnu.org; Fri, 22 Dec 2017 09:45:50 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:38164)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1eSOa3-0005s4-Vu
 for 24416 <at> debbugs.gnu.org; Fri, 22 Dec 2017 09:45:48 -0500
Received: from localhost (77.118.251.46.wireless.dyn.drei.com [77.118.251.46])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 2ACB73360847;
 Fri, 22 Dec 2017 15:45:46 +0100 (CET)
Date: Fri, 22 Dec 2017 15:45:40 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: "Thompson, David" <dthompson2@HIDDEN>
Subject: [PATCH] gnu: avr-gcc: Fix compiler lookup paths.
Message-ID: <20171222154540.1444b5e6@HIDDEN>
In-Reply-To: <CAJ=RwfbF+75d=E+mZ-_nNoHnRYL7Uy8m=CsQRGTwLi6jDQ-b4w@HIDDEN>
References: <CAJ=RwfbF+75d=E+mZ-_nNoHnRYL7Uy8m=CsQRGTwLi6jDQ-b4w@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 24416
Cc: 24416 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

* gnu/packages/avr.scm (avr-gcc-4.9): Use CROSS_C*_INCLUDE_PATH (like
cross-base does).
(avr-gcc-5)[source]: Apply patch "gcc-cross-environment-variables.patch".
---
 gnu/packages/avr.scm | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index ecb7cd19a..60bcbe754 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -61,7 +61,16 @@
           `(delete "--disable-multilib" ,flags))))
       (native-search-paths
        (list (search-path-specification
-              (variable "CROSS_CPATH")
+              (variable "CROSS_C_INCLUDE_PATH")
+              (files '("avr/include")))
+             (search-path-specification
+              (variable "CROSS_CPLUS_INCLUDE_PATH")
+              (files '("avr/include")))
+             (search-path-specification
+              (variable "CROSS_OBJC_INCLUDE_PATH")
+              (files '("avr/include")))
+             (search-path-specification
+              (variable "CROSS_OBJCPLUS_INCLUDE_PATH")
               (files '("avr/include")))
              (search-path-specification
               (variable "CROSS_LIBRARY_PATH")
@@ -71,7 +80,10 @@
   (package
     (inherit avr-gcc-4.9)
     (version (package-version gcc-5))
-    (source (package-source gcc-5))))
+    (source (origin
+              (inherit (package-source gcc-5))
+              (patches (append (origin-patches (package-source gcc-5))
+                               (search-patches "gcc-cross-environment-variables.patch")))))))
 
 (define (avr-libc avr-gcc)
   (package




Information forwarded to bug-guix@HIDDEN:
bug#24416; Package guix. Full text available.

Message received at 24416 <at> debbugs.gnu.org:


Received: (at 24416) by debbugs.gnu.org; 13 Sep 2016 09:18:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 13 05:18:27 2016
Received: from localhost ([127.0.0.1]:58202 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bjjrH-00008i-IO
	for submit <at> debbugs.gnu.org; Tue, 13 Sep 2016 05:18:27 -0400
Received: from dd1012.kasserver.com ([85.13.128.8]:55258)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1bjjrF-00008a-Fc
 for 24416 <at> debbugs.gnu.org; Tue, 13 Sep 2016 05:18:26 -0400
Received: from localhost (178.113.16.242.wireless.dyn.drei.com
 [178.113.16.242])
 by dd1012.kasserver.com (Postfix) with ESMTPSA id 1FA491CA08D9;
 Tue, 13 Sep 2016 11:18:24 +0200 (CEST)
Date: Tue, 13 Sep 2016 11:18:22 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: "Thompson, David" <dthompson2@HIDDEN>
Subject: Re: bug#24416: avr-gcc@5 is broken
Message-ID: <20160913111822.3da1c609@HIDDEN>
In-Reply-To: <CAJ=RwfbNiMfy7CCFT_qJDrT-Reci7DSXmBSODaT96ofGtwrMTg@HIDDEN>
References: <CAJ=RwfbF+75d=E+mZ-_nNoHnRYL7Uy8m=CsQRGTwLi6jDQ-b4w@HIDDEN>
 <20160912084936.25713732@HIDDEN>
 <CAJ=RwfbNiMfy7CCFT_qJDrT-Reci7DSXmBSODaT96ofGtwrMTg@HIDDEN>
X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 24416
Cc: 24416 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Mon, 12 Sep 2016 11:29:11 -0400
"Thompson, David" <dthompson2@HIDDEN> wrote:

> On Mon, Sep 12, 2016 at 2:49 AM, Danny Milosavljevic
> <dannym@HIDDEN> wrote:
> > As a workaround,
> >
> > CPPFLAGS += -I${HOME}/.guix-profile/avr/include
> > LDFLAGS += -L${HOME}/.guix-profile/avr/lib/avr5 -L${HOME}/.guix-profile/avr/lib -B${HOME}/.guix-profile/avr/lib
> >
> > works with avr-gcc 5.3.0. Unfortunately I don't know enough about avr-gcc to be able to permanently fix it.
> >
> > I fixed part of it (I made it so that atmega32u4 exists in the first place) in master - but no idea what to do with the search path.
> >
> > I'm pretty sure that if it uses CROSS_CPATH it's incorrect because cross-base has been changed from CROSS_CPATH to CROSS_C_INCLUDE_PATH, CROSS_CPLUS_INCLUDE_PATH etc in order to suppress warnings. If CROSS_C_INCLUDE_PATH overrides CROSS_CPATH (does it?) then setting CROSS_CPATH like avr.scm does does no good.
> >
> > I propose to change it to the following:
> >
> > diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
> > index 9873477..1e5fd73 100644
> > --- a/gnu/packages/avr.scm
> > +++ b/gnu/packages/avr.scm
> > @@ -59,9 +59,18 @@
> >                   #t))))
> >           ((#:configure-flags flags)
> >            `(delete "--disable-multilib" ,flags))))
> > -      (native-search-paths
> > +      (native-search-paths
> >         (list (search-path-specification
> > -              (variable "CROSS_CPATH")
> > +              (variable "CROSS_C_INCLUDE_PATH")
> > +              (files '("avr/include")))
> > +             (search-path-specification
> > +              (variable "CROSS_CPLUS_INCLUDE_PATH")
> > +              (files '("avr/include")))
> > +             (search-path-specification
> > +              (variable "CROSS_OBJC_INCLUDE_PATH")
> > +              (files '("avr/include")))
> > +             (search-path-specification
> > +              (variable "CROSS_OBJCPLUS_INCLUDE_PATH")
> >                (files '("avr/include")))
> >               (search-path-specification
> >                (variable "CROSS_LIBRARY_PATH")  
> 
> I don't know if this will have the intended effect and I cannot
> experiment with it right now.  Could you test?  

(The patch: ) Can't test it right now (out of disk space; updating 2 GB texmf is really annoying) - but I tested it in the past and it wasn't sufficient. On the other hand, before the patch is applied, cross-gcc and avr.scm set *different* variables and that's probably incorrect.

> The LDFLAGS above
> include the path to the device-specific object files (/avr5), but
> avr-gcc is supposed to be able to figure that out on its own using a
> "normal" library path, so I'm skeptical that simply changing the
> search paths for the package is enough.

I've used these LDFLAGS (actually used them as global flags for all gcc invocations) for some weeks with daily success. Also, the "-B" is necessary.

I think that the "native-search-paths" only affect the build system.

As far as I understand, avr-gcc is a "native" compiler in the sense of it-shouldn't-try-to-build-all-Guix-packages-for-it. And it's certainly set up as a "native" compiler. But that means that the avr-gcc port has to hack the search path that gcc usually uses for native compilers to make it search something else - not sure where they do and why it doesn't work for us. It would be good to locate this part.

The atmega32u4 comes from avr-libc (!) - that's why I changed avr-libc to use the same compiler (already in master for some months). That made it work much better.

I hope someone can shed a light on this.




Information forwarded to bug-guix@HIDDEN:
bug#24416; Package guix. Full text available.

Message received at 24416 <at> debbugs.gnu.org:


Received: (at 24416) by debbugs.gnu.org; 12 Sep 2016 15:29:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 12 11:29:30 2016
Received: from localhost ([127.0.0.1]:57818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bjTAj-0004nr-Cr
	for submit <at> debbugs.gnu.org; Mon, 12 Sep 2016 11:29:30 -0400
Received: from mail-yb0-f174.google.com ([209.85.213.174]:33171)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dthompson2@HIDDEN>) id 1bjTAd-0004nZ-2c
 for 24416 <at> debbugs.gnu.org; Mon, 12 Sep 2016 11:29:23 -0400
Received: by mail-yb0-f174.google.com with SMTP id n11so6434188yba.0
 for <24416 <at> debbugs.gnu.org>; Mon, 12 Sep 2016 08:29:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=worcester-edu.20150623.gappssmtp.com; s=20150623;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
 :cc:content-transfer-encoding;
 bh=mwEbH15WslEEt//Movkqn91SUSoClhb/pD/R2uCjeT0=;
 b=u/tRU/cBvQkkaHNWCOPFHCbOFXdCqdoLpizhIl6Y5oLTMkZFRvR6qcqrtpcircDPvn
 Fo8R/gY6evky+zmJZdv1xLVFk8UyUPFhvIMw3JlV24Pa5Kk10k2H+2I4AB0PipgVEwAy
 1YqrRCb3Bq8KiPT/VWwnG8ds55N32uL5/tiMdxLc1B8405lBG7Wvpz1ebtCJOF908WNC
 y9UiHY5qGxbQ+dHnrhR/aOZ1t9ooyeYCioC66Zdzz3UgVCvqyiSyUpNBIdI+0nH4ze/8
 M9M/PT5FbVzBxxeXNcDdR0XJ7PS5vN/eD0MfqZsGy5ivPG3075chYkE63joVduL7bP5J
 b9Ag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=mwEbH15WslEEt//Movkqn91SUSoClhb/pD/R2uCjeT0=;
 b=US8g9hy5dMzGOF3HA9eNXVcXGB4eDGg08u1fDQ65Q1AClC6i+DkcIWneNlNP4uoGDR
 efwYPIdIR3+DSbL8UJ2ZHgxCq1IaYYlrtIAutTpJw3pBgnHs7U+mL0qX9Jxh++kzy03g
 RTZxBR3Cte5vrEUKF5X1FTBkVuQadIcVgR9RDkB2tJbFhUHdeqJwq+/uUSCK6IzS+1FJ
 KP8MvccDDR/JoPDnSrlupyRlv33B+9qo+BkxIEQzg4loHYHInkkC7UU2wiTqlra87uvx
 /4KqgA2jAAuXnjOoSpNPR7KJxhsqVXjVlow8PnHHwZFPrM96h+nUpf9FnRyMkdKkAWMV
 6HAw==
X-Gm-Message-State: AE9vXwMD3o3hXdgs3CYHzbVqh7AmSWF7tTLW9Sn247F9kS4p4qL+b1ZJzPv+JUL8pym+kPsX604Lxc5yq6AyvDuD
X-Received: by 10.31.188.144 with SMTP id m138mr12905228vkf.84.1473694152358; 
 Mon, 12 Sep 2016 08:29:12 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.31.158.88 with HTTP; Mon, 12 Sep 2016 08:29:11 -0700 (PDT)
In-Reply-To: <20160912084936.25713732@HIDDEN>
References: <CAJ=RwfbF+75d=E+mZ-_nNoHnRYL7Uy8m=CsQRGTwLi6jDQ-b4w@HIDDEN>
 <20160912084936.25713732@HIDDEN>
From: "Thompson, David" <dthompson2@HIDDEN>
Date: Mon, 12 Sep 2016 11:29:11 -0400
Message-ID: <CAJ=RwfbNiMfy7CCFT_qJDrT-Reci7DSXmBSODaT96ofGtwrMTg@HIDDEN>
Subject: Re: bug#24416: avr-gcc@5 is broken
To: Danny Milosavljevic <dannym@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.2 (/)
X-Debbugs-Envelope-To: 24416
Cc: 24416 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.2 (/)

On Mon, Sep 12, 2016 at 2:49 AM, Danny Milosavljevic
<dannym@HIDDEN> wrote:
> As a workaround,
>
> CPPFLAGS +=3D -I${HOME}/.guix-profile/avr/include
> LDFLAGS +=3D -L${HOME}/.guix-profile/avr/lib/avr5 -L${HOME}/.guix-profile=
/avr/lib -B${HOME}/.guix-profile/avr/lib
>
> works with avr-gcc 5.3.0. Unfortunately I don't know enough about avr-gcc=
 to be able to permanently fix it.
>
> I fixed part of it (I made it so that atmega32u4 exists in the first plac=
e) in master - but no idea what to do with the search path.
>
> I'm pretty sure that if it uses CROSS_CPATH it's incorrect because cross-=
base has been changed from CROSS_CPATH to CROSS_C_INCLUDE_PATH, CROSS_CPLUS=
_INCLUDE_PATH etc in order to suppress warnings. If CROSS_C_INCLUDE_PATH ov=
errides CROSS_CPATH (does it?) then setting CROSS_CPATH like avr.scm does d=
oes no good.
>
> I propose to change it to the following:
>
> diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
> index 9873477..1e5fd73 100644
> --- a/gnu/packages/avr.scm
> +++ b/gnu/packages/avr.scm
> @@ -59,9 +59,18 @@
>                   #t))))
>           ((#:configure-flags flags)
>            `(delete "--disable-multilib" ,flags))))
> -      (native-search-paths
> +      (native-search-paths
>         (list (search-path-specification
> -              (variable "CROSS_CPATH")
> +              (variable "CROSS_C_INCLUDE_PATH")
> +              (files '("avr/include")))
> +             (search-path-specification
> +              (variable "CROSS_CPLUS_INCLUDE_PATH")
> +              (files '("avr/include")))
> +             (search-path-specification
> +              (variable "CROSS_OBJC_INCLUDE_PATH")
> +              (files '("avr/include")))
> +             (search-path-specification
> +              (variable "CROSS_OBJCPLUS_INCLUDE_PATH")
>                (files '("avr/include")))
>               (search-path-specification
>                (variable "CROSS_LIBRARY_PATH")

I don't know if this will have the intended effect and I cannot
experiment with it right now.  Could you test?  The LDFLAGS above
include the path to the device-specific object files (/avr5), but
avr-gcc is supposed to be able to figure that out on its own using a
"normal" library path, so I'm skeptical that simply changing the
search paths for the package is enough.

Thanks,

- Dave




Information forwarded to bug-guix@HIDDEN:
bug#24416; Package guix. Full text available.

Message received at 24416 <at> debbugs.gnu.org:


Received: (at 24416) by debbugs.gnu.org; 12 Sep 2016 06:49:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 12 02:49:41 2016
Received: from localhost ([127.0.0.1]:56977 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bjL3l-0007mI-BI
	for submit <at> debbugs.gnu.org; Mon, 12 Sep 2016 02:49:41 -0400
Received: from dd1012.kasserver.com ([85.13.128.8]:44706)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1bjL3k-0007mB-4o
 for 24416 <at> debbugs.gnu.org; Mon, 12 Sep 2016 02:49:40 -0400
Received: from localhost (178.113.74.213.wireless.dyn.drei.com
 [178.113.74.213])
 by dd1012.kasserver.com (Postfix) with ESMTPSA id 1956C1CA0584;
 Mon, 12 Sep 2016 08:49:38 +0200 (CEST)
Date: Mon, 12 Sep 2016 08:49:36 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: "Thompson, David" <dthompson2@HIDDEN>
Subject: Re: bug#24416: avr-gcc@5 is broken
Message-ID: <20160912084936.25713732@HIDDEN>
In-Reply-To: <CAJ=RwfbF+75d=E+mZ-_nNoHnRYL7Uy8m=CsQRGTwLi6jDQ-b4w@HIDDEN>
References: <CAJ=RwfbF+75d=E+mZ-_nNoHnRYL7Uy8m=CsQRGTwLi6jDQ-b4w@HIDDEN>
X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 24416
Cc: 24416 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

As a workaround,

CPPFLAGS += -I${HOME}/.guix-profile/avr/include
LDFLAGS += -L${HOME}/.guix-profile/avr/lib/avr5 -L${HOME}/.guix-profile/avr/lib -B${HOME}/.guix-profile/avr/lib

works with avr-gcc 5.3.0. Unfortunately I don't know enough about avr-gcc to be able to permanently fix it.

I fixed part of it (I made it so that atmega32u4 exists in the first place) in master - but no idea what to do with the search path.

I'm pretty sure that if it uses CROSS_CPATH it's incorrect because cross-base has been changed from CROSS_CPATH to CROSS_C_INCLUDE_PATH, CROSS_CPLUS_INCLUDE_PATH etc in order to suppress warnings. If CROSS_C_INCLUDE_PATH overrides CROSS_CPATH (does it?) then setting CROSS_CPATH like avr.scm does does no good.

I propose to change it to the following:

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 9873477..1e5fd73 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -59,9 +59,18 @@
                  #t))))
          ((#:configure-flags flags)
           `(delete "--disable-multilib" ,flags))))
-      (native-search-paths
+      (native-search-paths
        (list (search-path-specification
-              (variable "CROSS_CPATH")
+              (variable "CROSS_C_INCLUDE_PATH")
+              (files '("avr/include")))
+             (search-path-specification
+              (variable "CROSS_CPLUS_INCLUDE_PATH")
+              (files '("avr/include")))
+             (search-path-specification
+              (variable "CROSS_OBJC_INCLUDE_PATH")
+              (files '("avr/include")))
+             (search-path-specification
+              (variable "CROSS_OBJCPLUS_INCLUDE_PATH")
               (files '("avr/include")))
              (search-path-specification
               (variable "CROSS_LIBRARY_PATH")




Information forwarded to bug-guix@HIDDEN:
bug#24416; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Sep 2016 23:24:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 11 19:24:40 2016
Received: from localhost ([127.0.0.1]:56842 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bjE76-0005ao-Lr
	for submit <at> debbugs.gnu.org; Sun, 11 Sep 2016 19:24:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38331)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dthompson2@HIDDEN>) id 1bjE75-0005ab-3F
 for submit <at> debbugs.gnu.org; Sun, 11 Sep 2016 19:24:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1bjE6z-0008Ns-5i
 for submit <at> debbugs.gnu.org; Sun, 11 Sep 2016 19:24:33 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43728)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1bjE6z-0008Ng-2d
 for submit <at> debbugs.gnu.org; Sun, 11 Sep 2016 19:24:33 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57533)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1bjE6x-0004bF-0H
 for bug-guix@HIDDEN; Sun, 11 Sep 2016 19:24:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1bjE6t-0008Mu-Qw
 for bug-guix@HIDDEN; Sun, 11 Sep 2016 19:24:30 -0400
Received: from mail-vk0-f41.google.com ([209.85.213.41]:34527)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1bjE6t-0008Ju-Lb
 for bug-guix@HIDDEN; Sun, 11 Sep 2016 19:24:27 -0400
Received: by mail-vk0-f41.google.com with SMTP id v189so112216583vkv.1
 for <bug-guix@HIDDEN>; Sun, 11 Sep 2016 16:24:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=worcester-edu.20150623.gappssmtp.com; s=20150623;
 h=mime-version:from:date:message-id:subject:to;
 bh=XpyKlTtNzKENDaB6C7pvdEUKMdxAD8F73d0Fv+u+Aj8=;
 b=NNtqu3XtgPlqgs6g8G9ZdN/40EKX6BTMiLW3vwal5UYO74ahZ44wBk69Yd2jhef2MR
 BwG6q9vEB/w1zf/Vie3JrTzMtA373fv5f85Ad6h5R9s/TUrBWfWpcUrwThK21I9+OPFI
 qVO2sQubOQGQlOJTwtOxyNnDW4hnMYzzsYYsbAYAavWkAFjn2PSEZQq1Ezm+WpiC23Kv
 egAJE0IrWJ612DMvOaZq9Eq/uLCbPrtDX+Jrp+88xGadgEWBXKnow/2/stFZPpF3/Isb
 rEaFRwfn0g5HYyvGo4rseaZU+n3R93coAync7J5Q2GjHjMcEDK1fWMCYyEALqspRiYq3
 sezA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=XpyKlTtNzKENDaB6C7pvdEUKMdxAD8F73d0Fv+u+Aj8=;
 b=OfAGUrhBfFdWAW8QtHVxVkqXuG/hEvWoKBnbk/YJypIJA5QezO0cYRnjQ8edYaJy+9
 DQqV5HftI6Odc7rnwsaqxt0qExxTCagaa+ikWsYTCofR3nKfu5TAlDPhEoVlP/wyS8v0
 ulEW+ktjdHtSS5+IjfSEcHkON78x1Pq3h8+d4BNnnAKsQz5htifVusuc5gYJmCNXF35P
 mQeyjCWAGRuGgPWZLltI5EO8RqpsrNAtQZO6Jt7QdONMU/uYdO6GlGZq05FDvMk4Fxij
 msN2fLq55tSNNPVrG1SESz9ZOBBRhuHr0LAjBeL+EJ3qW5cZe5yCAPtxF7S1ZGA7rA7M
 l6+w==
X-Gm-Message-State: AE9vXwNsylYlzEM1tgHU2kdwqNplYvMbqgasWp/U99UT8LG7W2XTv9VIx226+YevYEh1kfTMMymM46Crhz9HCZDR
X-Received: by 10.31.188.144 with SMTP id m138mr9865869vkf.84.1473636185576;
 Sun, 11 Sep 2016 16:23:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.31.158.88 with HTTP; Sun, 11 Sep 2016 16:23:05 -0700 (PDT)
From: "Thompson, David" <dthompson2@HIDDEN>
Date: Sun, 11 Sep 2016 19:23:05 -0400
Message-ID: <CAJ=RwfbF+75d=E+mZ-_nNoHnRYL7Uy8m=CsQRGTwLi6jDQ-b4w@HIDDEN>
Subject: avr-gcc@5 is broken
To: bug-guix@HIDDEN
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

avr-gcc cannot find device-specific libraries when compiling, which
from my reading is due to a problem with multilib.  However, avr-gcc@4
works fine!

avr-gcc -O2 -DF_CPU=16000000UL -mmcu=atmega32u4 test.c -o test
avr-ld: cannot find -lm
avr-ld: cannot find -lc
avr-ld: cannot find -latmega32u4
collect2: error: ld returned 1 exit status

The libraries in question here are located within
/gnu/store/...-avr-libc-2.0.0/avr/lib/avr5 but avr-gcc is only
searching within /avr/lib.

For now, I'm just using avr-gcc@4 and moving on with life.

- Dave




Acknowledgement sent to "Thompson, David" <dthompson2@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#24416; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.