moetunes / Nextwm

snapwm is an easy to configure, dynamic, tiling window manager. Built on dminiwm with a desktop switcher, info bar and reloadable rc file.
53 stars 5 forks source link

Snapwm and compile error with FreeBSD 10-stable #10

Closed xgeek-cub closed 10 years ago

xgeek-cub commented 10 years ago

I tried to build you WM on X64 FreeBSD 10-stable.
As you know the make FreeBSD uses is the pmake so I clone your repo and issued gmake these is the error :
gcc -g -std=c99 -pedantic -Wall -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c -o snapwm.o snapwm.c gmake: gcc: Command not found gmake: *** [snapwm.o] Error 127

if you want to know the error with FreeBSD native make :

gcc -O2 -pipe -g -std=c99 -pedantic -Wall -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c snapwm.c gcc: not found *** Error code 127 Stop. make: stopped in /usr/home/avalon/build/snapwm

PS: http://unix.stackexchange.com/questions/49906/why-is-freebsd-deprecating-gcc-in-favor-of-clang-llvm

moetunes commented 10 years ago

On 16/04/14 20:12, xgeek-cub wrote:

I tried to build you WM on X64 FreeBSD 10-stable.

As you know the make FreeBSD uses is the |pmake| so I clone your repo and issued |gmake| these is the error :

|gcc -g -std=c99 -pedantic -Wall -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c -o snapwm.o snapwm.c gmake: gcc: Command not found gmake: *\ [snapwm.o] Error 127|

if you want to know the error with FreeBSD native |make| : ` gcc -O2 -pipe -g -std=c99 -pedantic -Wall -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -c snapwm.c gcc: not found *\ Error code 127

Stop. make: stopped in /usr/home/avalon/build/snapwm `

— Reply to this email directly or view it on GitHub https://github.com/moetunes/Nextwm/issues/10.

Well , as you know, freebsd now uses clang instead of gcc and I haven't used freebsd so i don't know if the wm will even build on earlier versions of freebsd. I can't offer an immediate fix but if you wait about a week I should have a fix (there's a long weekend for Easter here). Cheers

xgeek-cub commented 10 years ago

Hello and happy holidays No worries; waiting for your go. Thanks

r004 commented 10 years ago

Oh hello xgeek; When you ask this in the Freenode I wasn't sure either. But thanks to uzsolt (http://unix.stackexchange.com/users/27769/uzsolt) we now have a working patch. I tested it but still let moetunes take a look at it to be safe. Also I got attracted to this wild beast (I hate tilling wms but). Thank you on that. PS: moetunes I decided to post here instead of Arch-forum.

diff -ur Nextwm-master.orig/Makefile Nextwm-master/Makefile
--- Nextwm-master.orig/Makefile 2014-03-12 19:46:34.000000000 +0100
+++ Nextwm-master/Makefile  2014-04-16 13:07:08.000000000 +0200
@@ -1,12 +1,12 @@
-CFLAGS+= -g -std=c99 -pedantic -Wall -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
+CFLAGS+= -g -std=c99 -pedantic -Wall -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -I/usr/local/include/
 LDADD+= -lX11 -lXinerama
-LDFLAGS= -Wl,-O1,--sort-common,--as-needed,-z,relro
+LDFLAGS= -Wl,-O1,--sort-common,--as-needed,-z,relro,-L/usr/local/lib
 EXEC=snapwm

 PREFIX?= /usr/local
 BINDIR?= $(PREFIX)/bin

-CC=gcc
+CC=clang

 all: $(EXEC)

diff -ur Nextwm-master.orig/snapwm.c Nextwm-master/snapwm.c
--- Nextwm-master.orig/snapwm.c 2014-03-12 19:46:34.000000000 +0100
+++ Nextwm-master/snapwm.c  2014-04-16 13:03:24.000000000 +0200
@@ -27,6 +27,7 @@
 //#include <X11/keysym.h>
 /* For a multimedia keyboard */
 #include <X11/XF86keysym.h>
+#include <sys/signal.h>
 #include <X11/Xproto.h>
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
moetunes commented 10 years ago

That all looks fine to me. 3 lines edited in the Makefile and 1 in a .c file is less than I thought would be needed. Thanks for getting that sorted out r004.

xgeek-cub commented 10 years ago

Thanks for your nice job. I ask moetunes to take it into account and somehow add that to the tree (if possible).