-
Type: Bug
-
Status: Won't Fix (View Workflow)
-
Priority: Normal
-
Resolution: Won't Fix
-
Component/s: None
-
Labels:None
The agcc actor requires building a cython module for the external FLI camera library. That library uses the external libusb-1.0.so to actually connect to the device.
With rubin3-ics, the extension .so is built but does not then load libusb.
Bad:
(conda-ics) pfs-data@AGCC-OptiPlex-755:ics_agccActor-pfsdata$ ldd fli_camera.cpython-38-x86_64-linux-gnu.so linux-vdso.so.1 => (0x00007ffd177d8000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9688095000) /lib64/ld-linux-x86-64.so.2 (0x00007f968845e000)
Good:
(conda-ics) pfs-data@AGCC-OptiPlex-755:ics_agccActor-pfsdata$ ldd fli_camera.cpython-38-x86_64-linux-gnu.so linux-vdso.so.1 => (0x00007ffcde7f6000) libusb-1.0.so.0 => /software/conda/envs/rubin3_ics/lib/libusb-1.0.so.0 (0x00007f2fc1bad000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2fc165d000) libudev.so.1 => /software/conda/envs/rubin3_ics/lib/./libudev.so.1 (0x00007f2fc1b60000) libatomic.so.1 => /software/conda/envs/rubin3_ics/lib/./libatomic.so.1 (0x00007f2fc1b54000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2fc143f000) /lib64/ld-linux-x86-64.so.2 (0x00007f2fc1a26000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2fc1237000)
rubin3-ics switched from using the system compilers to using the conda compiler packages. These are set up by /software/conda/envs/rubin3_ics/etc/conda/activate.d/activate-gcc_linux-64.sh
One flag which conda adds is Wl,as-needed, and that is what causes the external libraries to be trimmed. I have not figured if that is really correct, nor how to bypass it. You can add -Wl,-no-as-needed to the extra_ld_args Extension arguments, but that is added too late in the gcc call: that argument needs to come before the listings of the object files and libraries. So the distutils quick fix does not work here, and I have not found a better one.
This cannot be right. Surely many Extensions out there require external libraries. So I am missing something.
If this is right, we can simply edit the /software/conda/envs/rubin3_ics/etc/conda/activate.d/activate-gcc_linux-64.sh file. Yuck.
- relates to
-
INSTRM-1615 RFC: Consider basing ICS on rubin-env conda/python environment
- Done