Skip to content

Mule installation fails to use shumlib installed via CMake #30

Description

Mule can be installed with additional features such as UM spiral-search, packing, data_conv, etc extensions. Some of these extensions are available via shumlib open source which can be compiled during mule installation (assuming shumlib is available precompiled).

Recently shumlib has been updated to use CMake as a modern approach to build standard libraries. However, it currently lacks some shared libraries and header files when installed via CMake and mule installation fails e.g., like:

[INFO] Building ppibm module...
running build_ext
building 'um_ppibm.um_ieee2ibm32' extension
creating build
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/lib
creating build/temp.linux-x86_64-3.9/lib/um_ppibm
gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/lib64/python3.9/site-packages/numpy/core/include -I/......./SHUMLIB/include -I/usr/include/python3.9 -c lib/um_ppibm/um_ieee2ibm32.c -o build/temp.linux-x86_64-3.9/lib/um_ppibm/um_ieee2ibm32.o
lib/um_ppibm/um_ieee2ibm32.c:37:10: fatal error: c_shum_data_conv_version.h: No such file or directory
   37 | #include "c_shum_data_conv_version.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1

further, the linker also looks for the shared libraries in SHUMLIB_INSTALL_PREFIX/lib

[INFO] Building ppibm module...
running build_ext
building 'um_ppibm.um_ieee2ibm32' extension
creating build
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/lib
creating build/temp.linux-x86_64-3.9/lib/um_ppibm
gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/lib64/python3.9/site-packages/numpy/core/include -I/..../SHUMLIB/include -I/usr/include/python3.9 -c lib/um_ppibm/um_ieee2ibm32.c -o build/temp.linux-x86_64-3.9/lib/um_ppibm/um_ieee2ibm32.o
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/um_ppibm
gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g build/temp.linux-x86_64-3.9/lib/um_ppibm/um_ieee2ibm32.o -L/..../SHUMLIB/lib -L/usr/lib64 -Wl,--enable-new-dtags,-R/..../SHUMLIB/lib -lshum_string_conv -lshum_byteswap -lshum_data_conv -o build/lib.linux-x86_64-3.9/um_ppibm/um_ieee2ibm32.cpython-39-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lshum_data_conv
collect2: error: ld returned 1 exit status
error: command '/usr/bin/gcc' failed with exit code 1

... and so on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions