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?
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:
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:
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)
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.
|All times are GMT -5. The time now is 02:53 AM.|