Hosting Jitsi on ppc64le

I recently tried self-hosting Jitsi on Debian on the Talos II.

I had to apply some small workarounds for ppc64le, so I thought I’d post them here.

The cause of the first issue, no audio or video in a call, was reported in the Jitsi Videobridge log, /var/log/jitsi/jvb.log:

[...]
Exception in thread "Smack-Single Threaded Executor 0 (0)" java.lang.UnsatisfiedLinkError: /tmp/nativeutils5300293642203108/libjnisctp.so: /tmp/nativeutils5300293642203108/libjnisctp.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64-bit .so on a Power PC 64 LE-bit platform)
[...]

To fix this, you have to build libjnisctp.so for ppc64le and substitute it for the x86-64 version of the library. Unless this is fixed upstream, you’ll have to re-do the steps starting from wrapper=[...] if you upgrade the jitsi-videobridge2 package.

git clone https://github.com/sctplab/usrsctp.git
git clone https://github.com/jitsi/jitsi-sctp
cd jitsi-sctp/
cp -R ../usrsctp usrsctp/
mvn package -DbuildSctp -DbuildNativeWrapper -DskipTests
wrapper="$(dpkg -L jitsi-videobridge2|grep jniwrapper-native)"
sudo cp "${wrapper}" "${wrapper}.bak"
cp "${wrapper}" ./tohack.jar
mkdir hacks
cd hacks
jar xf ../tohack.jar
cp ../jniwrapper/native/target/libjnisctp-linux-ppc64le.so \
	lib/linux/libjnisctp.so
jar cf hacked.jar *
sudo cp hacked.jar "${wrapper}"

I also had to help along the installation of luajwtjitsi, a dependency of Prosody, which at first errored out with:

sudo luarocks install luaossl
Installing https://luarocks.org/luaossl-20200709-0.src.rock

Error: Could not find library file for CRYPTO
  No file libcrypto.a in /usr/lib
  No file libcrypto.a in /usr/lib/x86_64-linux-gnu
  No file libcrypto.so in /usr/lib
  No file libcrypto.so in /usr/lib/x86_64-linux-gnu
  No file matching libcrypto.so.* in /usr/lib
  No file matching libcrypto.so.* in /usr/lib/x86_64-linux-gnu
You may have to install CRYPTO in your system and/or pass CRYPTO_DIR or CRYPTO_LIBDIR to the luarocks command.
Example: luarocks install luaossl CRYPTO_DIR=/usr/local

luarocks needs a hint as to the ppc64le library locations for luaossl, a dependency of luajwtjitsi.

sudo luarocks install luaossl \
	CRYPTO_LIBDIR=/usr/lib/powerpc64le-linux-gnu \
	OPENSSL_LIBDIR=/usr/lib/powerpc64le-linux-gnu
sudo luarocks install luajwtjitsi

I’m impressed with Jitsi; its self-hosting documentation is straightforward, and once it is installed, the video bridge works smoothly. I didn’t do detailed comparisons, but video call quality seems as good as any of the centrally-run services I’ve used.

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.