pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Linker failing with gcc10



I actually did add PKG_OPTIONS.gcc10= always-libgcc to my mk.conf in
my second build attempt and I confirmed before running bmake that the
setting was enabled. I didn't the first time because I didn't know
about it. Perhaps not removing the first install before trying a
second time was the problem. I will try again with removing the old
install and see if it works. Perhaps third time's the charm. Also, I
am on Linux if that changes things.

On Tue, Sep 28, 2021 at 2:16 AM Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
>
> * On 2021-09-28 at 06:36 BST, Justin Lim wrote:
>
> >I installed pkgsrc on an HPC environment with the intention of using
> >it as a non-root package manager. I successfully built (at least the
> >build went to completion) gcc10, but when I try to build any other
> >package or compile anything at all, I get the error /usr/bin/ld:
> >cannot find -lgcc_s. I have never built a compiler before so I don't
> >really know how to troubleshoot this. In the pkgsrc installed gcc10
> >lib64 directory I see there is a libgcc.a. I used a system gcc loaded
> >as a module to build gcc10 and the module lib directory has a
> >libgcc_s.so symlinked to libgcc_s.so.1. Perhaps that is the problem.
> >Is there a way to get the linker to stop looking for libgcc_s?
>
> The GCC packages have some weird libgcc handling to try and work around
> issues on NetBSD.  I strongly recommend you always build with the
> "always-libgcc" option enabled to avoid this.
>
> Without this option enabled, the libgcc_s files are deleted from the
> package, which is precisely why you're hitting this problem.
>
> The easiest way to do this is by adding this to mk.conf:
>
>    PKG_DEFAULT_OPTIONS+= always-libgcc
>
> however you will need to completely rebuild lang/gcc10 again, sorry.
>
> --
> Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index