Compiling Devilspie 0.22 on OpenSolaris/Nevada
I've been using Devilspie for quite some time, and detailed steps on compiling rev 0.10 to run on Solaris 10. Well, I'm now using a OpenSolaris/Nevada Sunray server on x86, so I can no longer use my old binary.
Devilspie has had a complete overhaul since I last built it, so my old instructions don't quite apply anymore. What's more, Nevada has a little bug that will trip up compiling devilspie without a little bit of work.
This post will detail how to compile Devilspie 0.22 on OpenSolaris/Nevada.
- Download the source code tarball - devilspie-0.22.tar.gz - and extract it to a directory of your choice.
- Unfortunately, there is an outstanding bug on Nevada in that there is no x11.pc file required for pkg-config. We can resolve this by creating one of our own.
Create a file called x11.pc and place the following into it:
prefix=/usr/openwin exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include xthreadlib= Name: X11 Description: X Library Version: 0.0 Requires: xproto kbproto inputproto Requires.private: xau xdmcp Cflags: -I${includedir} -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DXTHREADS -DXUSE_MTSAFE_API Libs: -L${libdir} -R${libdir} -lX11 Libs.private:
If you have root access, place this file into the
/usr/lib/pkgconfig
directory.
If you don't have root access, place this anywhere you like. It's only needed temporarily, so I've placed it into thedevilspie-0.22
directory. - Now, for some reason,
pkg-config
doesn't seem to pickup thelibwnck-1.0.pc
file that exists in/usr/lib/pkgconfig
. It expects to findlibwnck.pc
, so lets help it out.If you have root access, symlink
/usr/lib/pkgconfig/libwnck-1.0.pc
to/usr/lib/pkgconfig/libwnck.pc
If you don't have root access, symlink
/usr/lib/pkgconfig/libwnck-1.0.pc
tolibwnck.pc
in the same directory you copied thex11.pc
file to. - If you do not have root access, or have placed the two .pc files into a non-standard location, export the
PKG_CONFIG_PATH
environment variable pointing to the location of these two files. - Configure Devilspie, but include the X11 libs as follows:
$ LIBS=-lX11 ./configure
If you forget the LIBS part, make fails with the following error:
gcc -Wall -Wmissing-prototypes -g -O2 -o devilspie devilspie.o xutils.o e-sexp.o parser.o logical.o matchers.o actions.o -lwnck-1 -lgtk-x11-2.0 -lstartup-notification-1 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lmlib -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 Undefined first referenced symbol in file XMoveResizeWindow actions.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XGetWindowAttributes xutils.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XFree xutils.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XSync xutils.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XGetAtomName xutils.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XSendEvent xutils.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XGetWindowProperty xutils.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XChangeProperty actions.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XMoveWindow actions.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XInternAtom xutils.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) XParseGeometry actions.o (symbol belongs to implicit dependency /usr/openwin/lib/libX11.so.4) ld: fatal: Symbol referencing errors. No output written to devilspie collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `devilspie'
- If all goes well, you should now be able to run make install to install Devilspie.
Remember, if you've used a version prior to 0.13, you will need to recreate your configuration file. The old xml configuration file format has been replaced with the much simpler s-expressions style.
You can find some very good documentation and examples here.