AnacondaRecipes / repodata-hotfixes

Changes to package metadata to fix behavior
BSD 3-Clause "New" or "Revised" License
14 stars 20 forks source link

Set bounds on libgcc-ng, libstdcxx-ng for GCC 7.3 linux-64 packages #126

Closed chenghlee closed 3 years ago

chenghlee commented 3 years ago

We recently added updated GCC compiler packages to the defaults channel; as part of that update process, we've switched our libgcc/libstdc++ linking from glibc 2.12 (CentOS 6) to glibc 2.17 (CentOS 7). This can lead to linker failures when using the older GCC 7.3 toolchain; e.g.,

$BUILD_PREFIX/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: $PREFIX/lib/libstdc++.so: undefined reference to `aligned_alloc@GLIBC_2.16'
$BUILD_PREFIX/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: $PREFIX/lib/libstdc++.so: undefined reference to `clock_gettime@GLIBC_2.17'
collect2: error: ld returned 1 exit status

We need to patch repodata.json on defaults so the older GCC 7.3 compilers don't try to pull in newer libgcc-ng and libstdcxx-ng packages. (Note that this constraint only applies to the compiler packages themselves; applications that depend on libgcc-ng and libstdcxx-ng should be fine, assuming they're being run systems with a recent enough version of glibc.)