LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-17-2019, 09:01 AM   #1
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
Issue trying to compile libXres


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:

Code:
./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/Arqui
Then I run make, which causes:

Quote:

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’
...........
/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:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘XResQueryExtension’
............
‘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:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘XResQueryExtension’
.........
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 bziped libXres file and after running the above configure command, also typed:

Code:
export LDFLAGS=-L/media/34GB/Arquivos-de-Programas-Linux/X11-1.6.7/lib
Code:
export CPPFLAGS=-I/media/34GB/Arquivos-de-Programas-Linux/X11-1.6.7/include/
This time, instead a perfect compilation, I received:

Quote:
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/...talled-library I followed a suggestion of recreating configure and Makefile.in through

Code:
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, I executed all the four above steps and it did not change the outcome. I will appreciate any suggestions of how solve the above compilation problems. Many Thanks.
 
Old 06-17-2019, 10:06 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Did you examine the output of the "configure" command before trying the "make". The "configure" is usually quite verbose and also usually puts a log there. It will give many WARNINGs which usually can be ignored but any errors or failures need to be addressed. It is only after you've addressed those that you should rerun the "configure" then the "make".

Sometimes it is simple things such as the configure looks for libblah.so.2 but you you have libblah.so.4 - often you can solve that by making a symbolic link of libblah.so.4 to libblah.so.2. The configure finds the link and knows to use your newer version.

Other times it may be you don't have the library or some other dependency and need to install that first.
 
Old 06-20-2019, 03:34 PM   #3
coltson
Member
 
Registered: Oct 2010
Posts: 149

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by MensaWater View Post
Did you examine the output of the "configure" command before trying the "make". The "configure" is usually quite verbose and also usually puts a log there. It will give many WARNINGs which usually can be ignored but any errors or failures need to be addressed. It is only after you've addressed those that you should rerun the "configure" then the "make".

Sometimes it is simple things such as the configure looks for libblah.so.2 but you you have libblah.so.4 - often you can solve that by making a symbolic link of libblah.so.4 to libblah.so.2. The configure finds the link and knows to use your newer version.

Other times it may be you don't have the library or some other dependency and need to install that first.
It didn't say much, but this here might be important:
Quote:
Package xorg-macros was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-macros.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-macros' found
There is only one libX11.la that is in the expected /media.../X11/lib dir.

*********EDITED******

The libtools errors were because I was pointing the wrong directory (X11/include when it shall be X11/include/X11). However doing so, the first error remains.

*********EDITED2******

Created sym links to these two files
Code:
.../X11-1.6.7/include/X11/Xutil.h
and
Code:
.../X11-1.6.7/include/X11/Xlibint.h
to /usr/local/include. It didn't work.

Last edited by coltson; 06-20-2019 at 05:55 PM.
 
Old 06-21-2019, 07:44 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Configure is telling you about a missing package.

This link has a solution for the same message that may work for you.
 
Old 06-23-2019, 12:21 PM   #5
coltson
Member
 
Registered: Oct 2010
Posts: 149

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by MensaWater View Post
Configure is telling you about a missing package.

This link has a solution for the same message that may work for you.
Well, I installed Util-marcros 1.19.2 that contains xorg macros and it did not change anything.
 
Old 06-24-2019, 08:07 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by coltson View Post
Well, I installed Util-marcros 1.19.2 that contains xorg macros and it did not change anything.
So when you reran configure after installing that you still got:
Quote:
Package xorg-macros was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-macros.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-macros' found
If so you'd want to do as it suggests and modify the PKG_CONFIG_PATH environment variable.
 
1 members found this post helpful.
Old 06-26-2019, 02:07 PM   #7
coltson
Member
 
Registered: Oct 2010
Posts: 149

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by MensaWater View Post
So when you reran configure after installing that you still got:


If so you'd want to do as it suggests and modify the PKG_CONFIG_PATH environment variable.
Sorry, I did not explained myself well, the xorg-macros message vanished, what I meant was that the result of make continued to be the same.

However I was able to detect the source of the problems with libXres and libXext. The line
Quote:
prefix=/media/34GB/Arquivos-de-Programas-Linux/X11-1.2.1
on the x11.pc file had to be
Quote:
prefix=/media/34GB/Arquivos-de-Programas-Linux/X11-1.6.7
. I changed the dir name and was able to solve it then. Anyway, in the end I didn't need libXres (neither libXext) and hence xorg-macros, just needed libXrender and libXft
 
1 members found this post helpful.
  


Reply

Tags
configure, make, xorg


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Eglibc cannot compile suffix of object files while trying to cross compile Bry6n Linux From Scratch 0 08-21-2012 06:14 PM
Trying to patch kernel + compile, compile is looping. kripz Linux - Kernel 1 06-16-2009 06:51 AM
Compile madwifi, ... compile error , how can i do. ERBRMN Linux - Networking 3 03-08-2006 07:56 PM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 04:22 PM
to compile, or not to compile? Abe_the_Man Linux - General 1 10-09-2003 03:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration