I am trying to compile MapCache for SUSE Linux Enterprise Server 15.5.
After some problems, I have managed to install dependencies and run cmake in the build directory:
cmake -DWITH_FCGI=0 ..
Running make produces the following errors when trying to link libmapcache.so:
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/mapcache.dir/build.make:1002: libmapcache.so.1.15dev] Error 1
make[1]: *** [CMakeFiles/Makefile2:172: CMakeFiles/mapcache.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
It looks like it is trying to link a shared library (libmapcache.so) with a static library (libz.a). There is a libz.so in /usr/local/lib . How do I get libmapcache.so to link with libz.so ? Am I on the right track?
EDIT: The libz.so in /usr/local/lib is a broken symlink, probably why its trying to link to libz.a instead of libz.so ......
COMPILATION SUCCESS: I created a new symlink in /usr/local/lib pointing to: /usr/lib64/libz.so.1.2.13