Dear all,
it would appear the road of life has forked off the beaten path once again for me. I’m trying to build Asterisk 1.6.2.24 on Solaris 10 (SPARC, sun4u), and after a number of missing dependencies and a few Makefile/makeopts ‘hacks’ I can get it to build all the seperate modules, etc. Nothing unexpected.
Although I couldn’t find any documentation recommending it, I also installed GNU curses, as the Sun version seems “a little low on functions”.
Anyway, I’ve selected to embed most of the modules in menuselect (which doesn’t even build with the Sun curses library), and they all build fine (except for a couple of relatively meaningless warnings). Near the end of the compiling process when running make, it builds the asterisk binary - and this is where it fails:
[LD] abstract_jb.o acl.o adsistub.o aescrypt.o aeskey.o aestab.o alaw.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o audiohook.o autoservice.o bridging.o callerid.o cdr.o channel.o chanvars.o cli.o config.o cryptostub.o datastore.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o event.o features.o file.o fixedjitterbuf.o frame.o fskmodem.o global_datastores.o hashtab.o heap.o http.o image.o indications.o io.o jitterbuf.o loader.o logger.o manager.o md5.o netsock.o pbx.o plc.o poll.o privacy.o rtp.o say.o sched.o sha1.o slinfactory.o srv.o ssl.o stdtime/localtime.o strcompat.o strings.o taskprocessor.o tcptls.o tdd.o term.o test.o threadstorage.o timing.o translate.o udptl.o ulaw.o utils.o version.o xml.o xmldoc.o editline/libedit.a db1-ast/libdb1.a ../apps/modules.link ../bridges/modules.link ../cdr/modules.link ../channels/modules.link ../codecs/modules.link ../formats/modules.link ../funcs/modules.link ../pbx/modules.link ../res/modules.link -> asterisk
/usr/sfw/bin/ld: cannot find -lcurses
collect2: ld returned 1 exit status
make[1]: *** [asterisk] Error 1
make: *** [main] Error 2
Obviously, this is strange, because I couldn’t have built menuselect or a large number of the modules without curses. If I run ld (or /usr/sfw/bin/gld) -lcurses I receive the usual “no startpoint defined” message - certainly NOT “cannot find…”. I’ve tried setting the LD_ALTEXEC, LD_LIBRARY_PATH and LD_FLAGS environment variables to include any and all possible directories for the various files, but (g)ld categorically refuses to load any libraries at that stage. Initially, I tried to build it all with termcap support, but as ld refused to load the library, I disabled it and recompiled.
Some relevant system/env info:
# gcc -v
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
# /usr/sfw/bin/gld -V
GNU ld version 2.15
Supported emulations:
elf32_sparc
elf64_sparc
# make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for sparc-sun-solaris2.10
I also have (and can test with)
# gmake -v
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
and
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
My configure/build options for asterisk were:
LD=gld AR=gar CC=gcc ./configure --prefix=/export/home/pellix/asterisk-1.6 --enable-internal-poll --disable-xmldoc --with-gnu-ld --without-bluetooth --with-crypto --with-curses --without-dahdi --without-asound --with-mp3 --with-ilbc --without-gtk2 --without-h323 --without-ldap --with-libcurl=/usr/local --without-libxml2 --without-lua --with-ncurses --without-netsnmp --without-oss --without-pri --without-srtp --with-ssl=/opt/csw --without-unixodbc --with-z --with-sqlite3=/opt/csw --without-termcap
I changed the makeopts to refer to ‘-lcurses’ instead of ‘-lncurses’ for compatibility and hardcoded the (–prefix) installation directories, as these are ignored on Solaris.
I’m probably missing something simple here. I hope so. If I missed any key information, let me know. Many thanks in advance!
Kind regards,
PelliX
P.S.: I can get 1.8.2x to build (with a ton of warnings) and run, but it crashes with a Bus Error when I load the chan_sip.so module. I’ve read a couple of articles on the Internet talking about building 1.4.2 on Solaris/SPARC, but I can’t even get that to build the strcompat library.