LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-01-2009, 11:12 AM   #1
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
File Differences between libncurses and lib32ncurses


I have 64 and 32-bit libncurses installed. I am having a linking problem, and need to point to libn32ncurses.

What is the difference between the 64 and 32-bit files (differences in name), so I can set my load library environment variables correctly?
 
Old 10-01-2009, 03:00 PM   #2
shahkent
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Rep: Reputation: 1
Not to sound redundant, but the 64-bit version of libncurses is specifically intended for 64-bit applications, so you can't link to or compile a 32-bit application using this version of libncurses. Based on your description, you are trying to link a 32-bit application.

Since you have both versions of installed, then you can get around the linking problem as follows:

1. Let's say that the 32-bit libncurses file on your system is called libncurses.so.5.4 and that the file is located in the /usr/lib directory. You can create a soft-link to this file as follows:

cd /usr/lib
ln -s libncurses.so.5.4 libn32ncurses.so

This should satisfy the linker when it looks for libn32ncurses.so, assuming that the /usr/lib directory is in your LD_LIBRARY_PATH environment variable.

If you have a pre-compiled binary (let's call it myprog) that requires this library, then you can check to see if the linker is satisfied by using the ldd command:

ldd myprog

The linker should show you which libraries it is able to find. libn32ncurses.so should appear in the output. Here's an example for vi from my machine:

$ ldd /usr/bin/vim
libncurses.so.5 => /usr/lib64/libncurses.so.5 (0x0000003e8cb00000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003e8d300000)
libacl.so.1 => /lib64/libacl.so.1 (0x0000003e8c900000)
libgpm.so.1 => /usr/lib64/libgpm.so.1 (0x0000003e8cf00000)
libperl.so => /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE/libperl.so (0x0000003e8db00000)
libm.so.6 => /lib64/tls/libm.so.6 (0x0000003e8c500000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000003e8eb00000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000003e8c000000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003e8c300000)
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000003e8c700000)
libattr.so.1 => /lib64/libattr.so.1 (0x0000003e8d500000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003e8cd00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003e90900000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003e8d900000)
/lib64/ld-linux-x86-64.so.2 (0x0000003e8be00000)

Notice that on my machine, vi was compiled against the 64-bit version of libncurses (I have the 64-bit version of Redhat installed on this machine) which is located in the /usr/lib64/ directory.

I hope that this info helps.

Shahriar.
 
  


Reply

Tags
32bit



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
fatal: libncurses.so.5: open failed: No such file or directory xpucto Solaris / OpenSolaris 8 09-08-2007 01:26 AM
[Comp] How to create a file from the differences between file1 and file2 Xeratul Linux - Software 2 11-19-2006 01:20 PM
File System Differences? pallbearer Linux - Newbie 2 03-12-2004 05:13 AM
differences between file systems nakkaya Linux - Hardware 1 03-13-2003 04:32 PM
Patch file name differences wsampson Linux From Scratch 1 11-24-2002 01:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:10 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