someguynamedjosh / audiobench

Open source modular synthesizer
https://someguynamedjosh.github.io/audiobench/
GNU General Public License v3.0
77 stars 2 forks source link

Linux installation using shell script links incorrectly to libaudiobench_clib.so #27

Closed tank-trax closed 3 years ago

tank-trax commented 3 years ago

when running

Audiobench.bin: error while loading shared libraries: /home/runner/work/audiobench/audiobench/target/release/libaudiobench_clib.so: cannot open shared object file: No such file or directory

and

ldd /usr/bin/Audiobench.bin 
        linux-vdso.so.1 (0x00007ffc57189000)
        libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f4b39213000)
        libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007f4b39112000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4b39108000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4b39103000)
        /home/runner/work/audiobench/audiobench/target/release/libaudiobench_clib.so => not found
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4b390e2000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4b38f5c000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4b38dd9000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4b38dbf000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4b38bfe000)
        libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f4b38bc5000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4b389a7000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f4b39d2b000)

this is OK though

ldd /usr/lib/libaudiobench_clib.so
        linux-vdso.so.1 (0x00007ffc2019c000)
        libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fb639664000)
        libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fb63937b000)
        libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fb639351000)
        libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fb639342000)
        libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007fb63933d000)
        libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007fb639333000)
        libjulia.so.1 => /lib/libjulia.so.1 (0x00007fb638b62000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb638b48000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb638b3e000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb638b1d000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb63899a000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb638995000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb6387d2000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb639e96000)
        libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fb6385ce000)
        libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fb6383c8000)
        libunwind.so.8 => /lib/julia/libunwind.so.8 (0x00007fb63818f000)
        libLLVM-9jl.so => /lib/julia/libLLVM-9jl.so (0x00007fb634a2c000)
        libstdc++.so.6 => /lib/julia/libstdc++.so.6 (0x00007fb6346ac000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fb634692000)

there is the same linking error for the VST3 in /user/lib/vst3

I noticed that the file is without the correct folder structure

for a VST3 to be recognized in Linux the folder structure should be (with included file)

If located in /user/lib/vst3

/user/lib/vst3/Audiobench.vst3/Contents/x86_64-linux/Audiobench.so

If located in the local ~/.vst3 folder

~/.vst3/Audiobench.vst3/Contents/x86_64-linux/Audiobench.so

someguynamedjosh commented 3 years ago

It looks like it's expecting the library to be found in the same location it was when the binaries were built, I'll look into how to change that. Thanks for the note on VST directories, I'll modify the install script accordingly.

someguynamedjosh commented 3 years ago

It should now work correctly, I had to use this Rust crate to allow the shared object to be linked from system directories, also had to change the filename to libaudiobench_clib.so.0.

tank-trax commented 3 years ago

The Audiobench.bin and VST3 are good now

ldd Audiobench.so
        linux-vdso.so.1 (0x00007ffd67fbf000)
        libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f0dd9f69000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0dd9f5f000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0dd9f5a000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0dd9f39000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0dd9d1b000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f0dd9cef000)
        libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f0dd9c5b000)
        libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f0dd9972000)
        libffi.so.6 => /lib/x86_64-linux-gnu/libffi.so.6 (0x00007f0dd9968000)
        libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f0dd993e000)
        libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f0dd992f000)
        libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f0dd992a000)
        libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f0dd991e000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0dd979a000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0dd9617000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0dd95fd000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0dd943c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0ddec7d000)
        libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f0dd9403000)
        libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f0dd91fd000)
        libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f0dd8ff7000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f0dd8fdd000)

however still only ALSA for the Standalone, no JACK support