Error building network library on OpenSolaris and 1.8.1-rc1

Home » Asterisk Users » Error building network library on OpenSolaris and 1.8.1-rc1
Asterisk Users 11 Comments

Hello All,

I have been banging my head against trying to get asterisk to compile on
Solaris as well as OpenSolaris. I’ve tried to build various versions of
Asterisk as on various versions of Solaris and OpenSolaris to no avail.
Finally, I said, what the heck, I got the latest version of OpenSolaris that
(pkg image-update) could get and then the latest ver of asterisk I found on
the digium repo. Amazingly, configure and make menuselect went without a
hitch, very clean. ‘make’ was going really well as well, in fact this is the
farthest I’ve ever seen it ever go with the minor hitch compalining about
format_mp3 but it suggested I use that script in contrib and download the
code for that and that made it run again. BUT just my luck, it crapped out
with this error

*netsock.c: In function `ast_set_default_eid’:
netsock.c:250: error: structure has no member named `ifr_hwaddr’
make[1]: *** [netsock.o] Error 1
make: *** [main] Error 2
*
Can anyone please help me resolve this? I don’t even know where to look.
Google came back with nothing. Same with a search through the 30,000+ emails
I have from the Asterisk mailing list only gave me the hint that it’s a
function from if.h which in OpenSolaris resides in /usr/include/net as
opposed to maybe /usr/include/linux.

Any ideas?

Thanks
RR

11 thoughts on - Error building network library on OpenSolaris and 1.8.1-rc1

  • Hi Guys,
    Any one want to take a stab at helping with this please?? All I have found
    so far is that the netsock.c file has code that references to taking note
    when it’s being built on a Solaris platform, but since I don’t understand
    this a whole lot, I am not sure where to go from here…this is the excerpt
    from the netsock.c file:

    *#if defined (SOLARIS)
    #include
    #elif defined(HAVE_GETIFADDRS)
    #include
    #endif
    *
    I would’ve have thought this would have taken care of the issue by making
    sure ‘make’ handles this correctly but I guess not. Anyone? Please?

    Thanks
    RR

  • I’m in the process of bring up our remote Bamboo agents for Solaris, so
    I can see if I get the same issue. Which versions of Solaris and
    OpenSolaris are you using?

  • Hi Paul,

    I haven’t tried compiling it on Solaris 10 as yet, as OpenSolaris is a lot
    easier to update and download packages / dependencies etc. neverthess, the
    OpenSolaris version is: OpenSolaris 2010.05 snv_134b X86, running on a Core
    2 Duo Quad machine inside a 64-bit Hyper-V VM.

    Let me know if you need more info. BTW, the way the OS was installed was
    through the ISO available on the OpenSolaris website and then updating it
    with ‘pkg image-update’ command and then following it with installing the
    “gcc-dev” package.

    Thanks
    RR

  • G’day Tilghman,

    Thanks for that thread. I guess a few other things broke because of the
    change and the consuming application then needs to be a little smarter like
    you said (and suggested by darrenr) to detect whether you’re on OSOL or
    Solaris. Does that mean I should check this same thing out on Solaris 10 as
    well and see what happens? I am so lost with the Solaris build environment
    as (and I whinged about this earlier too) there is no good way of obtaining
    the standard Solaris packages and dependancies and everything just goes all
    over the place and then one is left scurrying around to find where the damn
    library needs to be for it to compile.

    Anyway, I will open an issue and reference this thread and we’ll go from
    there.

    BTW, THANK YOU for taking note of this and trying to help. You guys will
    have bottomless beer pitchers paid for if you guys help me get this working
    and are ever in the NY area 🙂

    Cheers,
    R

  • G’day Tilghman,

    Thanks for that thread. I guess a few other things broke because of the
    change and the consuming application then needs to be a little smarter like
    you said (and suggested by darrenr) to detect whether you’re on OSOL or
    Solaris. Does that mean I should check this same thing out on Solaris 10 as
    well and see what happens? I am so lost with the Solaris build environment
    as (and I whinged about this earlier too) there is no good way of obtaining
    the standard Solaris packages and dependancies and everything just goes all
    over the place and then one is left scurrying around to find where the damn
    library needs to be for it to compile.

    Anyway, I will open an issue and reference this thread and we’ll go from
    there.

    BTW, THANK YOU for taking note of this and trying to help. You guys will
    have bottomless beer pitchers paid for if you guys help me get this working
    and are ever in the NY area 🙂

    Cheers,
    R

  • Hi RR,

    I’ve not tried compiling 1.8.1-rc1 on Solaris yet and I’ve not come across this issue as of yet. I did build 1.8.0-rc5 on Solaris 10 without any build error’s though. I’m not sure if the code has changed that much between 1.8.0-rc5 and 1.8.1-rc1.

    I’m no coding guru by anyone’s standards, but I do build a couple applications for Solaris. What has made my life a hell-of-a-lot easier is JDS-CBE and SFE, check out the following 2 links:

    http://dlc.sun.com/osol/jds/downloads/cbe/

    http://pkgbuild.sourceforge.net/spec-files-extra/

    What the above does is setup a common build environment for building applications. The SFE (spec-file-extra) is a framework for create rpm type spec files for solaris. Once you have one setup for asterisk then it is just a one line command to download and build asterisk. This is what I have been using to build asterisk on Solaris 10 for the past 3 years. It keeps the environment identical between versions.

    Have a look at getting that up and going first and then check out the spec file format and create one for your asterisk version you want to compile. My spec file is far from perfect at the moment, but it does work for what we require at the moment.

    Disclaimer: This is a little bit of work to setup and get working initially, but once it is setup and working, building subsequent asterisk versions and creating the Solaris SRV4 packages is a breeze 🙂

    Thanks
    Bruce

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of RR
    Sent: 08 December 2010 23:58

    http://opensolaris.org/jive/thread.jspa?threadID=116059&tstart=105

    I suspect we’ll have to make a more complex check to verify that the
    structure elements are all there. Please open an issue on
    issues.asterisk.org< http://issues.asterisk.org/> and reference this thread. We can then put up a
    patch that you can use to verify if better detection fixes your issue.
    Once verified, the patch will find its way into releases.

  • On Thu, Dec 9, 2010 at 10:02 AM, Bruce McAlister <

    href=”mailto:bruce.mcalister@blueface.ie”>bruce.mcalister@blueface.ie> wrote:

    Hi Bruce,

    Thanks so much for that. I don’t know what to tell you as to why I’m getting
    the error if you didn’t. Maybe it’s because I’m using OpenSolaris as opposed
    to Solaris? That’s the only thing I can think of and Tilghman’s comment also
    kind of hinted at that the Makefile and/or configure or the overall build
    process needs to be smarter to tell when the system is being built for
    Solaris or OpenSolaris. Also while searching for something else but a
    related issue, I found another thread that had talked about successfully
    compiling 1.8 beta on Solaris on Sparc. So there’s definitely hope. But I
    think this might be an OpenSolaris thing as even though I don’t have the
    sophistication of CBE and Sun Studio etc, I do have the reasonably
    convenient VM snapshots to get a clean system whenever I want to and I can
    tell you, there was NOTHING on this system other than a fresh OpenSolaris
    install, and the gcc-dev package. Hmm

    Anyway, let’s see if the nice developers at Digium can find some time to put
    in a fix for this so the product might become “buildable” over Solaris AND
    OpenSolaris and people can then just go with the platform of their choice.

    Cheers,
    RR

  • Hi Tilghman,
    Btw w.r.t to the patch delivered for this bug, as I stated in the notes, it
    worked for trunk. I tried it for 1.6.2.15 and the patch came up with a few
    errors, as in the patch wasn’t clean and I just looked at the
    configure.ac.rej file and made the changes manually. I wanted to test
    building this on Solaris 10 u9, but wasn’t able to due to my messed up dev
    environment. I will fix this environment and test compiling and building it
    assuming I made the changes that the patch was supposed to make correctly.
    Will let you know . I was going to add that as a note to the bug report
    itself but then I got distracted with something else and now it’s closed and
    I’ll have to repoen it to add any more notes. Just FYI.
    RR

  • Please try 1.6.2 in SVN before reopening the issue. The patch has been
    applied across all branches to which it is relevant. There are certainly
    commits in 1.6.2 that are not in the latest release, due to our policy of
    making release candidates, and those commits could be the reason why
    the patch does not apply cleanly to a release.