GNU bug report logs - #47325
newlib-nano: are lib names wrong?

Previous Next

Package: guix;

Reported by: Nicolò Balzarotti <anothersms <at> gmail.com>

Date: Mon, 22 Mar 2021 17:17:02 UTC

Severity: normal

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Nicolò Balzarotti <anothersms <at> gmail.com>
Subject: bug#47325: closed (Re: [PATCH] gnu: newlib-nano: Fix nano lib and
 header paths)
Date: Tue, 13 Apr 2021 11:37:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#47325: newlib-nano: are lib names wrong?

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 47325 <at> debbugs.gnu.org.

-- 
47325: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47325
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Efraim Flashner <efraim <at> flashner.co.il>
To: Morgan.J.Smith <at> outlook.com
Cc: 47325-done <at> debbugs.gnu.org, anothersms <at> gmail.com
Subject: Re: [PATCH] gnu: newlib-nano: Fix nano lib and header paths
Date: Mon, 12 Apr 2021 11:25:06 +0300
[Message part 3 (text/plain, inline)]
On Thu, Apr 08, 2021 at 09:02:20AM -0400, Morgan.J.Smith <at> outlook.com wrote:
> From: Morgan Smith <Morgan.J.Smith <at> outlook.com>
> 
> * gnu/packages/embedded.scm (newlib-nano-arm-none-eabi)[arguments]: Hard link
> library files from *.a to *_nano.a. Hard link newlib.h to a common location.
> ---
> 
> I CC'd Efraim because they commited my last gcc-arm-none-eabi patch. I hope
> that's ok. I'm not really sure who is responsible for this toolchain.
> 
> I successfully compiled some QMK firmware using this patch, something that
> failed previously.
> 

No one is really in charge of the cross toolchains, it's more of when it
becomes relevant to someone and it's time to fix something.

It looks good to me, I made a small change, changing link to symlink and
made the link relative. I thought about factoring out 'lib' or '.a' from
the find-files but ultimately decided against it, I think it's probably
easier to read as-is.

Patch pushed! Feel free to tag me on other ones like this too.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Nicolò Balzarotti <anothersms <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: newlib-nano: are lib names wrong?
Date: Mon, 22 Mar 2021 18:15:52 +0100
Hi guix!

A program I'm packaging requires newlib-nano, but when building, the
linker fails to find g_nano and c_nano.

I found out those names are taken from the nano.specs file we install
> cat $(guix build newlib-nano)/arm-none-eabi/lib/nano.specs | grep -- -l

-lc_nano
%{specs=rdimon.specs:-lrdimon_nano} %{specs=nosys.specs:-lnosys}
%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano)
%:replace-outfile(-lrdimon -lrdimon_nano) %:replace-outfile(-lstdc++ -lstdc++_nano)
%:replace-outfile(-lsupc++ -lsupc++_nano)
%{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}}

However, those files are missing:
> ls $(guix build newlib-nano)/arm-none-eabi/lib/ | grep lib

libc.a
libg.a
libgloss-linux.a
libm.a
libnosys.a
librdimon.a
librdimon-v2m.a
librdpmon.a

I was able to build the program by modifing the .specs file with:

(add-after 'install 'remove-suffix
           (lambda* (#:key outputs #:allow-other-keys)
             (substitute*
                 (string-append
                  (assoc-ref outputs "out")
                  "/arm-none-eabi/lib/nano.specs")
               (("_nano") ""))
             #t))

But reading online, it seems the _nano is a common suffix.  Should we
rename the output libs?  Should we symlink?  I know nothing about this,
but it might be a bug.

Thanks! Nicolò



This bug report was last modified 4 years and 96 days ago.

Previous Next


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