You are not logged in.
Hello folks.
This is makepkg's output.
┌─[parazyd][archbox][~/dwm]
└──╼ makepkg -ef
==> Making package: dwm 6.0-1 (Wed Nov 19 17:33:05 CET 2014)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing src/ tree
==> Removing existing pkg/ directory...
==> Starting build()...
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -D_FORTIFY_SOURCE=2 -DVERSION="6.0" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
CC dwm.c
In file included from dwm.c:329:0:
config.h:67:1: warning: initialization from incompatible pointer type
static const char *scratchpadcmd[] = { termcmd, "-title", scratchpadname, "-geometry", "150x40", NULL };
^
config.h:67:1: warning: (near initialization for ‘scratchpadcmd[0]’)
dwm.c: In function ‘cleanup’:
dwm.c:551:5: error: ‘showsystray’ undeclared (first use in this function)
if(showsystray) {
^
dwm.c:551:5: note: each undeclared identifier is reported only once for each function it appears in
dwm.c: In function ‘clientmessage’:
dwm.c:593:5: error: ‘showsystray’ undeclared (first use in this function)
if(showsystray && cme->window == systray->win && cme->message_type == netatom[NetSystemTrayOP]) {
^
dwm.c: In function ‘drawbar’:
dwm.c:866:6: error: ‘showsystray’ undeclared (first use in this function)
if(showsystray && m == selmon)
^
dwm.c: In function ‘getsystraywidth’:
dwm.c:1124:5: error: ‘showsystray’ undeclared (first use in this function)
if(showsystray)
^
dwm.c:1125:42: error: ‘systrayspacing’ undeclared (first use in this function)
for(i = systray->icons; i; w += i->w + systrayspacing, i = i->next);
^
dwm.c:1125:56: warning: left-hand operand of comma expression has no effect [-Wunused-value]
for(i = systray->icons; i; w += i->w + systrayspacing, i = i->next);
^
dwm.c: In function ‘keypress’:
dwm.c:1252:2: warning: ‘XKeycodeToKeysym’ is deprecated (declared at /usr/include/X11/Xlib.h:1699) [-Wdeprecated-declarations]
keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
^
dwm.c: In function ‘removesystrayicon’:
dwm.c:1541:6: error: ‘showsystray’ undeclared (first use in this function)
if(!showsystray || !i)
^
dwm.c: In function ‘resizebarwin’:
dwm.c:1560:5: error: ‘showsystray’ undeclared (first use in this function)
if(showsystray && m == selmon)
^
dwm.c: In function ‘togglebar’:
dwm.c:1996:5: error: ‘showsystray’ undeclared (first use in this function)
if(showsystray) {
^
dwm.c: In function ‘updatebars’:
dwm.c:2130:6: error: ‘showsystray’ undeclared (first use in this function)
if(showsystray && m == selmon)
^
dwm.c: In function ‘updatesystrayiconstate’:
dwm.c:2343:6: error: ‘showsystray’ undeclared (first use in this function)
if(!showsystray || !i || ev->atom != xatom[XembedInfo] ||
^
dwm.c: In function ‘updatesystray’:
dwm.c:2372:6: error: ‘showsystray’ undeclared (first use in this function)
if(!showsystray)
^
dwm.c:2378:79: error: ‘DC’ has no member named ‘sel’
systray->win = XCreateSimpleWindow(dpy, root, x, selmon->by, w, bh, 0, 0, dc.sel[ColBG]);
^
dwm.c:2382:28: error: ‘DC’ has no member named ‘norm’
wa.background_pixel = dc.norm[ColBG];
^
dwm.c:2402:8: error: ‘systrayspacing’ undeclared (first use in this function)
w += systrayspacing;
^
dwm.c: In function ‘wintosystrayicon’:
dwm.c:2509:6: error: ‘showsystray’ undeclared (first use in this function)
if(!showsystray || !w)
^
Makefile:18: recipe for target 'dwm.o' failed
make: *** [dwm.o] Error 1
==> ERROR: A failure occurred in build().
Aborting...
I'm trying to apply systray to my dwm-6.0, but I get errors when compiling and I'm not exactly sure what's the problem. Could anyone help?
Here's the dwm.c after applying the patch: http://pastebin.com/Aie3Uw0n
This is my dwm.c prior to patching (this one works): http://pastebin.com/ra0NhGnV
And here's Unia's patch I'm trying to use: https://github.com/Unia/dwm-patches/blo … stray.diff
Any help would be kindly appreciated.
-- mod note: split from https://bbs.archlinux.org/viewtopic.php?id=92895&p=28 - Trilby --
Last edited by parazyd (2014-11-19 17:03:03)
Offline
So .... are you going to say what errors you are getting?? If you don't no one can help. If you do, that might be best in a separate thread.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
So .... are you going to say what errors you are getting?? If you don't no one can help. If you do, that might be best in a separate thread.
Sorry, I forgot about it.
Here's a screenshot: https://i.imgur.com/E1NyWyt.png
Offline
If you do, that might be best in a separate thread.
So I'll split it out for you. But I'm not going to interpret a screenshot image of text-errors. Post text as text.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
You need to update your config.h.
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
If you read your output, it lists "undeclared variables". Declare those in your config.h:
+static const unsigned int systrayspacing = 2; /* systray spacing */
+static const Bool showsystray = True; /* False means no systray */
My repository is merely a collection of patches I have once used; if you want complete sets (e.g. with changes to config.h) you should go to the suckless website.
Now there are other issues left, but I'll leave those for you to figure out. Also, as Trilby said, posting the error messages as text makes it easier for us to read.
Last edited by Unia (2014-11-19 16:40:52)
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
Thanks a lot for that. Now I seem to be stuck on another thing :-/
I have no idea what to do...
==> Making package: dwm 6.0-1 (Wed Nov 19 17:39:04 CET 2014)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing src/ tree
==> Removing existing pkg/ directory...
==> Starting build()...
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -D_FORTIFY_SOURCE=2 -DVERSION="6.0" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
CC dwm.c
In file included from dwm.c:329:0:
config.h:25:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘const’
tatic const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
^
In file included from dwm.c:329:0:
config.h:71:1: warning: initialization from incompatible pointer type
static const char *scratchpadcmd[] = { termcmd, "-title", scratchpadname, "-geometry", "150x40", NULL };
^
config.h:71:1: warning: (near initialization for ‘scratchpadcmd[0]’)
dwm.c: In function ‘keypress’:
dwm.c:1252:2: warning: ‘XKeycodeToKeysym’ is deprecated (declared at /usr/include/X11/Xlib.h:1699) [-Wdeprecated-declarations]
keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
^
dwm.c: In function ‘updatesystray’:
dwm.c:2378:79: error: ‘DC’ has no member named ‘sel’
systray->win = XCreateSimpleWindow(dpy, root, x, selmon->by, w, bh, 0, 0, dc.sel[ColBG]);
^
dwm.c:2382:28: error: ‘DC’ has no member named ‘norm’
wa.background_pixel = dc.norm[ColBG];
^
Makefile:18: recipe for target 'dwm.o' failed
make: *** [dwm.o] Error 1
==> ERROR: A failure occurred in build().
Aborting...
Offline
The first is an obvious typo. The second is because 'termcmd' isn't a string variable (not a const char *).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Not a Programming issue, moving to NC...
Offline
Okay. Turns out it's because of statuscolors. Changed both .sel and .norm to .colors
It compiles Now to test it out. Thanks guys!
/edit
Works like a charm! Thanks again
Last edited by parazyd (2014-11-19 17:03:47)
Offline