You are not logged in.
I am reading the code of dwm and I noticed that the libxinerama package is not used unless you add a '#define XINERAMA' line in dwm's source code. I was wondering why it was kept as a dependency in arch's official packages.
Side question : If I see something wrong in a PKGBUILD, how should I contact the maintainer? Should I report a bug?
Offline
Offline
According to namcap the dependency is required, see
]$ ldd /usr/bin/dwm
linux-vdso.so.1 (0x00007fff9e5fe000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f900d7f4000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f900d5f1000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f900d246000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f900d027000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f900ce23000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f900cc11000)
/lib64/ld-linux-x86-64.so.2 (0x00007f900db2f000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f900ca0d000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f900c807000)
I tried to build dwm without libxinerama and here's how it fails
==> Starting build()...
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -DVERSION="6.0" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
creating config.h from config.def.h
CC dwm.c
dwm.c:40:37: fatal error: X11/extensions/Xinerama.h: No such file or directory
#include <X11/extensions/Xinerama.h>
^
compilation terminated.
Makefile:18: recipe for target 'dwm.o' failed
make: *** [dwm.o] Error 1
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /tmp/chroot/sekret/build
I'm not sure why, my C knowledge is very basic.
Offline
You are right. It doesn't compile because the Makefile refers to Xinerama. It is still not necessary though. I haven't tested it but commenting the lines refering to Xinerama in 'config.mk' should work.
Offline
The header include is also in a conditional compile block as is all other Xinerama code.
But XINERAMA is defined by default (you don't need to add a "#define XINERAMA" as suggested in your first post). Have you removed it from config.mk? If you want to remove it, remove the "-DXINERAMA" from config.mk and remove the dependency from your PKGBUILD.
This is not, however, a bug - the library is required for the default build of dwm. The suckless team has simply made it easier for you to modify it if you so desire.
Last edited by Trilby (2013-10-30 10:50:25)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
You are right Trilby. I forgot about the -D option.
Offline