SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-10-19 22:48:39

cortman
#! CrunchBanger
From: ZZ9 Plural Z Alpha
Registered: 2012-03-15
Posts: 128

Trying to patch xft to dwm

More dwm hitches.
I'm trying to apply the xft patch (downloaded from suckless), and the patch applies fine- but when I go to compile I get this (full output):

cortman@gwaihir:~/dwm-6.0$ sudo make clean install
cleaning
rm -f dwm dwm.o dwm-6.0.tar.gz
dwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -I. -I/usr/include -I/usr/X11R6/include -DVERSION="6.0" -DXINERAMA
LDFLAGS  = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXinerama
CC       = cc
creating config.h from config.def.h
cp config.def.h config.h
CC dwm.c
cc -c -std=c99 -pedantic -Wall -I. -I/usr/include -I/usr/X11R6/include -DVERSION=\"6.0\" -DXINERAMA dwm.c
dwm.c:42:25: fatal error: X11/Xft/Xft.h: No such file or directory
compilation terminated.
make: *** [dwm.o] Error 1

libxinerama-dev is installed.
Since a lot you guys seem to use dwm, has anyone come up with a fix for it?
Thanks!

Last edited by cortman (2012-10-19 22:51:15)

Offline

Help fund CrunchBang, donate to the project!

#2 2012-10-19 23:02:45

pidsley
Window Mangler
Registered: 2012-05-23
Posts: 1,752

Re: Trying to patch xft to dwm

try installing libxft-dev

% apt-file search Xft.h
libxft-dev: /usr/include/X11/Xft/Xft.h

apt-file is very useful for finding build dependencies

Last edited by pidsley (2012-10-19 23:04:56)

Offline

#3 2012-10-20 04:34:17

cortman
#! CrunchBanger
From: ZZ9 Plural Z Alpha
Registered: 2012-03-15
Posts: 128

Re: Trying to patch xft to dwm

Thanks for the suggestion and the apt-file tip; that really is a useful tool.
I installed libxft-dev, and that took care of that error, but now I get a different (but similar) one-

cortman@gwaihir:~/dwm-6.0$ sudo make clean install
cleaning
rm -f dwm dwm.o dwm-6.0.tar.gz
dwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -I. -I/usr/include -I/usr/X11R6/include -DVERSION="6.0" -DXINERAMA
LDFLAGS  = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXinerama
CC       = cc
CC dwm.c
cc -c -std=c99 -pedantic -Wall -I. -I/usr/include -I/usr/X11R6/include -DVERSION=\"6.0\" -DXINERAMA dwm.c
In file included from /usr/include/X11/Xft/Xft.h:39:0,
                 from dwm.c:42:
/usr/include/ft2build.h:56:38: fatal error: freetype/config/ftheader.h: No such file or directory
compilation terminated.
make: *** [dwm.o] Error 1

So I ran

apt-file search freetype | grep ftheader

which gave me

libfreetype6-dev: /usr/include/freetype2/freetype/config/ftheader.h

went to install it, and it's already installed and latest version. I navigated to /usr/include/freetype2/freetype/config, and ftheader.h is in there and is not corrupted.

Any other suggestions?

Last edited by cortman (2012-10-20 04:35:27)

Offline

#4 2012-10-20 04:48:50

pidsley
Window Mangler
Registered: 2012-05-23
Posts: 1,752

Re: Trying to patch xft to dwm

No, I've never seen that error, but I've also never patched dwm to use xft. Unia is the dwm patchmaster, maybe he will show up eventually. Or search the web for that exact error.

Offline

#5 2012-10-20 09:16:17

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Trying to patch xft to dwm

sudo apt-get build-dep dwm

Unia "patches" by installing AUR packages, that's no help to you.

Offline

#6 2012-10-21 11:16:49

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Trying to patch xft to dwm

sudo apt-get build-dep dwm

Offline

#7 2012-10-23 00:51:08

cortman
#! CrunchBanger
From: ZZ9 Plural Z Alpha
Registered: 2012-03-15
Posts: 128

Re: Trying to patch xft to dwm

Thanks very much for the reply Unia; I'm quite busy right now but when I do try this I will post back.
You have some nice dwm setups from what I've seen on the Arch forums. smile

Offline

#8 2012-10-23 01:11:47

cortman
#! CrunchBanger
From: ZZ9 Plural Z Alpha
Registered: 2012-03-15
Posts: 128

Re: Trying to patch xft to dwm

Tried saving your code as config.mk.diff and patching it to config.mk the same way I tried to patch dwm.c, but it fails- "patch unexpectedly ends in middle of line".
I'm totally new to compiling/patching/C coding in general, so forgive my ignorance. Am I doing something obviously wrong, or should I just manually patch config.mk (removing lines starting with - and adding ones with the +)?

Offline

#9 2012-10-23 03:13:15

cortman
#! CrunchBanger
From: ZZ9 Plural Z Alpha
Registered: 2012-03-15
Posts: 128

Re: Trying to patch xft to dwm

Update: after manually reworking config.mk, the xft patch applied perfectly to a clean dwm.c file. Compiling went fine, changed the font in config.h, and it works great.Success!
Until I tried applying the systray patch; hunks #3 and #24 failed and of course no compile.
Would it be something simiple, like line numbers getting off, or a known issue, or is it going to require a C guru and lots of time?

Offline

#10 2012-10-23 10:08:36

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Trying to patch xft to dwm

diff -u dwm.c.xft dwm.c.patched >> 02-dwm-6.0-systray.diff

Offline

#11 2012-10-23 10:11:13

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,826
Website

Re: Trying to patch xft to dwm

^ Thanks Unia, this is a highly informative post!

Offline

#12 2012-10-23 10:29:55

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Trying to patch xft to dwm

^ Thanks! smile

Offline

#13 2012-10-23 12:51:02

cortman
#! CrunchBanger
From: ZZ9 Plural Z Alpha
Registered: 2012-03-15
Posts: 128

Re: Trying to patch xft to dwm

Thanks very much for this, Unia- I'll set to hand-patching away.
Thanks for your patience with a dwm novice as well. smile

Offline

#14 2012-10-23 13:08:51

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Trying to patch xft to dwm

You're welcome Cortman. I had trouble with exactly this too and once you get this, it's darn easy to play around with DWM wink

Offline

#15 2012-10-23 14:53:52

cortman
#! CrunchBanger
From: ZZ9 Plural Z Alpha
Registered: 2012-03-15
Posts: 128

Re: Trying to patch xft to dwm

Tried hand-patching systray to dwm.c and wound up with a boat load of errors upon compiling. Guess I'll try patching again in case I missed something. One question though; there's a few lines to be patched to config.def.h in the systray patch; should I rather patch them to config.h instead?

Offline

#16 2012-10-23 14:59:39

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Trying to patch xft to dwm

Last edited by Unia (2012-10-23 15:00:51)

Offline

#17 2012-10-24 02:17:08

cortman
#! CrunchBanger
From: ZZ9 Plural Z Alpha
Registered: 2012-03-15
Posts: 128

Re: Trying to patch xft to dwm

Gave up and did the smart thing: cloned your Git repository and used your patches. Both systray and xft worked like a charm. smile
Thanks for your help and for making your patches available!

Offline

#18 2012-10-24 10:55:08

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Trying to patch xft to dwm

diff -u dwm.c.orig dwm.c.patched >> 02-dwm-6.0-systray.diff

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo