Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions recipe/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ build:
requirements:
build:
- ${{ compiler("cxx") }}
- if: linux
then:
- ${{ stdlib("c") }}
- cmake
- make
host:
Expand Down
2 changes: 2 additions & 0 deletions recipe/variants-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cxx_compiler_version:
- "10.4"
5 changes: 5 additions & 0 deletions recipe/variants.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
zip_keys:
- [libarrow, libparquet]

c_stdlib:
- sysroot
c_stdlib_version:
- "2.17"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.31 and the package requires libstdcxx >=16 and libgcc >=16.
  • With the pin (gcc 10.4), the module needs only GLIBCXX_3.4.21 and the package requires libstdcxx-ng >=12 and libgcc-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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


libarrow:
- "20.0"
- "21.0"
Expand Down