Re: Problem compiling glib




--- On Mon, 4/8/13, Chris Fisichella <chris communityrenewables com> wrote:

From: Chris Fisichella <chris communityrenewables com>
Subject: Re: Problem compiling glib
To: "Sergei Steshenko" <sergstesh yahoo com>
Cc: "Patrick Welche" <prlw1 cam ac uk>, gtk-list gnome org
Date: Monday, April 8, 2013, 6:39 AM

Sergei Steshenko <sergstesh yahoo com>:
 
--- On Fri, 4/5/13, Chris Fisichella <chris communityrenewables com> wrote:

From: Chris Fisichella <chris communityrenewables com>
Subject: Re: Problem compiling glib
To: "Patrick Welche" <prlw1 cam ac uk>
Cc: "Sergei Steshenko" <sergstesh yahoo com>, gtk-list gnome org
Date: Friday, April 5, 2013, 4:49 AM

Patrick Welche <prlw1 cam ac uk>:

On Thu, Apr 04, 2013 at 11:04:02AM -0700, Sergei Steshenko wrote:
Interestingly enough my self-built 'xmllint' which is a part of
libxml2-2.9.0 doesn't at all show dependency on 'readline':

Indeed - my xmllint also doesn't depend on readline. I looked on an ubuntu
system and found that there it did, so the original bug report made
more sense...

Cheers,

Patrick


Thanks for the debugging help. I noticed how Sergei has libraries in 
other places besides /usr/local.

I am not familiar -rpath you mentioned earlier. Where can I find 
information about that?

I am going to try to recompile the dependencies a little more 
methodically. I'll include a build of libxml2. When I install either 
dbus or readline I find gdm breaks. I'll keep an eye out for locating 
libraries in other places and see how I can use that.

Thanks,
Chris


On 'rpath' - you need to carefully read 'man ld', possibly online: 
http://man7.org/linux/man-pages/man8/ld.so.8.html .


I do not use 'rpath' explicitly, i.e. I leave it to 'configure' to decide.

Do not install anything into system locations. I am building a lot of 
stuff as non-root user using my own AppsFromScratch.

FWIW, see attached autogenerated by AppsFromScratch 
'config_wrapper.sh' used by my tool to run 'configure' of 
libxml2-2.9.0. You can figure out dependencies and other stuff (e.g. 
PKG_CONFIG_PATH settings) needed to build libxml2-2.9.0.

...

Also attached 'config_wrapper.sh' for glib-2.34.3 - it's trivial to 
understand which file is related to which library from the contents.

Regards,
  Sergei.

Good Morning Patrick and Sergei,

I used both of your ideas to get things going. That ldconfig -v is a very useful command. Also, removing the 
reference in /etc/ld.so.conf.d/libc.conf /usr/local allowed me to  install libraries and not cripple my 
system.

Sergei, I looked at AppsFromScratch and it was a little too much for me to take in, but I did adopt your very 
good idea to make a config_wrapper.sh file. I am now using that to build and things are going much smoother. 

So, I should mention, I got glib to compile. I then moved on. For those who come across this list, I have the 
following suggestions:
1. check out /etc/ld.so.conf.d  If any of the files reference /usr/local, comment that line out.
2. When you need to use something you built, try the config_wrapper approach. Here is a typical file. It 
resides in the build directory you download from the internet:
 #!/bin/sh

cd /home/sensing/gaf-gEDA/libXi-1.7

PATH=/usr/local/bin:/usr/bin:/bin
export PATH

LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
export PKG_CONFIG_PATH

LDFLAGS=''
export LDFLAGS

XDG_DATA_DIRS=''
export XDG_DATA_DIRS

CPPFLAGS=''
export CPPFLAGS


echo ""
echo "*** sorted env BEGIN ***"
env | sort
echo "*** sorted env END   ***"
echo ""


./configure  --prefix=/usr/local/ 2>&1 1> ~/130407_057a_libXi-1.7_configure.log

#This is what the make file looks like:
#LD_LIBRARY_PATH=/usr/local/lib make 2>&1 | tee ~/130407_057b_libXi-1.7_make.log 
#for make install:
#sudo LD_LIBRARY_PATH=/usr/local/lib make install 2>&1 | tee ~/130407_057c_libXi-1.7_sudo_make_install.log 

Make sure you do a
chmod u+x config_wrapper.sh
to make it an executable script.

Here, I am trying to build libXi. The line after the /bin/sh is just the directory you downloaded. The next 
lines don't change. From download to download, I update the count numbers (057 in this example) and the 
library names for the log files. It's handy to go back and check things.

When the file is ready, execute ./config_wrapper.sh on the command line and it will run the configure 
command. You won't see text, except for errors and warnings because I have redirected output to a log file. 
After you satisfy all the warnings by installing other packages in the same manner, you copy and paste the 
make and make install commands to the command line.

The commented line that starts with LD_LIBRARY path is the make command. Now that we have removed /usr/local 
from ld.so.conf.d,  you have sort of a sandbox. When you want to reference your compiled work, you need to 
prepend the command with:
LD_LIBRARY_PATH=/usr/local/lib

When this line runs, looks for compile time errors and fix them if you can.

The line that starts with sudo LD_LIBRARY_PATH= is the make install command. Just copy it to the command line 
to install the software.

Now on the build for glib, I had to temporarily reinstate the /etc/ld.so.conf.d  reference to /usr/local/ I 
think it had something to do with python2.7 not being able to find it's libraries. After the build, I just 
commented it back out. But, that might have also been before I realized I need to have LD_LIBRARY_PATH before 
both make and make install. 

Thank you both for the help. I do appreciate it!
Best Regards,
Chris


The fundamental idea of AppsFromScratch is to be able to build and install stuff _not_ having root privileges 
(even though I have them) on my machines.

My point is that the provided files were used to build and install stuff not changing anything under /etc 
since it's a system location.

If you decide to take AppsFromScratch, the one you find on berlios.de is quite outdated. I can provide you 
with a much more updated one - licenses are the same.

Regards,
  Sergei.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]