LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 07-01-2013, 12:19 PM   #1
PelliX
Member
 
Registered: Apr 2006
Location: Enschede
Distribution: Debian, Red Hat/Fedora, Solaris, DD-WRT, NetBSD, Mac OS8/9, Mac OSX, UMP/OS, ESX
Posts: 42

Rep: Reputation: 15
Compile Asterisk 1.6 Solaris 10 SPARC


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:

Code:
   [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:
Code:
# 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)
Code:
# 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
Code:
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:
Code:
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

Last edited by PelliX; 07-06-2013 at 12:03 PM.
 
Old 07-06-2013, 12:03 PM   #2
PelliX
Member
 
Registered: Apr 2006
Location: Enschede
Distribution: Debian, Red Hat/Fedora, Solaris, DD-WRT, NetBSD, Mac OS8/9, Mac OSX, UMP/OS, ESX
Posts: 42

Original Poster
Rep: Reputation: 15
Right, after resolving some workstation deployment issues I'm back to the Asterisk build!

Has anybody encountered similar problems building on this (or another) platform? If it would fail due to some compatibility issue, I could understand it - but it simply ignores a library it used barely minutes or even seconds before. It almost seems as if the build process is causing something to run in it's own shell where it might lack the corrent environment variables, but I don't see anything to cause that in the Makefile(s).

As I mentioned before; comments are welcome!

Kind regards,

PelliX
 
Old 07-14-2013, 12:02 PM   #3
PelliX
Member
 
Registered: Apr 2006
Location: Enschede
Distribution: Debian, Red Hat/Fedora, Solaris, DD-WRT, NetBSD, Mac OS8/9, Mac OSX, UMP/OS, ESX
Posts: 42

Original Poster
Rep: Reputation: 15
Considering the lack of replies, suggestions or answers, I've decided to move on with the 1.8.22 source. Here I can get most stuff working, except for the SIP channel module (which is rather important to me).

If I have any further questions, I'll be sure to post them on an Asterisk forum.

PelliX
 
Old 07-27-2013, 01:05 PM   #4
PelliX
Member
 
Registered: Apr 2006
Location: Enschede
Distribution: Debian, Red Hat/Fedora, Solaris, DD-WRT, NetBSD, Mac OS8/9, Mac OSX, UMP/OS, ESX
Posts: 42

Original Poster
Rep: Reputation: 15
Ok, I fixed it. The machine I was using had a mix of the SUNW and CSW packages for various GNU utilities. I bought a cheap SunBlade 150 and installed only Solaris 10 and the CSW packages. As well as a little magic with the Makefile, I had to change the PATH to include /opt/csw/bin before the default directories to enforce the usage of gmkdir (symlinked as mkdir) and ginstall (symlinked as install). Despite a reasonable number of warnings and an inexplicable SEGFAULT when launched interactively with high verbosity it's working fine.

Hope this helps someone. If not, you can send me a private message or start your own thread.

Kind regards,

PelliX
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Solaris 10 sparc bootadm trinityforce Solaris / OpenSolaris 1 10-13-2011 10:54 AM
Solaris 10 SPARC - 2 NIC czezz Solaris / OpenSolaris 1 06-11-2008 10:11 PM
Solaris 8.1.7 on SPARC, how I get it? saudoi Solaris / OpenSolaris 2 06-02-2005 09:39 PM
has anyone ever made a successful compile of apache source in solaris 9 x86/sparc? spyghost Solaris / OpenSolaris 3 10-11-2004 06:09 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration