This has to do with how the Linux version is being built. The Alright Devices Shared library won’t load on machines running LTE versions of common distros. The error message is here:
[0.240 warn src/plugin.cpp:90] Failed to load library /home/kwilliams/.Rack/plugins/AlrightDevices/plugin.so: /lib64/libm.so.6: version `GLIBC_2.27’ not found (required by /home/kwilliams/.Rack/plugins/AlrightDevices/plugin.so)
This may be a problem only I encounter but in the past Andrew Belt has worked out how to solve this problem in the past. There are particular linker flags that need to be used; does anyone know what they are so that I can contact Alright directly?
If I remember correctly, that is the error I got when compiling in Ubuntu 18 instead of 16. Went back to 16 and all was well, but this may not be your issue.
@chaircrusher Are you using Ubuntu 16? I’ve recompiled with linkage to an older glibc version but I don’t have xenial installed anywhere at the moment. Would you mind testing it before I send it along to Andrew?
The latest Alright Devices plugin Linux build from the library (2.1.0) seems to have again the same problem. When I update it to this version, the plugin doesn’t load and I get the following warning in the log:
[0.131 info src/plugin.cpp:130 loadPlugin] Loading plugin from /home/darchillus/.Rack2/plugins-lin-x64/AlrightDevices
[0.132 warn src/plugin.cpp:196 loadPlugin] Could not load plugin /home/darchillus/.Rack2/plugins-lin-x64/AlrightDevices: Failed to load library /home/darchillus/.Rack2/plugins-lin-x64/AlrightDevices/plugin.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/darchillus/.Rack2/plugins-lin-x64/AlrightDevices/plugin.so)
I’,m working on Linux Mint 20.2 (based on Ubuntu 20.04 LTS).
Looks like the plugin has been build using a too recent version of GLIBC, making it incompatible with Linux distributions that are slightly older (but still used a lot)…
I’ll describe the issue and my solution here so we can avoid this situation:
I was using this library to link to glibc 2.23 (the one that ships with Ubuntu 16.04) and I had last compiled the plugin on Ubuntu 20.04. This time though, I compiled on 22.04 and some newer glibc symbols slipped in:
$ nm -C ./build/artifact/x64/plugin.so | grep GLIBC
U abort@GLIBC_2.2.5
U __assert_fail@GLIBC_2.2.5
U cbrtf@GLIBC_2.2.5
U __cxa_atexit@GLIBC_2.2.5
w __cxa_finalize@GLIBC_2.2.5
U dl_iterate_phdr@GLIBC_2.2.5
U exp2f@GLIBC_2.2.5
U free@GLIBC_2.2.5
U __libc_single_threaded@GLIBC_2.32
U log2f@GLIBC_2.2.5
U lroundf@GLIBC_2.2.5
U malloc@GLIBC_2.2.5
U memcpy@GLIBC_2.14
w __pthread_key_create@GLIBC_2.34
w pthread_mutex_lock@GLIBC_2.2.5
w pthread_mutex_unlock@GLIBC_2.2.5
w pthread_once@GLIBC_2.34
U __stack_chk_fail@GLIBC_2.4
U strlen@GLIBC_2.2.5
You can see there’s one symbol from 2.32 and two from 2.34.
To solve, I simply fired up an ubuntu:focal Docker container and compiled from there.
Yes, don’t use glibc_version_header in your Rack plugin. It does not work and was removed from the Rack SDK in 2019. Instead use the VCV Rack Plugin Toolchain to build your plugin for all architectures with a single command.