You are not logged in.

#1 2013-10-29 06:17:24

Gradient
Member
Registered: 2013-05-19
Posts: 101

Why is libxinerama kept in dwm's dependency?

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

#2 2013-10-29 06:27:54

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: Why is libxinerama kept in dwm's dependency?

Report a bug.

Offline

#3 2013-10-29 09:19:42

sekret
Member
Registered: 2013-07-22
Posts: 284

Re: Why is libxinerama kept in dwm's dependency?

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

#4 2013-10-29 10:15:34

Gradient
Member
Registered: 2013-05-19
Posts: 101

Re: Why is libxinerama kept in dwm's dependency?

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

#5 2013-10-29 11:20:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Why is libxinerama kept in dwm's dependency?

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

#6 2013-10-30 00:54:39

Gradient
Member
Registered: 2013-05-19
Posts: 101

Re: Why is libxinerama kept in dwm's dependency?

You are right Trilby. I forgot about the -D option.

Offline

Board footer

Powered by FluxBB