pkgsrc-Users archive

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

Re: Linker failing with gcc10



* 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