@@ -1928,6 +1928,34 @@ os_version:
1928
1928
1929
1929
Finally, note that the `aarch64` and `ppc64le` platforms already use CentOS 7.
1930
1930
1931
+ <a id="consequences-of-newer-c-stdlib-version"></a>
1932
+
1933
+ # ## Consequences of newer c_stdlib_version
1934
+
1935
+ If a library links a newer version of `c_stdlib_version`,
1936
+ the _runtime_ requirement on `__glibc` is applied,
1937
+ but it does not mean downstream dependencies will (or should) be built against the same version.
1938
+ The default `c_stdlib_version` is still `2.12` on linux-64.
1939
+ **A dependency on a newer c_stdlib_version does not mean dependents must also use that version**.
1940
+ However, to build a package with `c_stdlib_version=2.12` that links a library built with `c_stdlib_version=2.17`,
1941
+ the linker flag `-Wl,--allow-shlib-undefined` must be specified.
1942
+ Without `--allow-shlib-undefined`, you may see errors like :
1943
+
1944
+ ` ` `
1945
+ ld: $PREFIX/lib/libc++abi.so: undefined reference to ` memcpy@GLIBC_2.14'
1946
+ ld : $PREFIX/lib/libpmix.so.2: undefined reference to `clock_gettime@GLIBC_2.17'
1947
+ ` ` `
1948
+
1949
+ This flag is in conda-forge's default $LDFLAGS, so most recipes should not have any issue.
1950
+ If they do, it means $LDFLAGS is not being handled consistently,
1951
+ which is probably something feedstock and/or package maintainers should consider fixing.
1952
+
1953
+ There is more nuance in runtime compilation in user environments,
1954
+ which are also affected by the default version of ` sysroot_linux-64` being 2.12.
1955
+ The `gcc` package does not set environment variables $CC, $LDFLAGS, etc..
1956
+ To set these variables on environment activation, install the `c-compiler` package (or `gcc_linux-64` on linux-64),
1957
+ or set them by hand in the environment, or avoid the issue by specifying `sysroot_linux-64>=2.17` in the environment.
1958
+
1931
1959
<a id="cuda"></a>
1932
1960
1933
1961
<a id="cuda-builds"></a>
0 commit comments