0

I recently tried to build libXres from the source and I am encountering issues when trying to build from two different manners.

In the first I run the configure script with:

./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/ PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/X11-1.6.7/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Xorgproto-2018.1/share/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Xcb-1.13/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Pthread-stubs-0.1/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Xau-1.0.9/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Xext-1.3.3/lib/pkgconfig/

Then I run make, which causes:

make[2]: Entering directory /media/34GB/Arquivos-de-Programas-Linux/libXres-1.2.0/src' CC XRes.lo XRes.c:9:25: error: X11/Xlibint.h: No such file or directory XRes.c:10:23: error: X11/Xutil.h: No such file or directory In file included from XRes.c:11: /media/34GB/Arquivos-de-Programas-Linux/Xext-1.3.3/include/X11/extensions/Xext.h:34: error: expected ‘)’ before ‘*’ token .............. In file included from XRes.c:12: /media/34GB/Arquivos-de-Programas-Linux/Xext-1.3.3/include/X11/extensions/extutil.h:46: error: expected specifier-qualifier-list before ‘Display’ /media/34GB/Arquivos-de-Programas-Linux/Xext-1.3.3/include/X11/extensions/extutil.h:59: error: expected ‘)’ before ‘*’ token ......... ......... In file included from XRes.c:13: /media/34GB/Arquivos-de-Programas-Linux/Xorgproto-2018.1/include/X11/extensions/XResproto.h:28: error: expected specifier-qualifier-list before ‘CARD32’ error: expected specifier-qualifier-list before ‘CARD8’ /media/34GB/Arquivos-de-Programas-Linux/Xorgproto-2018.1/include/X11/extensions/XResproto.h:100: error: expected specifier-qualifier-list before ‘CARD8’ ........... /XResproto.h:213: error: expected specifier-qualifier-list before ‘CARD8’ In file included from XRes.c:14: ../include/X11/extensions/XRes.h:13: error: expected specifier-qualifier-list before ‘XID’ ../include/X11/extensions/XRes.h:18: error: expected specifier-qualifier-list before ‘Atom’ ../include/X11/extensions/XRes.h:36: error: expected specifier-qualifier-list before ‘XID’ ../include/X11/extensions/XRes.h:47: error: expected specifier-qualifier-list before ‘XID’ ../include/X11/extensions/XRes.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘XResQueryExtension’ ../include/X11/extensions/XRes.h:119: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ............ ‘XResQueryResourceBytes’ XRes.c:25: error: expected ‘)’ before ‘*’ token XRes.c:28: warning: excess elements in struct initializer ........... XRes.c:34: error: ‘close_display’ undeclared here (not in a function) XRes.c:34: warning: excess elements in struct initializer ....... XRes.c:41: error: expected ‘)’ before ‘*’ token XRes.c:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘XResQueryExtension’ ......... XRes.c:264: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘XResQueryClientIds’ XRes.c: In function ‘XResGetClientIdType’: ......... XRes.c:334: error: ‘Bool’ undeclared (first use in this function) XRes.c: In function ‘XResGetClientPid’: XRes.c:352: error: ‘XResClientIdSpec’ has no member named ‘mask’ XRes.c:353: error: ‘CARD32’ undeclared (first use in this function) XRes.c:353: error: expected expression before ‘)’ token XRes.c: At top level: XRes.c:359: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ReadResourceSizeSpec’ ............ make[2]: *** [XRes.lo] Error 1 make[2]: Leaving directory/media/34GB/Arquivos-de-Programas-Linux/libXres-1.2.0/src' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/libXres-1.2.0' make: * [all] Error 2

The many ......... were introduced to make shorter the error message.

The strange thing is that Xlibint.h: and XUtil.h are present in the aforementioned X11 dir. So I don't know what is causing the problem. Perhaps an error on x11.pc ? It seems normal for me and it did work with most of the other X libraries.

I had a similar issue with libXext and so decided to try the same approach that I used with it. Deleted the current libXrender dir, unpacked the compressed bziped file libXres and after running the above configure command, also typed:

export LDFLAGS=-L/media/34GB/Arquivos-de-Programas-Linux/X11-1.6.7/lib/

and a:

export CPPFLAGS=-I/media/34GB/Arquivos-de-Programas-Linux/X11-1.6.7/include/

This time, instead a perfect compilation, I received:

make[2]: Entering directory /media/34GB/Arquivos-de-Programas-Linux/libXres-1.2.0/src' CC XRes.lo CCLD libXRes.la libtool: warning: library '/media/34GB/Arquivos-de-Programas-Linux/X11-1.6.7/lib//libX11.la' was moved. /bin/grep: /media/34GB/Arquivos-de-Programas-Linux/X11-1.2.1/lib/libX11.la: No such file or directory /bin/sed: can't read /media/34GB/Arquivos-de-Programas-Linux/X11-1.2.1/lib/libX11.la: No such file or directory libtool: error: '/media/34GB/Arquivos-de-Programas-Linux/X11-1.2.1/lib/libX11.la' is not a valid libtool archive make[2]: *** [libXRes.la] Error 1 make[2]: Leaving directory/media/34GB/Arquivos-de-Programas-Linux/libXres-1.2.0/src' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/libXres-1.2.0' make: * [all] Error 2

From this link: https://stackoverflow.com/questions/8542496/how-to-make-libtool-point-to-user-installed-library I followed a suggestion of recreating configure and Makefile.in through

make distclean //clean up all the previous generated files
autoconf //or autoreconf to generate configure script from configure.ac and configure.in
automake //to generate new Makefile.in from Makefile.ac
./configure //to generate new Makefile and libtool 

However automake execution returns

configure.ac:38: version mismatch. This is Automake 1.11.6, configure.ac:38: but the definition used by this AM_INIT_AUTOMAKE configure.ac:38: comes from Automake 1.15. You should recreate configure.ac:38: aclocal.m4 with aclocal and run automake again.

and aclocal execution returns:

configure.ac:44: error: must install xorg-macros 1.8 or later before running autoconf/autogen configure.ac:44: the top level autom4te: /usr/local/bin/m4 failed with exit status: 1 aclocal: autom4te failed with exit status: 1

So I am in doubt about what to do. Is there a way to solve it even without using CPPFLAGS and LDFLAGS? If no, what is the best hypothesis to solving using these two flags? Install Automake 1.15? Install xorg-macros 1.18? Or something else?

Thanks for reading all this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.