Dolphin, the GameCube and Wii emulator - Forums

Full Version: Another Dolphin compilation error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The previous error I had with my attempt at compiling Dolphin was fixed in commit 3da2e15e6b95f02f66df461e87c8b896e450fdab and a583526a1c4997bc7e8395eea06bd1b591fd04fe, after trying to build it again (from scratch) the compilation process goes to 82% (where it's linking dolphin-emu-nogui and dolphin-tool) and stops after leaving this error (I hope I translated the parts in Spanish well enough to make it legible):

Code:
/usr/bin/ld: ../DiscIO/CMakeFiles/discio.dir/CompressedBlob.cpp.o: undefined reference to symbol 'deflateInit_'
/usr/bin/ld: /usr/lib/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Source/Core/DolphinNoGUI/CMakeFiles/dolphin-nogui.dir/build.make:231: Binaries/dolphin-emu-nogui] Error 1
make[1]: *** [CMakeFiles/Makefile2:1849: Source/Core/DolphinNoGUI/CMakeFiles/dolphin-nogui.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 82%] Linking CXX executable ../../../Binaries/dolphin-tool
/usr/bin/ld: ../DiscIO/CMakeFiles/discio.dir/CompressedBlob.cpp.o: undefined reference to symbol 'deflateInit_'
/usr/bin/ld: /usr/lib/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Source/Core/DolphinTool/CMakeFiles/dolphin-tool.dir/build.make:231: Binaries/dolphin-tool] Error 1
make[1]: *** [CMakeFiles/Makefile2:1893: Source/Core/DolphinTool/CMakeFiles/dolphin-tool.dir/all] Error 2
[ 82%] Built target dolphin-emu_autogen
make: *** [Makefile:156: all] Error 2
From what I searched it seems like it's a linking of libraries error in CMakeLists.txt but I'm not sure (I don't know which one though)


Thank you for your time and help.
(02-14-2024, 09:06 PM)xXx_slimypotato_xXx Wrote: [ -> ]From what I searched it seems like it's a linking of libraries error in CMakeLists.txt but I'm not sure (I don't know which one though)

I think that would be zlib.
(02-15-2024, 04:03 AM)JosJuice Wrote: [ -> ]I think that would be zlib.

But what should I do? Do a link of zlib... to somewhere in /usr/lib? The thing I noticed is that in the file CompressedBlob.cpp there's an #include <zlib.h> line and I didn't find any zlib.h file in my Dolphin source folder.

Sorry in advance if my questions don't make sense but I'm really ignorant about basic knowledge of using CMake and how to read and understand error messages like those properly (or code in general)
Turns out that uninstalling Zlib-ng and letting CMake use the system ZLib was my solution, after that I could compile Dolphin successfully.


Thank you for the help JosJuice.