[Solved] How to compile compressed RAF (Fuji X-Pro2, X-T2) support into LibRaw?

--disable-shared solved it.

Complete steps if you want it installed in a custom folder (not system-wide):

mkdir $HOME/programs && cd $HOME/programs
git clone https://github.com/LibRaw/LibRaw.git code-libraw
cd code-libraw
git checkout xtrans-compressed
./mkdist.sh
./configure --enable-openmp --enable-lcms --disable-shared --prefix="$HOME/programs/libraw"
make -j8 install

Executable files will be in $HOME/programs/libraw, you can delete $HOME/programs/code-libraw