View Issue Details

IDProjectCategoryView StatusLast Update
0000043Gameplay + OpenGL[All Projects] Bugpublic2017-01-16 01:26
ReporterEdward-san 
Assigned ToBlzut3 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04 x86-64
Summary0000043: Dynamic library handling libraries not always added (aka 'error adding symbols: DSO missing from command line')
DescriptionIf DYN_FLUIDSYNTH is disabled, gzdoom won't link:


/usr/bin/ld: CMakeFiles/zdoom.dir/i_module.cpp.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'

//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line


Depending on the other DYN_ options, it's possible to see the same report with other files.

The problem is that ${CMAKE_DL_LIBS} is included in the libs list only if DYN_FLUIDSYNTH is true ( src/CMakeLists.txt line 615 ).

If you change the code by moving away that code and close it in a conditional block like 'if( DYN_FLUIDSYNTH OR DYN_OPENAL OR DYN_GTK )', it should compile fine, but i_module.cpp is unconditionally defined and uses dlclose.
Steps To ReproduceConfigure with 'cmake -DDYN_FLUIDSYNTH=OFF [path to src]' and compile.
TagsNo tags attached.

Relationships

Activities

Edward-san

Edward-san

2017-01-13 11:01

developer   ~0000063

Would it be alright to include the ${CMAKE_DL_LIBS} unconditionally? How badly would this affect the program?
Blzut3

Blzut3

2017-01-15 12:35

developer   ~0000089

Shouldn't have any side effects since as you mentioned we now have i_module unconditionally using the symbols even if they never get called. Could be patched to not be the case, but honestly libdl isn't really adding a dependency so it's not really worth keeping track of when it can be excluded. I'll take care of it.
Blzut3

Blzut3

2017-01-16 01:26

developer   ~0000096

Fixed in changeset ae7b95fc52a7a77d49eeaefba551c9415ec5faff.

Issue History

Date Modified Username Field Change
2017-01-13 09:47 Edward-san New Issue
2017-01-13 09:48 Edward-san Assigned To => Blzut3
2017-01-13 09:48 Edward-san Status new => assigned
2017-01-13 11:01 Edward-san Note Added: 0000063
2017-01-15 12:35 Blzut3 Note Added: 0000089
2017-01-16 01:26 Blzut3 Status assigned => resolved
2017-01-16 01:26 Blzut3 Resolution open => fixed
2017-01-16 01:26 Blzut3 Note Added: 0000096