Compilation issue

38 views
Skip to first unread message

Desmond O. Chang

unread,
Jul 16, 2011, 1:31:57 PM7/16/11
to keynav...@googlegroups.com
Hi,

I can't compile the commit 8b77c69. The error message is:


sh version.sh --header > keynav_version.h
cc -I/usr/X11R6/include -I/usr/local/include -c -o keynav.o keynav.c
keynav.c:23:18: fatal error: glib.h: No such file or directory
compilation terminated.
make: *** [keynav.o] Error 1


My OS is debian sid and I'm sure that libcairo2-dev, libglib2.0-dev,
libxdo-dev, libxinerama-dev are all installed.

The last commit I can compile is b880bf9.

BTW, libxdo-dev isn't in the file "DEBIAN". Please add it.

Thanks,
Des

Jordan Sissel

unread,
Jul 16, 2011, 2:15:21 PM7/16/11
to keynav...@googlegroups.com
On Sat, Jul 16, 2011 at 10:31 AM, Desmond O. Chang <doc...@gmail.com> wrote:
Hi,

I can't compile the commit 8b77c69.  The error message is:


sh version.sh --header > keynav_version.h
cc -I/usr/X11R6/include -I/usr/local/include   -c -o keynav.o keynav.c
keynav.c:23:18: fatal error: glib.h: No such file or directory
compilation terminated.
make: *** [keynav.o] Error 1

Sounds like you don't have pkg-config installed or are missing packages. From the Makefile:

CFLAGS+=$(shell pkg-config --cflags cairo-xlib xinerama glib-2.0 xext x11 xtst 2> /dev/null || echo -I/usr/X11R6/include -I/usr/local/include)

This will use pkg-config to find compiler flags, but on failure will default to some sane ones.  The fail-defaults look exactly like your compiler flags above.

What does this output and what is the exit code?
% pkg-config --cflags cairo-xlib xinerama glib-2.0 xext x11 xtst

Between the two versions you say are good/bad, here is the diff in the Makefile:
-CFLAGS+=$(shell pkg-config --cflags cairo-xlib xinerama glib-2.0 2> /dev/null || echo -I/usr/X11R6/include -I/usr/local/include)
-LDFLAGS+=$(shell pkg-config --libs cairo-xlib xinerama glib-2.0 2> /dev/null || echo -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXtst -lXinerama -lXext -lglib)
+CFLAGS+=$(shell pkg-config --cflags cairo-xlib xinerama glib-2.0 xext x11 xtst 2> /dev/null || echo -I/usr/X11R6/include -I/usr/local/include)
+LDFLAGS+=$(shell pkg-config --libs cairo-xlib xinerama glib-2.0 xext x11 xtst 2> /dev/null || echo -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXtst -lXinerama -lXext -lglib)

I added xext, x11, and xtst.

 


My OS is debian sid and I'm sure that libcairo2-dev, libglib2.0-dev,
libxdo-dev, libxinerama-dev are all installed.

The last commit I can compile is b880bf9.

BTW, libxdo-dev isn't in the file "DEBIAN".  Please add it.

Added, but take note: Debian generally has ancient versions of things, especially of xdotool due to problems with the test suite passing on their build cluster, and most especially if you are building from git or are using recent releases of keynav - just be aware that keynav may not work with it. Try first, if it breaks, you'll need to install a recent version of xdotool/libxdo yourself.

-Jordan

Desmond O. Chang

unread,
Jul 16, 2011, 3:46:42 PM7/16/11
to keynav...@googlegroups.com
On Sat, 16 Jul 2011 11:15:21 -0700, Jordan Sissel <j...@semicomplete.com> wrote:
> On Sat, Jul 16, 2011 at 10:31 AM, Desmond O. Chang <doc...@gmail.com>wrote:
>
>> Hi,
>>
>> I can't compile the commit 8b77c69. The error message is:
>>
>>
>> sh version.sh --header > keynav_version.h
>> cc -I/usr/X11R6/include -I/usr/local/include -c -o keynav.o keynav.c
>> keynav.c:23:18: fatal error: glib.h: No such file or directory
>> compilation terminated.
>> make: *** [keynav.o] Error 1
>>
>
> Sounds like you don't have pkg-config installed or are missing packages.
> From the Makefile:
>
> CFLAGS+=$(shell pkg-config --cflags cairo-xlib xinerama glib-2.0 xext x11
> xtst 2> /dev/null || echo -I/usr/X11R6/include -I/usr/local/include)
>
> This will use pkg-config to find compiler flags, but on failure will default
> to some sane ones. The fail-defaults look exactly like your compiler flags
> above.
>
> What does this output and what is the exit code?
> % pkg-config --cflags cairo-xlib xinerama glib-2.0 xext x11 xtst

This reports that libxtst-dev isn't installed. After installing
libxtst-dev I can compile the code now.

> Between the two versions you say are good/bad, here is the diff in the
> Makefile:
> -CFLAGS+=$(shell pkg-config --cflags cairo-xlib xinerama glib-2.0 2>
> /dev/null || echo -I/usr/X11R6/include -I/usr/local/include)
> -LDFLAGS+=$(shell pkg-config --libs cairo-xlib xinerama glib-2.0 2>
> /dev/null || echo -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXtst -lXinerama
> -lXext -lglib)
> +CFLAGS+=$(shell pkg-config --cflags cairo-xlib xinerama glib-2.0 xext x11
> xtst 2> /dev/null || echo -I/usr/X11R6/include -I/usr/local/include)
> +LDFLAGS+=$(shell pkg-config --libs cairo-xlib xinerama glib-2.0 xext x11
> xtst 2> /dev/null || echo -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXtst
> -lXinerama -lXext -lglib)
>
> I added xext, x11, and xtst.

I think libxext-dev, libx11-dev, libxtst-dev should be added to the
file "DEBIAN" too.

>> My OS is debian sid and I'm sure that libcairo2-dev, libglib2.0-dev,
>> libxdo-dev, libxinerama-dev are all installed.
>>
>> The last commit I can compile is b880bf9.
>>
>> BTW, libxdo-dev isn't in the file "DEBIAN". Please add it.
>>
>
> Added, but take note: Debian generally has ancient versions of things,
> especially of xdotool due to problems with the test suite passing on their
> build cluster, and most especially if you are building from git or are using
> recent releases of keynav - just be aware that keynav may not work with it.
> Try first, if it breaks, you'll need to install a recent version of
> xdotool/libxdo yourself.

The version of libxdo-dev in Debian is 1:2.20110530.1-3. It's the
current version on the project's homepage. Is it up-to-date enough?

Anyway, I can compile the code now. The program works. Thank you.

Des

Jordan Sissel

unread,
Jul 16, 2011, 6:43:49 PM7/16/11
to keynav...@googlegroups.com
I'll update that as well. Thanks!
 

>> My OS is debian sid and I'm sure that libcairo2-dev, libglib2.0-dev,
>> libxdo-dev, libxinerama-dev are all installed.
>>
>> The last commit I can compile is b880bf9.
>>
>> BTW, libxdo-dev isn't in the file "DEBIAN".  Please add it.
>>
>
> Added, but take note: Debian generally has ancient versions of things,
> especially of xdotool due to problems with the test suite passing on their
> build cluster, and most especially if you are building from git or are using
> recent releases of keynav - just be aware that keynav may not work with it.
> Try first, if it breaks, you'll need to install a recent version of
> xdotool/libxdo yourself.

The version of libxdo-dev in Debian is 1:2.20110530.1-3.  It's the
current version on the project's homepage.  Is it up-to-date enough?

Oh, cool - that's good news! I don't much follow the versioning released in debian - Last I knew of the maintainer of xdotool (who is awesome) was working with the debian build folks to resolve some random test failures under certain debian platforms. 

-Jordan
Reply all
Reply to author
Forward
0 new messages