tech-pkg archive

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

Re: Using a replacement linker with pkgsrc

* On 2020-06-25 at 19:22 BST, Brook Milligan wrote:

> I am trying to build fonts/harfbuzz on a CentOS machine and am running into an issue with the linker.
> The problem occurs when the configure scripts checks if the compiler is working; it decides it is not.
> Harfbuzz has GCC_REQD=4.9 set, gcc49 is installed as a dependency, and it is run when configure is checking for a working compiler.  However, the following error is in config.log:
> configure:4516: checking whether the C compiler works
> configure:4538: cc -O2 -I/project/pkgsrc/pkg-2020Q1/include -I/project/pkgsrc/pkg-2020Q1/include/glib-2.0 -I/project/pkgsrc/pkg-2020Q1/include/gio-unix-2.0 -I/project/pkgsrc/pkg-2020Q1/lib/glib-2.0/include -I/usr/include -I/project/pkgsrc/pkg-2020Q1/include/freetype2 -I/project/pkgsrc/pkg-2020Q1/include -I/project/pkgsrc/pkg-2020Q1/include/glib-2.0 -I/project/pkgsrc/pkg-2020Q1/include/gio-unix-2.0 -I/project/pkgsrc/pkg-2020Q1/lib/glib-2.0/include -I/usr/include -I/project/pkgsrc/pkg-2020Q1/include/freetype2 -L/project/pkgsrc/pkg-2020Q1/gcc49/lib/gcc/x86_64-redhat-linux/4.9.4 -Wl,-R/project/pkgsrc/pkg-2020Q1/gcc49/lib/gcc/x86_64-redhat-linux/4.9.4 -L/project/pkgsrc/pkg-2020Q1/lib -Wl,-R/project/pkgsrc/pkg-2020Q1/lib -L/usr/lib64 -Wl,-R/usr/lib64 conftest.c  >&5
> /usr/bin/ld: cannot find -lgcc_s
> collect2: error: ld returned 1 exit status
> It seems that gcc49 is running the native linker in some way that prevents it from finding /usr/lib64/, which does exist.
> What should be done in a situation like this?  Is there a need to use a different linker somehow?  Any advice is welcome.

This might be a problem with the "always-libgcc" option in gcc
packages.  I'm yet to be convinced that this whole thing is a good
idea, and you may want to see if enabling the option (it's a bit
confusing in that it's an inverted option) helps.

Jonathan Perkin  -  Joyent, Inc.  -

Home | Main Index | Thread Index | Old Index