LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   LibX11 problem in gtk (https://www.linuxquestions.org/questions/debian-26/libx11-problem-in-gtk-407880/)

Carez 01-25-2006 12:29 PM

LibX11 problem in gtk
 
When I try to install gtk, there is always one problem: first the error: "X development libraries not found" appears. I've found the solution, that I have to use: --x-includes=/... and --x-libraries=/...
then another error appears: *** libX11 not found. Check 'config.log' for more details.

Is this because I chose the wrong path? I tried more then one; and although libx11 is correctly installed, it isn't found... I also tried to find solutions in the inet, but none solved the problem

Thanks in advance

rylan76 01-26-2006 12:04 AM

I don't know about your specific problem, but if your -do- have the library, there is a workaround (sometimes) by using a symlink.

To do this, you need to open the "./configure" file of the package / program you want to compile. Search for the section that does the check that is failing.

For example, I wanted to compile something that was looking for, lets say, libabc.a. I -knew- I had libabc.a, but the package's configure wasn't finding it.

So, I went into the configure script and searched for the section trying to compile a program on libabc.a (to check if it is present in the system). I discovered that the configure script was simply looking in the wrong place (/usr/local/lib instead of /usr/lib, if I remember right).

So the solutions was to put a symlink to /usr/lib/libabc.a into /usr/local/lib, so when the script called cc to compile the test program, and cc went looking for the library in /usr/local/lib, it will find the symlink there to /usr/lib...

So, in effect, you can "trick" the compiler to use a library in a directory that it does not refer to, by putting a symlink to that library in a directory the compiler does refer to.

Eg.

In /usr/local/lib do

ln -s libabc.a /usr/lib/libabc.a

So, if the script is looking in /usr/local/lib for libabc.a (where it does not exist, causing the compile to fail) there will be a symlink which will cause it to -actually- look in /usr/lib, and find the library there.

Hope this helps!

Carez 01-26-2006 01:39 PM

I've already tried with symlinks, didn't work.... any other ideas?

HappyTux 01-26-2006 01:53 PM

Quote:

Originally Posted by Carez
When I try to install gtk, there is always one problem: first the error: "X development libraries not found" appears. I've found the solution, that I have to use: --x-includes=/... and --x-libraries=/...
then another error appears: *** libX11 not found. Check 'config.log' for more details.

Is this because I chose the wrong path? I tried more then one; and although libx11 is correctly installed, it isn't found... I also tried to find solutions in the inet, but none solved the problem

Thanks in advance

Make sure that you have installed the x-dev package. For the file not found it looks like you need libx11-dev.

Code:

>$ apt-file search libX11
ia32-libs: emul/ia32-linux/usr/X11R6/lib/libX11.so.6
ia32-libs: emul/ia32-linux/usr/X11R6/lib/libX11.so.6.2
libooc-x11-dev: usr/lib/oo2c/X11/libX11.Mod
libooc-x11-dev: usr/lib/oo2c/X11/obj/libX11.h
libooc-x11-dev: usr/lib/oo2c/X11/sym/libX11.Sym
libx11-6: usr/X11R6/lib/libX11.so.6
libx11-6: usr/X11R6/lib/libX11.so.6.2
libx11-6-dbg: usr/X11R6/lib/debug/libX11.so.6
libx11-6-dbg: usr/X11R6/lib/debug/libX11.so.6.2
libx11-dev: usr/X11R6/lib/libX11.a
libx11-dev: usr/X11R6/lib/libX11.so

You may want to install the apt-file package for future problems like this it works similar to apt-get get in that you must apt-file update as root then can use the search command as normal user.

rylan76 01-27-2006 03:20 AM

Quote:

Originally Posted by Carez
I've already tried with symlinks, didn't work.... any other ideas?

Mostly what happytux says above - make sure you have everything correctly installed and configured. Other than that, it has sometimes worked for me as well to actually get an -older- version of a library from its distribution site. Sometimes the older version would work, while the current / newest one wouldn't find its dependencies, for example.

If you are feeling adventurous, and the packager (the person putting the application togeteher) included his configure.in and maybe Makefile.am autoconf source files, you might try editing those to find the library correctly - but that is not for the faint of heart.

Carez 02-03-2006 06:32 AM

hey thanks, i tried your suggestions, they worked

ainos984 11-20-2008 10:06 AM

hi, I have the same problem.
I followed all your advices, but it still don't work... :confused:
I don't know what to do, can someone help me?
thank

makuyl 11-20-2008 01:08 PM

Dug up an old post there. You might want to paste in the exact error message.


All times are GMT -5. The time now is 04:22 PM.