Mormert / jle

'Jet-Lagged Engine' is a work-in-progress C++/Lua game engine supporting Windows, Linux, Mac and browsers.
GNU General Public License v3.0
249 stars 18 forks source link

Build failed on FreeBSD: version script assignment of 'local' to symbol 'gz_intmax' failed: symbol not defined #22

Open Martinfx opened 4 weeks ago

Martinfx commented 4 weeks ago

Hi, i would like port this engine to FreeBSD but I have problem with zlib:

FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git llvmorg-17.0.6-0-g6009708b4367) Target: x86_64-unknown-freebsd13.3 Thread model: posix InstalledDir: /usr/bin


/home/maxfx/Documents/jle/engine/3rdparty/zlib/uncompr.c:86:13: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
   86 | int ZEXPORT uncompress(dest, destLen, source, sourceLen)
      |             ^
2 warnings generated.
[  3%] Building C object gametemplate/3rdparty/zlib/CMakeFiles/zlib.dir/zutil.o
/home/maxfx/Documents/jle/engine/3rdparty/zlib/zutil.c:135:22: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  135 | const char * ZEXPORT zError(err)
      |                      ^
/home/maxfx/Documents/jle/engine/3rdparty/zlib/zutil.c:307:22: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  307 | voidpf ZLIB_INTERNAL zcalloc(opaque, items, size)
      |                      ^
/home/maxfx/Documents/jle/engine/3rdparty/zlib/zutil.c:317:20: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
  317 | void ZLIB_INTERNAL zcfree(opaque, ptr)
      |                    ^
3 warnings generated.
[  3%] Linking C shared library libz.so
ld: error: version script assignment of 'local' to symbol 'gz_intmax' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [gametemplate/3rdparty/zlib/CMakeFiles/zlib.dir/build.make:321: gametemplate/3rdparty/zlib/libz.so.1.2.13] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:713: gametemplate/3rdparty/zlib/CMakeFiles/zlib.dir/all] Error 2
Mormert commented 4 weeks ago

Hi @Martinfx, thanks for your interest in porting the project to FreeBSD.

FreeBSD is platform not supported currently. If this is something you want to look into adding support for, it'd be greatly appreciated. A PR fixing this will be accepted. 👍