Porting the latest MuPDF

Trying to build the (next to) latest MuPDF Library 1.17 to Haiku.
I am working on 1.17 because I have already did the work to use this library in Lazarus/Pascal.

As it seems, the original source code compiles without any big troubles when you disable ICC and JPEG2000. To disable this go to /include/mupdf/fitz/config.h an edit out the following and put it to 0:

#define FZ_ENABLE_ICC 0
#define FZ_ENABLE_JPX 0 


make libs
make apps

to build MuPDF.
The build binaries work fine out of the box.

Next on I would like to create shared librarie, but this doesn’t work yet.
If downloaded a patch file 1.17 (for linux) to build a shared library: Visit site

When I try to build I get a lot of undefined reference lines.
When I remove --no-undefined from the compile parameters, the library builds, but using nm to view the functions from the library, I get none. If you like at the context of the library file, the functions are there, but it is not usable.

Can anyone point me to the right direction here and/or help me out
BTW I am using nightly builds X86_64


Latest version seems to be 1.18.0, you could check on how Alpine does it?

Same problem when compiling under linux. The shared library has ‘No symbols’ (nm library).
In windows this can be solved with Module Definition File in Visual Studio, but still searching how to do it on Linux and Haiku.