I have installed the new Juce release today (on ArchLinux), and the new Projucer refuses to start. The first time I’ve launched it, I got a missing dependency message (I didn’t have with previous versions, including 4.2) :
Projucer: error while loading shared libraries: librtmp.so.1: cannot open shared object file: No such file or directory
So I checked my package manager for something including this library, and found rtmpdump version 1:2.4.r96.fa8646d, and installed it. Starting ProJucer now induce a core dump :
Instruction non permise (core dumped)
I don’t know how to analyze a dump (I haven’t tried either), and I can still use ProJucer 4.2, so that’s no urging, but I wanted to report the issue
libcurl in itself does not require librtmp, but libcurl-gnutls does, you’re right.
I had to install libcurl-gnutls for… Tracktion 7
Now maybe the prebuilt Projucer has been built against libcurl-gnutls instead of the libcurl one (which seems to be used when building Projucer oneself)
@fabian If you could find a way to reduce the dependancy that would be great. I recently had a user on OpenSUSE reporting problems due to missing cURL libs. (Was that you @riri?)
Yeah but we had so many problems with users having to authorise using the offline key file method. It’s just not expected this day and age.
When you added the cURL stuff it was great!
If I could figure out which package to get users to install that would be a temporary work around. There’s just so many variations of Linux it’s impossible to test them all.
Sorry didn’t read your username ;-). Unfortunately, you really need to have a shared lib dependancy to libcurl. libcurl with modern ssl support is not available as a static lib (some security issues I think). I’m not really sure what the differences are between libcurl-gnutls and libcurl. I’ll need to re-check this.
OK I’ve spent some time investigating this. Unfortunately, on Ubuntu there is no libcurl package that I can install that doesn’t come with a whole set of unnecessary dependencies. So I compiled a static version of libcurl myself. This seems to be overly complicated so I’d be happy for any suggestions.
This is how I did it:
Compile a static version of libcurl with only http/https support
cd curl-static
mkdir build
# the following package is needed on debian/ubuntu systems to have static SSL support
sudo apt-get install libssl-dev
wget 'https://curl.haxx.se/download/curl-7.48.0.tar.bz2'
tar -xvjf curl-7.48.0.tar.bz2
cd curl-7.48.0
./configure --prefix=/home/xxxx/curl-static/build --with-static --without-dynamic --disable-dynamic --enable-static --disable-rt --without-librtmp --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-manual --disable-tls-srp --disable-crypto-auth --disable-shared --disable-ipv6 --disable-verbose --without-libidn
# Make sure the above configure step results in SSL enabled
make -j6
make install # do NOT use sudo!!
Make sure pkg-config picks up the right version
export PKG_CONFIG_PATH=/home/xxxx/curl-static/build/lib/pkgconfig:${PKG_CONFIG_PATH}
# check that pkg-config returns the correct dependencies
# should return:
# -L/home/xxxx/curl-static/build/lib -lcurl -lssl -lcrypto -lssl -lcrypto -lz
pkg-config --libs --static libcurl
Modify the LDFLAGS lines (both for Debug and Release) of the makefile of your JUCE project (here for the Projucer)
My main concern is the “export PKG_CONFIG_PATH” line. Does that have to be an absolute path? Ideally I’d like to be able to build this static lib once, add it to the repo and have all the team members build it. Having each of them follow these steps seems problematic.
If we don’t do the export step can we just link to “-lcurl -lssl -lcrypto -lssl -lcrypto -lz” directly in the PJ project? Presumably these dependancies won’t change? But does this mean we won’t be pointing to the correct libcurl binary?
Yes you definitely need the PKG_CONFIG_PATH when building your JUCE code otherwise it will pick up the system’s libcurl instead of the one you built.
However, you can also just copy and paste the output of pkg-config and put that into the Makefile instead of the pkg-config --static --libs libcurl part in the LDFlags. For me the output of pkg-config (with the PKG_CONFIG_PATH) gives this:
Obviously you can replace the -L with a relative path so that should work for your setup.
BTW: we’ve just uploaded a new linux binary build with a static libcurl. So you can test the binary on various distributions to see if this setup works for you.