GNU bug report logs -
#68058
[PATCH] gnu: cross-gcc-toolchain: Add native-search-paths.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68058 in the body.
You can then email your comments to 68058 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#68058
; Package
guix-patches
.
(Wed, 27 Dec 2023 12:11:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Wed, 27 Dec 2023 12:11:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/cross-base.scm (cross-gcc-toolchain): Add
native-search-paths.
Change-Id: Ib4cc510fde71b8d3140e1001c3931f74300da8a0
---
gnu/packages/cross-base.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 6ee7b315d8..dc6f7922d6 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -760,6 +760,7 @@ (define* (cross-gcc-toolchain/implementation target
(((names . directory) ...)
(union-build #$output directory))))))
(inputs `(,xbinutils ,xgcc ,@(if libc (list libc) '())))
+ (native-search-paths (package-search-paths xgcc))
(home-page (package-home-page xgcc))
(synopsis
(format #f "Complete GCC tool chain for C/C++ development (~a)" target))
base-commit: 756ba0429e84ee0f8ce30484439b78c00c61d286
--
2.41.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68058
; Package
guix-patches
.
(Tue, 09 Apr 2024 22:52:03 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
[ What I'm saying here is a duplicate of what I just sent in issue
#69394, but I think it's useful to have these comments together with
the patch, to facilitate discussion about it. ]
Jean-Pierre De Jesus DIAZ via Guix-patches via <guix-patches <at> gnu.org> writes:
> * gnu/packages/cross-base.scm (cross-gcc-toolchain): Add
> native-search-paths.
>
> Change-Id: Ib4cc510fde71b8d3140e1001c3931f74300da8a0
> ---
> gnu/packages/cross-base.scm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
> index 6ee7b315d8..dc6f7922d6 100644
> --- a/gnu/packages/cross-base.scm
> +++ b/gnu/packages/cross-base.scm
> @@ -760,6 +760,7 @@ (define* (cross-gcc-toolchain/implementation target
> (((names . directory) ...)
> (union-build #$output directory))))))
> (inputs `(,xbinutils ,xgcc ,@(if libc (list libc) '())))
> + (native-search-paths (package-search-paths xgcc))
> (home-page (package-home-page xgcc))
> (synopsis
> (format #f "Complete GCC tool chain for C/C++ development (~a)" target))
>
> base-commit: 756ba0429e84ee0f8ce30484439b78c00c61d286
Today I ran into the problem described in issue 69394 with a custom
aarch64-linux-gnu cross toolchain:
$ aarch64-linux-gnu-gcc -o ~/tmp/hello -g ~/tmp/hello.c
aarch64-linux-gnu-ld: cannot find crt1.o: No such file or directory
aarch64-linux-gnu-ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
And I was able to fix it by locally applying the patch above. Thank you!
IMHO this patch should be applied.
In issue 69394 you wrote that this solution doesn't work when there are
multiple cross toolchains installed on the same profile (the CROSS_
environment variables would have all the cross toolchains), but I think
that moving from allowing zero cross toolchain installed in the
profile¹ to one cross toolchain installed is already an improvement. :-)
--
Thiago
¹ Except for bare-metal cross toolchains, which IIUC don't have this
problem because they don't use crt*.o files?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68058
; Package
guix-patches
.
(Tue, 09 Apr 2024 22:52:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68058
; Package
guix-patches
.
(Wed, 10 Apr 2024 09:47:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 68058 <at> debbugs.gnu.org (full text, mbox):
Hi Thiago,
>In issue 69394 you wrote that this solution doesn't work when there are
>multiple cross toolchains installed on the same profile (the CROSS_
>environment variables would have all the cross toolchains), but I think
>that moving from allowing zero cross toolchain installed in the
>profile¹ to one cross toolchain installed is already an improvement. :-)
And
>¹ Except for bare-metal cross toolchains, which IIUC don't have this
> problem because they don't use crt*.o files?
It's only a problem with the platforms that provide a C standard library so
bare-metal ones are unaffected. However some of the bare-metal targets
provide a C standard library like `avr' or `arm-none-eabi' which I'm still
working on, they both provide AVR Libc and Newlib respectively and suffer
from the same problem.
That said there's no downside on the patch other than the bad user
experience IMO, but the bad UX is already there anyway but I think also
this should be merged so that we can start making progress towards
having more functional cross toolchain packages.
On Tue, Apr 9, 2024 at 10:44 PM Thiago Jung Bauermann
<thiago.bauermann <at> linaro.org> wrote:
>
>
> Hello,
>
> [ What I'm saying here is a duplicate of what I just sent in issue
> #69394, but I think it's useful to have these comments together with
> the patch, to facilitate discussion about it. ]
>
> Jean-Pierre De Jesus DIAZ via Guix-patches via <guix-patches <at> gnu.org> writes:
>
> > * gnu/packages/cross-base.scm (cross-gcc-toolchain): Add
> > native-search-paths.
> >
> > Change-Id: Ib4cc510fde71b8d3140e1001c3931f74300da8a0
> > ---
> > gnu/packages/cross-base.scm | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
> > index 6ee7b315d8..dc6f7922d6 100644
> > --- a/gnu/packages/cross-base.scm
> > +++ b/gnu/packages/cross-base.scm
> > @@ -760,6 +760,7 @@ (define* (cross-gcc-toolchain/implementation target
> > (((names . directory) ...)
> > (union-build #$output directory))))))
> > (inputs `(,xbinutils ,xgcc ,@(if libc (list libc) '())))
> > + (native-search-paths (package-search-paths xgcc))
> > (home-page (package-home-page xgcc))
> > (synopsis
> > (format #f "Complete GCC tool chain for C/C++ development (~a)" target))
> >
> > base-commit: 756ba0429e84ee0f8ce30484439b78c00c61d286
>
> Today I ran into the problem described in issue 69394 with a custom
> aarch64-linux-gnu cross toolchain:
>
> $ aarch64-linux-gnu-gcc -o ~/tmp/hello -g ~/tmp/hello.c
> aarch64-linux-gnu-ld: cannot find crt1.o: No such file or directory
> aarch64-linux-gnu-ld: cannot find crti.o: No such file or directory
> collect2: error: ld returned 1 exit status
>
> And I was able to fix it by locally applying the patch above. Thank you!
>
> IMHO this patch should be applied.
>
> In issue 69394 you wrote that this solution doesn't work when there are
> multiple cross toolchains installed on the same profile (the CROSS_
> environment variables would have all the cross toolchains), but I think
> that moving from allowing zero cross toolchain installed in the
> profile¹ to one cross toolchain installed is already an improvement. :-)
>
> --
> Thiago
>
> ¹ Except for bare-metal cross toolchains, which IIUC don't have this
> problem because they don't use crt*.o files?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68058
; Package
guix-patches
.
(Wed, 10 Apr 2024 09:47:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68058
; Package
guix-patches
.
(Thu, 16 May 2024 18:41:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 68058 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi!
I ran into the same problem as Thiago Jung Bauerman. Also with an
aarch64-linux-gnu
toolchain. Therefore i am also in favor to merge this patch.
Thanks for the work.
Best regards
Christoph
[Message part 2 (text/html, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68058
; Package
guix-patches
.
(Fri, 06 Sep 2024 21:13:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 68058 <at> debbugs.gnu.org (full text, mbox):
Hello everyone,
I am currently trying to do some stuff around the arm-none-eabi toolchain,
namely also adding the 12.3 gcc toolchain. I am facing a problem with
this. Currently the `search-paths` of xgcc also include "include",
"include/c++", "lib" and "lib64" instead of just the ones under
"$target/include", ... Because of this, and mainly because they
come first, newlib doesn't build as it picks up wrong included file.
This is easily fixed by not adding the top-level include and lib,
but only the ones under the target.
Do you happen to know why the search-paths contain these for the
cross builds? And even if that is sensible, is this really the way
to go even for native-search-paths, shouldn't the top ones
be removed, or at least moved after the ones under target?
Regards,
Rutherther
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68058
; Package
guix-patches
.
(Sun, 20 Apr 2025 23:49:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 68058 <at> debbugs.gnu.org (full text, mbox):
Hi Jean-Pierre,
Pushed as f484aea2e8.
Thanks,
-- Ian
bug closed, send any further explanations to
68058 <at> debbugs.gnu.org and Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
Request was from
Ian Eure <ian <at> retrospec.tv>
to
control <at> debbugs.gnu.org
.
(Sun, 20 Apr 2025 23:49:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 19 May 2025 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.