0

Related topic is here

Tried to link some files to /lib like this

[/opt/lib] # ln -s libncurses.so.5.7 /lib/
[/opt/lib] # ln -s libncursesw.so.5.7 /lib/

Compiler still can't find any ncurses libs...

Trying to compile menuconfig in psybnc source. Where those auto tools seeking libraries? How to debug auto tools or just tell me how to add another library path because /opt/lib need to be used instead of /lib or any other place where auto tools are seeking.

p.s. this doesn't work

[/share/HDA_DATA/Linux/psybnc] # export LD_LIBRARY_PATH="/opt/lib:$LD_LIBRARY_PATH"         
[/share/HDA_DATA/Linux/psybnc] # make menuconfig
Initializing Menu-Configuration
[*] Running Conversion Tool for older psyBNC Data.
Using existent configuration File.
[*] Running Autoconfig.
System: Linux
Socket Libs: Internal.
Environment: Internal.
Time-Headers: in time.h and sys/time.h
Byte order: Big Endian.
IPv6-Support: Yes, general support. But no interface configured.
async-DNS-Support: Yes.
SSL-Support: No openssl found. Get openssl at www.openssl.org
Creating Makefile
[*] Creating Menu, please wait.
This needs the ncurses library. If it is not available, menuconf wont work. If you are using curses, use make menuconfig-curses instead.

[/share/HDA_DATA/Linux/psybnc] # ls /opt/lib | grep libncurses
libncurses.so@
libncurses.so.5@
libncurses.so.5.7*
libncursesw.so@
libncursesw.so.5@
libncursesw.so.5.7*

UPDATE:

this topic flagged for removal, answer is posted on related topic which I mentioned above

holms
  • 1,464
  • 7
  • 20
  • 37

2 Answers2

1

Try setting LD_LIBRARY_PATH before compiling, in a bash console type:

export LD_LIBRARY_PATH="your_new_lib_path"

or, to keep the previous settings and just prepend your new library path:

export LD_LIBRARY_PATH="your_new_lib_path:$LD_LIBRARY_PATH"
rems
  • 2,240
  • 13
  • 11
  • updated post, doesn't work – holms Feb 10 '11 at 16:02
  • Is /opt/lib listed in /etc/ld.so.conf ? Did you run ldconfig ? What operating system are you running? Are the ncurses development packages installed? – rems Feb 10 '11 at 16:49
  • 32 bit or 64 bit system? Are the ncurses libraries the same architecture? Check it with " file /bin/ls /opt/lib/libncurses* " – rems Feb 10 '11 at 16:52
  • oh man... have you read related topic? =/ Linux NAS-LI 2.6.33.2 #1 Wed Jan 5 02:06:35 CST 2011 armv5tel unknown , libs installed with IPKG packet manager (native), /opt/lib is in ld.so.conf. ldconfig shows absolutely nothing. file command: /opt/lib/libncurses.so.5.7: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped – holms Feb 10 '11 at 17:02
  • Have you installed the ncurses-devel package ? – rems Feb 10 '11 at 17:34
  • that was no, but that is a part of an answer=) – holms Feb 10 '11 at 18:47
0

LIBRARY_PATH is the environment variable that GCC uses when looking for libraries to link against. In contrast, LD_LIBRARY_PATH, wrongly suggested in another answer, is used by the dynamic linker—the one loading shared libraries for the already compiled binary on its startup—and not by the linker that GCC invokes. The key distinction is "dynamic linker" (e.g. /lib64/ld-linux-x86-64.so.2) vs simply "linker" (e.g. /usr/bin/ld).

Ruslan
  • 213
  • 1
  • 6