I am packaging VCV Rack 2 as Flatpak. VCV Rack is audio synthesizer.
When building the package, it show an error.
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libGLEW.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libglfw3.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libjansson.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libcurl.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libssl.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libcrypto.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libarchive.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libzstd.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libspeexdsp.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/libsamplerate.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/librtmidi.a: No such file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find dep/lib/librtaudio.a: No such file or directory
I suspect that it is looking for static libs in dep/lib because it use internal dependencies and install itself there. work around it by skipping dependencies install and install it in build-commands.
Edit: I partially solve this by editing the Makefile to point LDFLAGS to /app/lib.
Other issue is that Rack is looking for static library, which mean that using share-modules would not work.
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find /app/lib/libcurl.a: No such fi
le or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find /app/lib/libssl.a: No such fil
e or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find /app/lib/libcrypto.a: No such
file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find /app/lib/libarchive.a: No such
file or directory
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find /app/lib/libzstd.a: No such fi
le or directory
Edit: solve it by manually installing other dependencies as separate submodule with static libs.
I’ve played around with this & was able to build the application with the shared runtime libraries. The static libraries are a requirement in the Makefile, I simply replaced these parts. I don’t know if the application actually runs because I haven’t added the install part for the application.