[Home]

Summary:ASTERISK-11340: [patch] Fix some more solaris build issues
Reporter:snuffy (snuffy)Labels:
Date Opened:2008-01-31 03:46:41.000-0600Date Closed:2010-07-27 18:07:32
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bug_11885_editline.diff
( 1) bug_11885_solaris.diff
Description:There are a few more issues that cause solaris to stop compiling.
Setting inital in_addr is very different on solaris crazy union/struct replaced with memset

Fix issue with logger.c had ifdef removed which caused non-compilation.

Seperate patch:
The change to editline/np/vis.h is simple because there is no U_int32_t on solaris i think my way is sledgehammer approch so input would be appreciated
Comments:By: Jason Parker (jparker) 2008-01-31 11:49:51.000-0600

Is Solaris defining HAVE_BKTR or something?

As for editline, I'm just going to change it to uint32_t, since it's the "right" way to do it (I hate it when people use u_int32_t...yuck.)

By: Joshua C. Colp (jcolp) 2008-01-31 13:34:15.000-0600

Yeah, I disagree with the second patch with HAVE_BKTR. Not just Linux can do backtraces like this, and autoconf should determine whether the system is capable or not.

By: Digium Subversion (svnbot) 2008-01-31 13:49:56.000-0600

Repository: asterisk
Revision: 101482

U   branches/1.4/channels/chan_iax2.c
U   branches/1.4/channels/chan_sip.c

------------------------------------------------------------------------
r101482 | qwell | 2008-01-31 13:49:56 -0600 (Thu, 31 Jan 2008) | 4 lines

Solaris compat fixes for struct in_addr funkiness.

Issue ASTERISK-11340, patch by snuffy.

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=101482

By: Digium Subversion (svnbot) 2008-01-31 13:51:53.000-0600

Repository: asterisk
Revision: 101483

_U  trunk/
U   trunk/channels/chan_iax2.c
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r101483 | qwell | 2008-01-31 13:51:53 -0600 (Thu, 31 Jan 2008) | 12 lines

Merged revisions 101482 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101482 | qwell | 2008-01-31 13:52:49 -0600 (Thu, 31 Jan 2008) | 4 lines

Solaris compat fixes for struct in_addr funkiness.

Issue ASTERISK-11340, patch by snuffy.

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=101483

By: Jason Parker (jparker) 2008-01-31 13:58:32.000-0600

actually, just switching to uint32_t doesn't build on Linux.  Would have to add some include(s).  Any idea what the "correct" include is on Solaris?

By: snuffy (snuffy) 2008-02-01 18:30:34.000-0600

Oh with that HAVE_BKTR.. its part of Open Solaris, solaris 10 and earlier doesn't have it..
The main problem i have is that WORDSIZE is not defined. i've found the way some others have calculated it via a little c program that added the define of like a AST_WORDSIZE

There is really no correct header for u_int32_t in solaris, stuck with a typedef or define on that one. (as discussed on irc)

By: dmartin (dmartin) 2008-03-04 08:46:11.000-0600

Please apply editline patch to the trunk, still failing on Solaris 10 (as reported in ASTERISK-11562)

By: Bruce McAlister (asgaroth) 2008-06-18 10:47:55

Hi,

I've just built asterisk v1.4.21 on Solaris and I notice the editline patch is not merged in.

Hopefully it will get merged for the next release :)

By: Bruce McAlister (asgaroth) 2008-06-18 11:19:22

On a side note, although I think it may not be related. Not sure if you want me to log a seperate bug for this.

sched_yield lives in librt on Solaris and needs to be linked in for some modules, or else it fails with the following:

[Jun 18 16:04:33] WARNING[29813]: loader.c:399 load_dynamic_module: Unable to promote flags on module 'chan_agent.so': ld.so.1: asterisk: fatal: relocation error: file /opt/asterisk/lib/modules/chan_agent.so: symbol sched_yield: referenced symbol not found
[Jun 18 16:04:33] WARNING[29813]: loader.c:657 load_resource: Module 'chan_agent.so' could not be loaded.

What I ended up doing was editing the Makefile and changing the following:

ifeq ($(OSARCH),SunOS)
 SOLINK=-shared -fpic -L/usr/local/ssl/lib
endif

to:

ifeq ($(OSARCH),SunOS)
 SOLINK=-shared -fpic -lrt
endif

And that seems to have fixed it

By: Digium Subversion (svnbot) 2008-07-03 17:11:12

Repository: asterisk
Revision: 127892

U   branches/1.4/Makefile
U   branches/1.4/main/editline/np/vis.c

------------------------------------------------------------------------
r127892 | kpfleming | 2008-07-03 17:11:11 -0500 (Thu, 03 Jul 2008) | 6 lines

a couple of small Solaris-related fixes

(closes issue ASTERISK-11340)
Reported by: snuffy, asgaroth


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=127892

By: Digium Subversion (svnbot) 2010-07-27 18:07:30

Repository: thirdparty
Revision: 176

U   editline/trunk/np/vis.c

------------------------------------------------------------------------
r176 | seanbright | 2010-07-27 18:07:30 -0500 (Tue, 27 Jul 2010) | 22 lines

Merge r127903 from asterisk trunk:

Merged revisions 127892,127895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127892 | kpfleming | 2008-07-03 17:18:38 -0500 (Thu, 03 Jul 2008) | 6 lines

a couple of small Solaris-related fixes

(closes issue ASTERISK-11340)
Reported by: snuffy, asgaroth


........
r127895 | kpfleming | 2008-07-03 17:20:16 -0500 (Thu, 03 Jul 2008) | 3 lines

remove this, it has been moved to the main Makefile


........

------------------------------------------------------------------------

http://svn.digium.com/view/thirdparty?view=rev&revision=176