Installing Asterisk on Solaris

So you have a Solaris box now… what do you need to do to install Asterisk?

Building trunk:

  1. If you dont already have it, get pkg-get and install it
    a) download it from blastwave.org/pkg-get.php
    b) install it "pkgadd -d pkg_get.pkg"
    c) add /opt/csw/bin to your path
    c) update the pkg_get cache “pkg_get -U”

  2. Install Subversion with pkg_get
    "pkg_get -i subversion

  3. Install fileutils with pkg_get (this package has ginstall in it which you will need later)
    “pkg_get -i fileutils”

  4. check out the asterisk sources
    "svn co svn.digium.com/svn/asterisk/trunk asterisk"

  5. cd to the newly checked out asterisk directory and edit the Makefile to point install to ginstall. (install included with solaris is not compatible with the install asterisk expects to see)
    using your favorite editor change INSTALL=install to INSTALL=ginstall

  6. around line 318 of the Main Makefile, change the reference to
    "-lncurses" to “-lcurses”

  7. if needed add /usr/sfw/bin to your path, thats where gcc lives by default in Solaris 10 (dont use the gcc4 that sun distributes I dont know what they did to it, but its busted)

  8. use gmake to build and install asterisk as normal
    "gmake && gmake install && gmake samples"
    (note: make included with solaris is not exactly 100% syntax compatible with gnu make so be sure to use gmake)

Now you have asterisk installed…
Some things like safe_asterisk will not work as expected as they are built to target Linux based systems, and asterisk will not build a 64bit system without some pretty extensive tweaks to the Makefiles…

You may also run across a few modules that wont build correctly… just turn them off and let me know which ones they are so we can get them patched to work on solaris…

Some things like Zaptel wont work anytime in the near future as there is no zap hardware support on solaris

Augmentations to this welcome, and maybe one day sooner or later we can have install vs ginstall detection

SwK

I followed your steps to the letter, but since i’m on Solaris 9, at compile time i get this error which basically froze me in place with no where to go…

/usr/local/ssl/include -D_REENTRANT -D_GNU_SOURCE -O6 -Wcast-align -DSOLARIS -fomit-frame-pointer -DT38_SUPPORT -c -o channel.o channel.c
In file included from channel.c:75:
include/asterisk/sha1.h:26:20: stdint.h: No such file or directory
make: *** [channel.o] Error 1

So, after some Googling… i find out that this header file seems to be in solaris 10, but not Solaris 9 (and other previous versions).

SO! I didn’t let that stop me. I downloaded the latest tar ball (asterisk-1.2.7.1.tar.gz) and rolled up my sleeves to see what i was in for. After i installed ncurses for solaris, and make sure ginstall, gmake (which is just called make now) was in my path i got a clean install. I had to download some other software to install the progdocs, and what not, but i have a working VOIP PBX running on:

SunOS kaltorak 5.9 Generic_112233-12 sun4u sparc SUNW,Ultra-5_10
bash-2.05# ./asterisk -cv
Asterisk 1.2.7.1, Copyright © 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com

I have even tested with X-lite software to leave voicemail on the demo account and called up the demo server at digium (#500). :smile:

Course zaptel didn’t compile, but libpri did, and i installed that as well.

Hope this helps others to try it out on Solaris!

Good deal…

Solaris make and gnu make (gmake) are 2 different things… dont get them confused… Sol10 ships GCC and GNUMake if you install Studio you get sun’s cc and make…

I would love to get things building there, but I gotta idea its gonna tke some work…

hola listeros gracias por el turoial he vanzado bastante con el pero tengo problemas al hacer gmake me muestra el siguiente error

[code]# gmake
./bootstrap.sh: autoconf: no encontrado
Please install autoconf and run bootstrap.sh again!
gmake: [configure] Error 1 (ignored)
/bin/sh: ./configure: no encontrado
gmake: *** [include/autoconfig.h] Error 1

[/code]

a decir verdad me mostrab mas errores, entre ellos que el grep no soportaba la opcion -q y bueno dado que el “-q” solo sirve para hacer el grep de modo silencioso los elimine, pero el error de autoconf se mantiene.

en realidad yo soy muy novel en solaris, si alguno de ustedes me puede ayudar estre muy agradecido.

upss sorry i posted the las message in spanish, i didn’t realize it.

well i have a problem installing asterisk, this because when I execute gmake i get the next response:

# gmake
./bootstrap.sh: autoconf: no encontrado
Please install autoconf and run bootstrap.sh again!
gmake: [configure] Error 1 (ignored)
/bin/sh: ./configure: no encontrado
gmake: *** [include/autoconfig.h] Error 1

I am a new user of solaris but i must use it for asterisk, so i bot know autoconf exits in solaris. also there were some other error that i was getting when executtng g make
2 of the were ceacuse I didn’t adder cosrrectly the PATH an the other was because gresp -q was not aviable.
so what i did was to set the path correctly and also delete all the opcion “-q” from the grep. this last becasue the use of that opcion is trivial

thanks for teh attention.

autoconf exists on Solaris 10 but may not be in your path Also, the directions earlier in this post are a little out dated on trunk

There are a few errors we are still working out to get a clean install

One thing you will notice is that some of the shell scripts refer to /bin/sh this expects a Bash shell at /bin/sh which is not true of non linux systems

Does any one has real stress test situations on solaris???..

define real stress test…

I have stress tested sip call handling in the setup/teardown arena and got my T2K up to a sustainable 550 calls/sec (set up and teardown) any higher the sip stack starts loosing calls and cant service all the requests

you’ll see similar things on x86/linux as this is asterisk related not OS related

other then that it runs just as good either way

transcoding seems to favor x86 at this time as thats where the code is developed and more tuned for

Hello, How much memory did you have on that system?. Thanks.

in the T2K? heh 8G Ram quad Core T1 CPU

Hello,

Here is a report I’ve compiled on Asterisk performance on Solaris verses Linux.

thrallingpenguin.com/article … olaris.htm

Comments, suggestions, ideas are welcomed!
-Joe

If the changes are this few, and there are already several places where it tries to set SunOS specific settings, why can’t we get this pushed back into SVN?

Also, could could we please, somehow, get SHELL=/bin/bash inserted at the top of at least the main the Makefile? It’s actually incorrect to use /bin/sh and expect “bash-like” syntax as /bin/sh is just a symlink on Linux to provide compatibility for older scripts.

I have a Sun Sparc Ultra 60 with Solaris 10 6/06.
I have a problem installing Zaptel, I execute gmake i get the next message:

“Building pkgmap form package protopye file.
ERROR in …/SVzapel/prototype_com:
no object for <opt/lib/libpri.so.1.0> found in local path
no object for <opt/include/lipri.h> found in local path
pkgm: ERROR : unable to build pkgmap form prototype file”

I need help!!!

Thanks

Apparently things have changed since this was originally posted. Step 6 can’t be done (no lncurses" in the Makefile. Also, can’t do a make until configure has been run.

gmake also breaks with a most interesting message…

-bash-3.00$ gmake
gmake[1]: Entering directory /home/brian/asterisk/menuselect' configure: error: C compiler cannot create executables Seeconfig.log’ for more details.
gmake[1]: *** [autoconfig.h] Error 77

What’s the latest info on porting Asterisk to Solaris?

Hi,

I’ve just downloaded the latest SVN and tried to compile on my Ultra-5 running Solaris 10.

I had a few initial problems getting the PATH right so I got the GNU grep and GNU awk, but now its failing at res_limit.c

Please can someone help?

Configure & Make output …

joey# ln -s /opt/sfw/bin/gawk /usr/sfw/bin/awk
joey# echo $PATH
/usr/sbin:/usr/sfw/bin:/usr/bin:/opt/csw/bin:/usr/local/bin
joey# which awk
/usr/sfw/bin/awk
joey# ./configure

configure: Package configured for:
configure: OS type : solaris2.10
configure: Host CPU : sparc
joey# make

menuselect/menuselect --check-deps menuselect.makeopts
Generating embedded module rules …
[CC] smsq.c -> smsq.o
smsq.c: In function txqcheck': smsq.c:128: warning: int format, pid_t arg (arg 4) smsq.c: In functionrxqcheck’:
smsq.c:199: warning: int format, pid_t arg (arg 4)
smsq.c: In function main': smsq.c:676: warning: int format, pid_t arg (arg 4) smsq.c:679: warning: int format, pid_t arg (arg 7) [CC] strcompat.c -> strcompat.o [LD] smsq.o strcompat.o -> smsq [CC] stereorize.c -> stereorize.o [CC] frame.c -> frame.o [LD] stereorize.o frame.o -> stereorize [CC] streamplayer.c -> streamplayer.o [LD] streamplayer.o -> streamplayer [CC] aelparse.c -> aelparse.o [CC] aelbison.c -> aelbison.o [CC] pbx_ael.c -> pbx_ael.o [CC] ael_main.c -> ael_main.o [CC] ast_expr2f.c -> ast_expr2f.o [CC] ast_expr2.c -> ast_expr2.o [LD] aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o -> aelparse [CC] check_expr.c -> check_expr.o [LD] check_expr.o ast_expr2.o ast_expr2f.o -> check_expr [CC] eagi-test.c -> eagi-test.o [CC] strcompat.c -> strcompat.o [LD] eagi-test.o strcompat.o -> eagi-test [CC] eagi-sphinx-test.c -> eagi-sphinx-test.o [LD] eagi-sphinx-test.o -> eagi-sphinx-test [CC] res_adsi.c -> res_adsi.o [LD] res_adsi.o -> res_adsi.so [CC] res_agi.c -> res_agi.o [LD] res_agi.o -> res_agi.so [CC] res_clioriginate.c -> res_clioriginate.o [LD] res_clioriginate.o -> res_clioriginate.so [CC] res_convert.c -> res_convert.o [LD] res_convert.o -> res_convert.so [CC] res_crypto.c -> res_crypto.o [LD] res_crypto.o -> res_crypto.so [CC] res_features.c -> res_features.o [LD] res_features.o -> res_features.so [CC] res_indications.c -> res_indications.o [LD] res_indications.o -> res_indications.so [CC] res_limit.c -> res_limit.o res_limit.c: In functionmy_ulimit’:
res_limit.c:110: error: `RLIMIT_NPROC’ undeclared (first use in this function)
res_limit.c:110: error: (Each undeclared identifier is reported only once
res_limit.c:110: error: for each function it appears in.)
make[1]: *** [res_limit.o] Error 1
make: *** [res] Error 2

I’ve found an error in the following submission
svn.digium.com/view/asterisk/tru … &view=diff

There’s a later reference to RLIMIT_NPROC in trunk/res/res_limit.c
110c110

  •                  if (resource != RLIMIT_NOFILE && resource != RLIMIT_CORE && resource != RLIMIT_NPROC && resource != RLIMIT_FSIZE) {
    
  •                 if (resource != RLIMIT_NOFILE && resource != RLIMIT_CORE && resource != RLIMIT_FSIZE) {
    

So, that’s fixed that problem.

Now, I’ve got a new problem in chan_iax2.c

make


[CC] chan_iax2.c -> chan_iax2.o
chan_iax2.c:643: error: redefinition of struct queue' chan_iax2.c: In functioninit_queue’:
chan_iax2.c:643: error: structure has no member named first' chan_iax2.c:643: error: structure has no member namedlast’
chan_iax2.c:643: error: structure has no member named lock' chan_iax2.c: In functionfini_queue’:
chan_iax2.c:643: error: structure has no member named first' chan_iax2.c:643: error: structure has no member namedlast’
chan_iax2.c:643: error: structure has no member named lock' chan_iax2.c: In functiondestroy_firmware’:
chan_iax2.c:1416: warning: passing arg 1 of munmap' from incompatible pointer type chan_iax2.c: In functiontry_firmware’:
chan_iax2.c:1512: warning: assignment from incompatible pointer type
chan_iax2.c:1523: warning: passing arg 1 of munmap' from incompatible pointer type chan_iax2.c:1536: warning: passing arg 1 ofmunmap’ from incompatible pointer type
chan_iax2.c:1549: warning: passing arg 1 of munmap' from incompatible pointer type chan_iax2.c: In functioniax2_destroy’:

chan_iax2.c: In function __unload_module': chan_iax2.c:10099: error: structure has no member namedlock’
chan_iax2.c:10104: error: structure has no member named lock' chan_iax2.c: In functionnetwork_thread’:
chan_iax2.c:8296: warning: value computed is not used
make[1]: *** [chan_iax2.o] Error 1
make: *** [channels] Error 2