nicklan/pnmixer — Issue #15: implicit linking to  libX11
Author: cwickert
Created: 2011-12-09 22:24:43+00:00
State: open

pnmixer uses XKeycodeToKeysym from libX11, but libX11 is not linked explicitly. Thus the build will fail on various distributions such as Fedora >= 13:

gcc -O2 -export-dynamic -o pnmixer support.o main.o hotkeys.o alsa.o callbacks.o prefs.o -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpng12 -lm -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lasound
/usr/bin/ld: hotkeys.o: undefined reference to symbol 'XKeycodeToKeysym'
/usr/bin/ld: note: 'XKeycodeToKeysym' is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line
/usr/lib64/libX11.so.6: could not read symbols: Invalid operation

For the background of this change, see http://fedoraproject.org/wiki/UnderstandingDSOLinkChange