Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Trying to get compile psybnc on NAS. ipkg is default package manager in here. I've installed ncurses already, it's in /opt/lib (libncurses.so)

[\w] # ls /opt/lib | grep ncurses
libncurses.so
libncurses.so.5
libncurses.so.5.7
libncursesw.so
libncursesw.so.5
libncursesw.so.5.7

[\w] # file libncurses.so.5.7
libncurses.so.5.7: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, stripped

I added this path to /etc/profile

[\w] # echo $PATH     
/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/opt/lib

So trying to make menuconfig gives me this error

[\w] # 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.
make: *** [menuconfig] Error 1

Same goes for make menuconfig-curses

[\w] # make menuconfig-curses 
Initializing Menu-Configuration using Curses
[*] 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 curses library. If it is not available, menuconf wont work.
make: *** [menuconfig-curses] Error 1

Psybnc compiled ok, just wanna work with menuconfig instead of configuration file.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

With a help of my FRIEND, I finally know what's happend.

First of all ncurses-dev need to be installed on NAS if you want to compile any package who have dependencies, you need headers of those dependencies and ncurses-dev packages have them

so

ipkg install ncurses-dev

then go edit Makefile in you source directory and add CFLAGS like this:

CCFLAGS = -I/opt/include -I/opt/include/ncurses

this path is path of header files you need, that's why autoconf tools couldn't find them. but you need to put cflags to gcc as param, because autotools ingnores overrided variables...

so I just opened Makefile and added $(CCFLAGS) like param and that's it, now it works!!

  $(CC) $(CCFLAGS) menuconf/menuconf.c menuconf/inputbox.c menuconf/util.c menuconf/checklist.c menuconf/menubox.c menuconf/textbox.c src/snprintf.c -I. -lncurses -lm -o menuconf/menuconf
share|improve this answer

The curses library is not installed, since you did not provide us with the information what kind of NAS (Model / Vendor) this is we cannot help you more in detail.

If there is a package of curses for the Distribution on that NAS of that Vendor you could install it.

Or you'd just use the config and a text editor.

Update

If you're sure you have setup the Libraries correctly you might try setting LD_LIBRARY_PATH manually to /opt/lib. Also have a look at the Makefile and make the corresponding ($CC) line more verbose.

share|improve this answer
    
if ipkg install ncurses worked, so why you need to know nas model? oh well if it'll help: QNAP 219p+ –  holms Feb 9 '11 at 14:25
    
Because RPM for example is installed on nearly every version of ervery redhat derivate out there. The Version of nCurses provided by the NAS Vendor might not be matching to the psybnc version and other way round. There is no way to check this from just knowing the package manager. –  pacey Feb 9 '11 at 14:55
    
[\w] # ldd psybnc libm.so.6 => /lib/libm.so.6 (0x40026000) libresolv.so.2 => /lib/libresolv.so.2 (0x400d6000) libc.so.6 => /lib/libc.so.6 (0x400f0000) /lib/ld-linux.so.3 (0x40000000) <--- so it's looking in /lib but half libs are in /opt/lib. so i hope ld_library_path supports manu paths ;D –  holms Feb 9 '11 at 15:17
    
LD_LIBRARY_PATH help failed –  holms Feb 9 '11 at 15:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.