LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 08-27-2010, 06:17 PM   #1
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit ubuntu 12.04 LTS
Posts: 205

Rep: Reputation: 15
how to find and install 32-bit X11 libraries on 64-bit ubuntu 10.04


I just created a new 64-bit ubuntu 10.04 system with codeblocks 10.05 to continue developing a 3D graphics engine/server that I put aside about 1 year ago. After some futzing, I can get simple new test projects to compile and execute, but I cannot get my 3D engine to compile.

The problem is the following. The compiler appears to compile all the files successfully, but then stops and issues the following error message:

ld cannot find -lX11

I only had the 32-bit implementation of my code working when I stopped developing a year ago, so I need to get that working first.

As far as I can tell, the problem is this. I installed the xorg-dev package, which installed the 64-bit include files and library files, but not the 32-bit include files and library files. Try as I might, I cannot find any separate package that includes the 32-bit include files and library files. Actually, I assume a single set of include files will support both 32-bit and 64-bit development... but I'm pretty sure I do need to install a set of 32-bit libraries on my computer to compile this application. I did manage to find and install both 32-bit and 64-bit versions of the OpenGL libraries, but I can't find the X11 files.

Is this probably my problem? If so, how do I download and install those 32-bit libraries on my 64-bit ubuntu 10.04 system?
 
Old 08-27-2010, 06:42 PM   #2
fbsduser
Member
 
Registered: Oct 2009
Distribution: Hackintosh, SlackWare
Posts: 266

Rep: Reputation: 30
Have you tried compiling it after installing the xorg-dev package? It may just compile properly with only those libraries. You might also want to try and get ia32-dev (those are some x86 specific dev libs) those might help you.
 
Old 08-27-2010, 06:53 PM   #3
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit ubuntu 12.04 LTS
Posts: 205

Original Poster
Rep: Reputation: 15
ia32-dev or ia32-libs

Quote:
Originally Posted by fbsduser View Post
Have you tried compiling it after installing the xorg-dev package? It may just compile properly with only those libraries. You might also want to try and get ia32-dev (those are some x86 specific dev libs) those might help you.
I don't see ia32-dev package listed, but I do already have the ia32-libs package installed if that's what you meant to say.

Also, I have a backup of the old /usr/lib, /usr/lib32, /usr/lib64 directories from when I was developing this application about 1 year ago, and there is a separate set of libX11.so libraries in that /usr/lib32 directory. Unfortunately, I'm sure they're far out of date by now... and I have no idea where I found and installed them originally (about 2 years ago).

Last edited by maxreason; 08-27-2010 at 06:55 PM.
 
Old 08-27-2010, 10:42 PM   #4
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Check this page (last section): https://help.ubuntu.com/community/32bit_and_64bit
 
Old 08-28-2010, 01:12 PM   #5
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit ubuntu 12.04 LTS
Posts: 205

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jay73 View Post
I don't see anything new to me in that webpage. I do see a reference to this getlibs script, but I haven't been able to find it or understand whether it even works for libraries (without an executable). Actually I do have an old backup executable compiled 1+ year ago, which maybe I can copy to my system.

Hey! Do any of you have 32-bit ubuntu 10.04 installed (not 64-bit). If so, presumably the libX11.so.* files installed in your /usr/lib directory are just what I need. Perhaps you could post them here or send me a PM and I'll give you an email address to send them to me.
 
Old 08-28-2010, 10:04 PM   #6
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Hi,
Are you sure that the library wasn't installed with the ia32-libs? I just had a look at my /usr/lib32 and it does have libx11.so... It probably can't be found because a quick look at /etc/ldconf.so shows that the linker isn't set up to search the lib32 directory. I gues that means you need to pass the full path explicitly.

By the way, all packages can be searched and downloaded manually from
http://packages.ubuntu.com/
There is a search box at the bottom of the page.
The .so file can be found in the libx11-6 package (the static library is in the libx11-dev package). For 32 bit jaunty, that would be here:
http://packages.ubuntu.com/jaunty/libx11-6

It can be installed with:
sudo dpkg -i --force-architecture libx11*
but you probably shouldn't do that, for two reasons. First, if you extract the contents of the .deb package, you will find that it is configured to install to /usr/lib/, which would overwrite the 64 bit version. I guess you could set a different prefix in the .pc file (in the package-config directory) but that wouldn't solve the second problem: the package has multiple dependencies that you would have to download (and edit), too. If the library and the headers is all you need, it is probably better to extract and copy them manually and to call them with their full path.

Last edited by jay73; 08-28-2010 at 10:13 PM.
 
Old 08-30-2010, 03:22 PM   #7
maxreason
Member
 
Registered: Dec 2007
Location: phobos, mars
Distribution: 64-bit ubuntu 12.04 LTS
Posts: 205

Original Poster
Rep: Reputation: 15
Thanks. Well, I'm not entirely sure when it appeared, but it is on my system now. Perhaps I was mistaken about having installed ia32-libs previously. Maybe I had installed ia32-dev but not ia32-libs? It sure would be nice if some utility existed that lets you specify a file... and tells you what package it is in. Of course, if the files don't contain symbolic links, it is impossible to know for sure exactly what the file might be - for example libX11.so.6.3.22.11.7 when all you know is you want the libX11.so library. I guess support for wildcard characters would solve that problem.

I found it necessary to make oodles of symbolic links for the various libraries my application needs to access. Maybe this is unavoidable, but it seems rather a hassle.

Thanks for the help.
 
Old 08-30-2010, 04:04 PM   #8
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,143
Blog Entries: 1

Rep: Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000
I read the suggestions above and couldnt help but notice that everyone is jumping into the super-complicated territory right away.

Might i suggest starting with the simplest of the simple,..

ldconfig -v -x

-x tells it not to re-write the database, if you feel comfortable re-writing it,.. remove the -x

I know I might not get any points for being all wizard-like and CLI console commandoish -- but I'd try the simple stuff first.

And if it doesnt work - hey, at least you covered your bases.

Last edited by szboardstretcher; 08-30-2010 at 04:05 PM.
 
Old 08-30-2010, 08:51 PM   #9
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Quote:
It sure would be nice if some utility existed that lets you specify a file... and tells you what package it is in. O
Such a utility does exist. It is called apt-file.
Quote:
apt-file - APT package searching utility -- command-line interface
Install it, run apt-file update to create the database and then you can perform multiple types of search on the online repositories. The one you would use to find the package containing libX11.so is:
Quote:
apt-file search libX11.so
Quote:
jurgen@Durindana:~$ apt-file search libX11.so
ia32-libs: /usr/lib32/libX11.so
ia32-libs: /usr/lib32/libX11.so.6
ia32-libs: /usr/lib32/libX11.so.6.3.0
libx11-6: /usr/lib/libX11.so.6
libx11-6: /usr/lib/libX11.so.6.3.0
libx11-6-dbg: /usr/lib/debug/usr/lib/libX11.so.6.3.0
libx11-dev: /usr/lib/libX11.so
lsb-build-base3: /usr/lib/lsb3/libX11.so
 
  


Reply


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
64 bit cpu-64 bit Ubuntu-are there 32 bit app issues? sofasurfer Ubuntu 7 04-09-2014 02:02 PM
Howto install 32-bit libraries on 64-bit Linux using yum shawn_t Linux - Server 16 07-13-2012 02:46 AM
Wine 32 bit on Slackware 13 64 bit problems: configure can't find some libraries ozanbaba Slackware 28 11-26-2010 02:42 PM
LXer: Ubuntu 32-bit, 32-bit PAE, 64-bit Benchmarks LXer Syndicated Linux News 0 12-30-2009 11:00 AM
how do I install 32-bit compiler libraries onto a 64-bit machine? charleycat Linux - Software 1 08-16-2007 01:45 PM


All times are GMT -5. The time now is 06:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration