[asterisk-dev] can't link to libncurses in 'other' locations

snowcrash+asterisk-dev schneecrash+asterisk-dev at gmail.com
Sat Jan 6 10:51:28 MST 2007


working with both asterisk trunk/v1.4.0 --

i have, ncurses insalled in /usr/local, so,

	% cd /usr/local/
	% ls -al lib/libncurses.dylib
		lrwxr-xr-x 1 root wheel 20 Jan  5 06:18 lib/libncurses.dylib ->
libncurses.5.6.dylib
	% ls -al include/ncurses/ncurses.h
		lrwxr-xr-x 1 root wheel 8 Jan  5 06:18 include/ncurses/ncurses.h -> curses.h


if i,

	setenv LDFLAGS "-bind_at_load -L/usr/local/ssl/lib"
	setenv CPPFLAGS "-I /usr/local/ssl/include"
	./configure \
	--prefix=/usr/local/asterisk \
	--with-ssl=/usr/local/ssl \
	--with-ncurses=/usr/local \
	...

then, ./configure fails @,

	...
	checking for mandatory modules:  NCURSES OPENSSL... fail
	
	configure: ***
	configure: *** The NCURSES installation appears to be missing or broken.
	configure: *** Either correct the installation, or run configure
	configure: *** including --without-ncurses.

if i add,

	setenv LDFLAGS "-bind_at_load -L/usr/local/ssl/lib -L/usr/local/lib -lncurses"
	setenv CPPFLAGS "-I /usr/local/ssl/include -I/usr/local/include/ncurses"

to the above config, same error.

if, instead, i keep these LFGLAGS & CPPFLAGS defs, but,

	./configure \
	--with-ssl=/usr/local/ssl \
	--prefix=/usr/local/asterisk \
	--with-ncurses \
	...

then, no error, but subsequent build selects ncurses from /usr, not
spec'd /usr/local, e.g.,

otool -L main/asterisk
	/usr/local/ssl/lib/libssl.0.9.8.dylib (compatibility version 0.9.8,
current version 0.9.8)
	/usr/local/ssl/lib/libcrypto.0.9.8.dylib (compatibility version
0.9.8, current version 0.9.8)
-->	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0,
current version 5.4.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.1.7)
	/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current
version 369.5.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

how do i configure so that ncurses is picked up from my spec'd
location/build?  clearly, it 'works' for ssl ...

fwiw, my "readline" is _also_ in /usr/local/, built against _my_ ncurses, i.e.,

% otool -L /usr/local/lib/libreadline.dylib
        /usr/local/lib/libreadline.5.2.dylib (compatibility version
5.0.0, current version 5.2.0)
        /usr/local/lib/libncurses.5.6.dylib (compatibility version
5.6.0, current version 5.6.0)
        /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current
version 92.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.1.7)



thanks.


More information about the asterisk-dev mailing list