@@ -393,6 +393,58 @@ as opposed to generating feedstocks for them. (Note that historically we did use
393
393
practice has been deprecated.) To add a new CDT, make a PR on the
394
394
`conda-forge/cdt-builds <https://github.com/conda-forge/cdt-builds >`__ repo.
395
395
396
+ Why are CDTs bad?
397
+ ^^^^^^^^^^^^^^^^^
398
+
399
+ 1. CDTs repackage old versions of the library.
400
+ 2. As a result, newer functionality in the packages won't be used by downstream conda packages
401
+ which check for the version of the library being built against.
402
+ For example: OpenGL functionality from the CentOS 6/7 packaged library is available, but
403
+ any newer functionality cannot be used.
404
+ 3. We have no guarantees that the version provided by the user's system is compatible.
405
+ We only have the ``__glibc>=2.17 `` constraint and we assume that CentOS 6/7's
406
+ lower bound of GLIBC and its corresponding lower bound of the CDT are equivalent.
407
+ 4. We have no guarantee that the library is provided by the user's system at all.
408
+
409
+ When should CDTs be used?
410
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
411
+
412
+ 1. When there are system specific configurations are used by the library.
413
+ Some examples include:
414
+
415
+ a. OpenGL: if we provided the OpenGL loader library ``libglvnd ``.
416
+ and the user's system is not using ``libglvnd ``, then we cannot load the vendor-specific
417
+ implementations losing out on accelerator/hardware optimized performance.
418
+ (This is only on old distributions and we may finally be able to package ``libglvnd ``
419
+ ourselves)
420
+ b. linux-pam: This is a library that allows pluggable authentication modules and the
421
+ configuration files for these modules usually live in ``/etc/pam.d ``. The issue is that
422
+ the pluggable modules live in a distro specific location. For example:
423
+ ``/usr/lib/x86_64-linux-gnu/security/ ``. The default modules are built into the
424
+ conda package in ``$CONDA_PREFIX/lib/security ``, but custom ones for
425
+ system-wide configuration are installed into ``/usr/lib/x86_64-linux-gnu/security/ ``.
426
+ So, we would need to patch the module to look into both, but the directory
427
+ ``/usr/lib/x86_64-linux-gnu/security/ `` is distro specific and will be hard to
428
+ detect.
429
+
430
+ 2. When a conda packaged library will not work properly.
431
+ For example: a new ``glibc `` package means we would have to edit the elf interpreter of
432
+ all the conda package binaries.
433
+
434
+ What's are some good examples?
435
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
436
+
437
+ 1. The OpenCL loader (``ocl-icd `` together with ``ocl-icd-system ``) provides an OpenCL
438
+ loading library. The loader will look at OpenCL implementations given in
439
+ ``$CONDA_PREFIX/etc/OpenCL/vendors ``.
440
+ For example: Pocl is a conda packaged implementation that runs OpenCL on the CPU. Vendor
441
+ specific implementations like the NVIDIA OpenCL or ROCm OpenCL are not conda packaged, so we
442
+ have to rely on the system. By installing ``ocl-icd-system `` we enable the loader to look at
443
+ the configuration in ``/etc/OpenCL/vendors ``, which is the configuration directory for all linux
444
+ distributions. This gives us the best of both worlds. You don't need a system level package to
445
+ run OpenCL because we have a conda packaged installation, but if there is a system wide
446
+ implementation that is accelerated by specific hardware, we can use those.
447
+
396
448
In conda-forge the primary usages of CDTs is currently for packages that link against libGL.
397
449
398
450
libGL
0 commit comments