Hi all:
New to OpenSUSE as of two days ago. I tried compiling DWM window manager
today, which attempt has so far failed.
I understand OpenSUSE does not come with a full build environment, so I
expected a few errors along the way. In fact, the first two errors were
for missing X-libs packages (libX11-devel and libXfti-devel), which I
installed.
Now, the next errors seem to be because certain header files are not where
DWM (or GCC) expects to find them. For example, the first error was
(untruncated):
dutch@linux-uoyk:~/bin/dwm-6.1> sudo make clean install
cleaning
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.1" -DXINERAMA
LDFLAGS = -s -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft
CC = cc
CC drw.c
In file included from drw.c:6:0:
/usr/include/X11/Xft/Xft.h:39:22: fatal error: ft2build.h: No such file or directory
#include
On Mon, Jul 04, 2016 at 04:56:54PM -0500, Dutch Ingraham wrote:
Hi all:
New to OpenSUSE as of two days ago. I tried compiling DWM window manager today, which attempt has so far failed.
I understand OpenSUSE does not come with a full build environment, so I expected a few errors along the way. In fact, the first two errors were for missing X-libs packages (libX11-devel and libXfti-devel), which I installed.
Now, the next errors seem to be because certain header files are not where DWM (or GCC) expects to find them. For example, the first error was (untruncated):
dutch@linux-uoyk:~/bin/dwm-6.1> sudo make clean install cleaning dwm build options: CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.1" -DXINERAMA LDFLAGS = -s -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft CC = cc CC drw.c In file included from drw.c:6:0: /usr/include/X11/Xft/Xft.h:39:22: fatal error: ft2build.h: No such file or directory #include
^ compilation terminated. Makefile:18: recipe for target 'drw.o' failed make: *** [drw.o] Error 1 dutch@linux-uoyk:~ In fact, ft2build exists, but instead of being located in
as expected, it is in . So, I made that change, and the error disappeared. Next error was similar:
In file included from /usr/include/X11/Xft/Xft.h:39:0, from drw.c:6: /usr/include/freetype2/ft2build.h:37:29: fatal error: config/ftheader.h: No such file or directory #include
^ compilation terminated. Same solution, make the path
. Next error, same thing:
n file included from drw.c:6:0: /usr/include/X11/Xft/Xft.h:40:23: fatal error: freetype.h: No such file or directory #include FT_FREETYPE_H ^ compilation terminated.
OK - you get the picture. Question is, is this PEBCAK, i.e., am I missing some essential build feature? Note: I have checked with one other Linux distro and their header files are as I adjusted them above. So, any ideas? Thanks for your help.
Whoops - sorry: this is an x86_64 box running LEAP 42.1. dutch@linux-uoyk:/usr/include/freetype2> uname -a Linux linux-uoyk 4.1.26-21-default #1 SMP PREEMPT Mon Jun 13 13:32:30 UTC 2016 (294632f) x86_64 x86_64 x86_64 GNU/Linux -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2016-07-04 23:56, Dutch Ingraham wrote:
dutch@linux-uoyk:~/bin/dwm-6.1> sudo make clean install
That's a strange way to do a local build. First, I would hesitate to start with a "clean". And not as sudo. Rather: configure make sudo make install Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAld7DyoACgkQja8UbcUWM1yzfwD6A3Z134nNVfUTd8jNOQcnf3y9 Xytuh3cHgbVshWabiecBAJra5ejEHayDkgqw3NfuX25qWpwfDt62W1Xj2OoWCyOq =NfmY -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
05.07.2016 00:56, Dutch Ingraham пишет:
In fact, ft2build exists, but instead of being located in
as expected, it is in . So, I made that change,
Which change?
and the error disappeared.
Next error was similar:
In file included from /usr/include/X11/Xft/Xft.h:39:0, from drw.c:6: /usr/include/freetype2/ft2build.h:37:29: fatal error: config/ftheader.h: No such file or directory #include
^ compilation terminated. Same solution, make the path
.
No, solution is to add -I/usr/include/freetype2 to CFLAGS. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Jul 05, 2016 at 06:14:07AM +0300, Andrei Borzenkov wrote:
05.07.2016 00:56, Dutch Ingraham пишет: No, solution is to add
-I/usr/include/freetype2
to CFLAGS.
Thanks - that worked. However, I'm now getting two further errors:
dwm.c: In function ‘updatestatus’:
dwm.c:1996:23: error: expected ‘)’ before ‘VERSION’
strcpy(stext, "dwm-"VERSION);
^
dwm.c: In function ‘main’:
dwm.c:2127:13: error: expected ‘)’ before ‘VERSION’
die("dwm-"VERSION "\n");
^
Makefile:18: recipe for target 'dwm.o' failed
make: *** [dwm.o] Error 1
Interestingly, this is the same code (checked with sha1) that I have
compiled on a number of different distros (and one BSD) without error.
The only non-constants seem to be (1) the distro, and (2) slight
variations in GCC version.
Based upon (2), its difficult to compare default GCC specs with certainty,
but I did run a couple of checks (like
05.07.2016 17:46, Dutch Ingraham пишет:
On Tue, Jul 05, 2016 at 06:14:07AM +0300, Andrei Borzenkov wrote:
05.07.2016 00:56, Dutch Ingraham пишет: No, solution is to add
-I/usr/include/freetype2
to CFLAGS.
Thanks - that worked. However, I'm now getting two further errors:
dwm.c: In function ‘updatestatus’: dwm.c:1996:23: error: expected ‘)’ before ‘VERSION’ strcpy(stext, "dwm-"VERSION); ^ dwm.c: In function ‘main’: dwm.c:2127:13: error: expected ‘)’ before ‘VERSION’ die("dwm-"VERSION "\n"); ^ Makefile:18: recipe for target 'dwm.o' failed make: *** [dwm.o] Error 1
Most likely you overwrote your CFLAGS instead of adding to them. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Jul 05, 2016 at 06:07:03PM +0300, Andrei Borzenkov wrote:
05.07.2016 17:46, Dutch Ingraham пишет:
On Tue, Jul 05, 2016 at 06:14:07AM +0300, Andrei Borzenkov wrote:
05.07.2016 00:56, Dutch Ingraham пишет: No, solution is to add
-I/usr/include/freetype2
to CFLAGS.
Thanks - that worked. However, I'm now getting two further errors:
dwm.c: In function ‘updatestatus’: dwm.c:1996:23: error: expected ‘)’ before ‘VERSION’ strcpy(stext, "dwm-"VERSION); ^ dwm.c: In function ‘main’: dwm.c:2127:13: error: expected ‘)’ before ‘VERSION’ die("dwm-"VERSION "\n"); ^ Makefile:18: recipe for target 'dwm.o' failed make: *** [dwm.o] Error 1
Most likely you overwrote your CFLAGS instead of adding to them.
That's a distinct possibility. I've tried two ways: dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS+=-I/usr/include/freetype2 and dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS=-I/usr/include/freetype2 The above errors are the same either way. I have not modified the Makefile. Looking at the Make manual[1] in the section "Appending more text to variables" indicates the first way is correct. However, others have had some issue with that not working as expected[2] but the solution is not clear to me. Do you have a recommended command to append and not overwrite? [1]http://www.gnu.org/software/make/manual/make.html#Appending [2]http://stackoverflow.com/questions/2129391/append-to-gnu-make-variables-via-... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Jul 05, 2016 at 10:47:45AM -0500, Dutch Ingraham wrote:
On Tue, Jul 05, 2016 at 06:07:03PM +0300, Andrei Borzenkov wrote:
05.07.2016 17:46, Dutch Ingraham пишет:
On Tue, Jul 05, 2016 at 06:14:07AM +0300, Andrei Borzenkov wrote:
05.07.2016 00:56, Dutch Ingraham пишет: No, solution is to add
-I/usr/include/freetype2
to CFLAGS.
Thanks - that worked. However, I'm now getting two further errors:
dwm.c: In function ‘updatestatus’: dwm.c:1996:23: error: expected ‘)’ before ‘VERSION’ strcpy(stext, "dwm-"VERSION); ^ dwm.c: In function ‘main’: dwm.c:2127:13: error: expected ‘)’ before ‘VERSION’ die("dwm-"VERSION "\n"); ^ Makefile:18: recipe for target 'dwm.o' failed make: *** [dwm.o] Error 1
Most likely you overwrote your CFLAGS instead of adding to them.
That's a distinct possibility. I've tried two ways:
dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS+=-I/usr/include/freetype2 and
dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS=-I/usr/include/freetype2
The above errors are the same either way. I have not modified the Makefile.
Looking at the Make manual[1] in the section "Appending more text to variables" indicates the first way is correct.
However, others have had some issue with that not working as expected[2] but the solution is not clear to me.
Do you have a recommended command to append and not overwrite?
[1]http://www.gnu.org/software/make/manual/make.html#Appending [2]http://stackoverflow.com/questions/2129391/append-to-gnu-make-variables-via-...
I'm now not so certain it is a CFLAGS issue. I just tried to compile the dwm.c code with clang and received the same errors: dutch@linux-uoyk:~/bin/dwm-6.1> clang -I/usr/include/freetype2 dwm.c dwm.c:1008:11: warning: 'XKeycodeToKeysym' is deprecated [-Wdeprecated-declarations] keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); ^ /usr/include/X11/Xlib.h:1687:15: note: 'XKeycodeToKeysym' has been explicitly marked deprecated here extern KeySym XKeycodeToKeysym( ^ dwm.c:1996:23: error: expected ')' strcpy(stext, "dwm-"VERSION); ^ dwm.c:1996:9: note: to match this '(' strcpy(stext, "dwm-"VERSION); ^ dwm.c:2127:13: error: expected ')' die("dwm-"VERSION "\n"); ^ dwm.c:2127:6: note: to match this '(' die("dwm-"VERSION "\n"); ^ 1 warning and 2 errors generated. dutch@linux-uoyk:~/bin/dwm-6.1> Does this clarify or confuse the situation? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/05/2016 11:47 AM, Dutch Ingraham wrote:
dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS+=-I/usr/include/freetype2 and
dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS=-I/usr/include/freetype2
Personally I think that you have confused what goes in the makefile and what goes on the command line. Personally I think that "+=" syntax should be in the makefile and that the correct syntax for a command line would be something more like CFLAGS=/usr/include/freetype2 make but I may be wrong. It depends what else is in the makefile. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-07-05 21:30, Anton Aylward wrote:
On 07/05/2016 11:47 AM, Dutch Ingraham wrote:
dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS+=-I/usr/include/freetype2 and
dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS=-I/usr/include/freetype2
Personally I think that you have confused what goes in the makefile and what goes on the command line.
Personally I think that "+=" syntax should be in the makefile and that the correct syntax for a command line would be something more like
CFLAGS=/usr/include/freetype2 make
but I may be wrong. It depends what else is in the makefile.
Right. It does. :-) I have downloaded the project (it is small). See "http://dwm.suckless.org/". There is no configure script. But there is a "config.mk" file. It contains: # freetype FREETYPELIBS = -lfontconfig -lXft FREETYPEINC = /usr/include/freetype2 # OpenBSD (uncomment) FREETYPEINC = ${X11INC}/freetype2 The BSD variables have to be commented out. Doing that, it builds instantly: cer@Telcontar:~/Compilaciones/test/dwm-6.1> make dwm build options: CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.1" -DXINERAMA LDFLAGS = -s -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft CC = cc CC drw.c CC dwm.c CC util.c CC -o dwm cer@Telcontar:~/Compilaciones/test/dwm-6.1> -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On Tue, Jul 05, 2016 at 09:46:14PM +0200, Carlos E. R. wrote:
On 2016-07-05 21:30, Anton Aylward wrote:
On 07/05/2016 11:47 AM, Dutch Ingraham wrote:
dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS+=-I/usr/include/freetype2 and
dutch@linux-uoyk:~/bin/dwm-6.1> make CFLAGS=-I/usr/include/freetype2
Personally I think that you have confused what goes in the makefile and what goes on the command line.
Personally I think that "+=" syntax should be in the makefile and that the correct syntax for a command line would be something more like
CFLAGS=/usr/include/freetype2 make
but I may be wrong. It depends what else is in the makefile.
Right. It does. :-)
While it might depend upon what is in the makefile, its unclear as to what order the new variable declaration should be. See[1], esp. the first and fourth responses. [1]http://stackoverflow.com/questions/2129391/append-to-gnu-make-variables-via-...
I have downloaded the project (it is small). See "http://dwm.suckless.org/". There is no configure script. But there is a "config.mk" file. It contains:
# freetype FREETYPELIBS = -lfontconfig -lXft FREETYPEINC = /usr/include/freetype2 # OpenBSD (uncomment) FREETYPEINC = ${X11INC}/freetype2
The BSD variables have to be commented out. Doing that, it builds instantly:
cer@Telcontar:~/Compilaciones/test/dwm-6.1> make dwm build options: CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.1" -DXINERAMA LDFLAGS = -s -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft CC = cc CC drw.c CC dwm.c CC util.c CC -o dwm cer@Telcontar:~/Compilaciones/test/dwm-6.1>
YES! That was the issue all along. I must be getting lazy, stupid, or both. In my defense, I've built DWM over 50 times and never touched that file. Also note, for anyone else happening across this thread, the manpath in the config.mk file needs to be adjusted as well. Further, it appears as though dmenu, a small menu program designed to be used with DWM (in fact, DWM is quite useless without it), is not integrating properly. I'll complete this thread if I can find out what the issue is with that. Many thanks to all who responded! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Jul 05, 2016 at 03:43:24PM -0500, Dutch Ingraham wrote:
cer@Telcontar:~/Compilaciones/test/dwm-6.1>
YES! That was the issue all along. I must be getting lazy, stupid, or both. In my defense, I've built DWM over 50 times and never touched that file.
Also note, for anyone else happening across this thread, the manpath in the config.mk file needs to be adjusted as well.
Further, it appears as though dmenu, a small menu program designed to be used with DWM (in fact, DWM is quite useless without it), is not integrating properly. I'll complete this thread if I can find out what the issue is with that.
Many thanks to all who responded!
I've got dmenu working. There were two issues, not necessarily related: (1) the version in the LEAP repo is outdated (4.5 -> 4.6) and (2) there is a missing executable in the repo version. dmenu typically installs three executables: dmenu, dmenu_run, and dmenu_path. The official repo version is missing dmenu_path; I have not determined how or why. Solution is to build from source or (untested) the unofficial package[1]. [1]https://build.opensuse.org/package/show?project=X11%3AUtilities&package=dmenu -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/07/2016 23:56, Dutch Ingraham wrote:
Hi all:
New to OpenSUSE as of two days ago. I tried compiling DWM window manager today, which attempt has so far failed.
I understand OpenSUSE does not come with a full build environment, so I expected a few errors along the way. In fact, the first two errors were for missing X-libs packages (libX11-devel and libXfti-devel), which I installed. Go to https://build.opensuse.org/search?search_text=dwm and look at some successful builds. Regards Dave P -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Jul 05, 2016 at 07:54:25PM +0200, Dave Plater wrote:
On 04/07/2016 23:56, Dutch Ingraham wrote:
Hi all:
New to OpenSUSE as of two days ago. I tried compiling DWM window manager today, which attempt has so far failed.
I understand OpenSUSE does not come with a full build environment, so I expected a few errors along the way. In fact, the first two errors were for missing X-libs packages (libX11-devel and libXfti-devel), which I installed. Go to https://build.opensuse.org/search?search_text=dwm and look at some successful builds.
Thanks - that's a nice resource. (Unfortunately, I haven't been able to pull anything out of it to help my particular case, though.) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Andrei Borzenkov
-
Anton Aylward
-
Carlos E. R.
-
Dave Plater
-
Dutch Ingraham