Repository navigation
Conversation
…++ (e.g. Ubuntu 20) Pin the conda sysroot glibc floor and cxx_compiler_version, and set LD_LIBRARY_PATH on activate/deactivate so the package's own libarrow/libstdc++ are preferred over the host's older ones.
|
Hold off - there's a few things I need to cover |
| c_stdlib: | ||
| - sysroot | ||
| c_stdlib_version: | ||
| - "2.17" |
There was a problem hiding this comment.
Don't quite understand this.
You should be picking up the conda versions of libgcc/libstdc++ at build and runtime (not the system ones)
What's the issue?
There was a problem hiding this comment.
This is about glibc, which conda does not ship. The sysroot used at build time sets the minimum glibc the module's .so needs on the host. Before the pin, our CI on Ubuntu 20.04 (glibc 2.31) failed with:
no kexport: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by .../lib/q/mod/kx/arrow/clib.li64.so)
With c_stdlib: sysroot / c_stdlib_version: "2.17" the module needs at most GLIBC_2.14 (checked with readelf -V on the built clib.li64.so), and the package declares __glibc >=2.17. A newer glibc is backward compatible, so it still works on 22.04, 24.04 and later.
On libgcc/libstdc++: at runtime the env's copies are used. The related change is the cxx_compiler_version: "10.4" pin in variants-linux.yaml. I built the package with and without it:
- Without the pin (gcc 16.2), the module needs
GLIBCXX_3.4.31and the package requireslibstdcxx >=16andlibgcc >=16. - With the pin (gcc 10.4), the module needs only
GLIBCXX_3.4.21and the package requireslibstdcxx-ng >=12andlibgcc-ng >=12.
So the pin lowers both the module's own libstdc++ symbol requirement and the minimum runtime dependency, which keeps the package installable next to other packages in older envs. The glibc requirement is identical in both builds.
There was a problem hiding this comment.
I suspected you might be referring to glibc (i.e. libc.so) but wasn't quite sure.
That's one on the core libraries which conda doesn't provide - it relies on the system version.
Bizarrely I'm on ubuntu:20 but didn't see this problem with q-kx-arrow.
So yes, it makes sense to tie the GLIBC version as low as possible to keep it compatible with older distros.
But a concern would be that it would limits the maximum c++ version available which may cause other problems, such as certain features becoming unavailable in the third party libraries. That in turn could have implications for the module itself if it uses those features.
Let me take this away because it requires more investigation.
Closes #47
The Linux conda build currently picks up glibc/libstdc++ versions newer
than some target environments (e.g. Ubuntu 20) provide, causing load
failures at runtime.
Pins the conda sysroot glibc floor and
cxx_compiler_version, and setsLD_LIBRARY_PATHvia activate/deactivate scripts so the package's ownlibarrow/libstdc++are preferred over the host's older ones.