pkgsrc-Users archive

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

Re: Build failure for lang/gcc9 on Linux

On Thu, Feb 4, 2021 at 5:04 PM <> wrote:
On Mon, Feb 01, 2021 at 11:28:31PM +0000, Morgan, Iain (ARC-TN)[InuTeq, LLC] wrote:
> Hello,
> I'm attempting to build lang/gcc9 from the 2020Q4 release on Linux. Specifically, I've tried on SLES 15, RHEL 7, and CentOS 7. The failure is identical on all three platforms.
> It appears as if /usr/include/dlfcn.h is not being included. Various symbols, such as RTLD_NOW, dlerror, and dlsym are not declared.
> The problem is isolated to lang/gcc9; I am able to build both lang/gcc8 and lang/gcc10 on these platforms. Admittedly, I have to add --without-zstd to CONFIGURE_ARGS for RHEL/CentOS, but that is a separate issue.
> --
> Iain Morgan

Hi Iain,

rillig@ wanted to try something new with lang/gcc9 - it's really nice to
have someone try to improve things, but the result turned out a good bit
less portable.

Are you looking into this because CentOS 7 ships an older compiler, and
some packages pull in a newer compiler from pkgsrc, and that compiler is
failing to build?

The canonical platform-specific workaround for Centos/RHEL 7 is to install an SCL that comes with a newer toolchain:

with the Centos Extras repo enabled, sudo yum install centos-release-scl

devtoolset-9 is the most recent for Centos 7 which IIRC is aligned with upstream RHSCL, providing a gcc 9.3 toolchain. This bootstraps pkgsrc fine (tested on RHEL 7 in Azure) I made some tweaks to bootstrap but only for rbac (vs user) install permissions.

$ sudo yum install devtoolset-9
$ scl enable devtoolset-9 bash
$ gcc -v
gcc version 9.3.1...

you can stick 

source scl_source enable devtoolset-9

in your .bashrc or whatever when you need to bootstrap and bmake

trunk has a workaround for this, I guess it has been sitting in tree
long enough that it's okay to backport it now.

I suspect that disabling fortify will also work around it

Home | Main Index | Thread Index | Old Index