Project

General

Profile

Actions

Emulator Issues #3596

closed

Cmake compiling error in Debian sid (patch included)

Added by debian.micove about 14 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What's the problem?
Seems like the new change to DSO linking (http://fedoraproject.org/wiki/UnderstandingDSOLinkChange) was commited upstream or something and already reached Debian sid therefore all other debian-based distro may be affected soon.

When compiling with cmake I get:
[100%] Building CXX object Source/Core/DolphinWX/CMakeFiles/dolphin-emu.dir/Src/X11Utils.cpp.o
Linking CXX executable ../../../Binaries/dolphin-emu
/usr/bin/ld: ../Common/libcommon.a(DynamicLibrary.cpp.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line
/lib64/libdl.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[3]: *** [Binaries/dolphin-emu] Error 1

After adding -ldl to a CMakeList.txt file a different library is then asked. To fix this I used this quilt patch:

--- dolphin-emu-2.0+svn6495.orig/Source/Core/Core/CMakeLists.txt
+++ dolphin-emu-2.0+svn6495/Source/Core/Core/CMakeLists.txt
@@ -145,6 +145,10 @@ if(PORTAUDIO_FOUND)
set(LIBS ${LIBS} portaudio)
endif(PORTAUDIO_FOUND)

+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")

  • set(LIBS ${LIBS} -ldl -lX11 -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0)
    +endif()

add_library(core STATIC ${SRCS})
target_link_libraries(core ${LIBS})

With this the error is fixed in Debian sid 64bit and it is backwards compatible with Ubuntu Lucid/Maverick 32/64bit where this problem is still not present.

Dolphin version with the problem (as it appears in the title bar, Ex.: "R
4779" or "R 6403M"):
Latest svn.
I first noticed when I tried to use cmake for the 1st time (r6403).

Operating system and version:
Debian Sid 64-bit

Build command-line (not on Windows):
(cd Build && cmake -DCMAKE_INSTALL_PREFIX=/usr -DDOLPHIN_WC_REVISION=6495 ..)
...
(cd Build && /usr/bin/make -j2)

Please provide any additional information below.

This is similar to Issue 2820. I used scons to avoid this problem but after Issue 3595, I decided to just create a small patch for cmake and report it.

Actions

Also available in: Atom PDF