[Home]

Summary:ASTERISK-11495: [patch] Compile fails with `IPTOS_MINCOST' undeclared
Reporter:Bruce McAlister (asgaroth)Labels:
Date Opened:2008-02-22 04:49:14.000-0600Date Closed:2008-02-25 18:01:39.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_h323
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 12050.patch
( 1) configure.txt
( 2) gmake.txt
Description:When compiling asterisk, then compilation fails when attempting to build chan_h323. The error is as follows:

chan_h323.c: In function `reload_config':
chan_h323.c:2863: error: `IPTOS_MINCOST' undeclared (first use in this
function)
chan_h323.c:2863: error: (Each undeclared identifier is reported only once
chan_h323.c:2863: error: for each function it appears in.)
gmake[1]: *** [chan_h323.o] Error 1
gmake: *** [channels] Error 2

****** STEPS TO REPRODUCE ******

[1] Ensure PWLib (v1.10.0) & OpenH323 (v1.18.0) are properly built and installed
[2] Extract asterisk 1.4.18 sources
[3] Apply patche for bugid 0012022
[4] Apply patch for bugid 0011885
[5] Export the following environment variables:

PATH=/usr/bin:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin:/opt/sfw/bin:/opt/blueface/bin
export PATH

GNUCC='/usr/sfw/bin/gcc'
GNUCXX='/usr/sfw/bin/g++'
CC=$GNUCC
CXX=$GNUCXX
export CC CXX

ASTCFLAGS='-I/usr/sfw/include -I/opt/blueface/include -I/opt/sfw/include'
ASTLDFLAGS='-L/usr/sfw/lib -R/usr/sfw/lib -L/opt/blueface/lib -R/opt/blueface/lib -L/opt/sfw/lib -R/opt/sfw/lib'
CFLAGS=$ASTCFLAGS
LDFLAGS=$ASTLDFLAGS
export ASTCFLAGS ASTLDFLAGS CFLAGS LDFLAGS
export PWLIBDIR=/export/home/vzhsxn/build/pwlib_v1_10_0
export OPENH323DIR=/export/home/vzhsxn/build/openh323_v1_18_0

[6] Configure
[7] Make
Comments:By: Bruce McAlister (asgaroth) 2008-02-22 04:51:20.000-0600

I have uploaded the output of the "./configure" and "gmake" steps to show what happens. If you need any further details please dont hesitate to ask.

By: Mark Michelson (mmichelson) 2008-02-22 14:23:46.000-0600

It appears as though Solaris doesn't have IPTOS_MINCOST defined. Try 12050.patch and see if the problem is fixed.

By: Bruce McAlister (asgaroth) 2008-02-25 02:41:33.000-0600

A very strange thing happens after I apply this patch.

The process I followed was:

[1] extract source
[2] apply patch for bugid 0012022 (localtime), 0011885 (vis) and 0012050 (h323).
[3] export env variables as defined in "steps to reproduce" above.
[4] run configure
[5] run gmake

The gmake has the following errors:

--------------------------------------------------------------------------------
Generating input for menuselect ...
awk: syntax error near line 3
awk: bailing out near line 3
gmake[1]: *** [.chan_h323.moduleinfo] Error 2
awk: syntax error near line 3
awk: bailing out near line 3
gmake[1]: *** [.chan_h323.makeopts] Error 2
--------------------------------------------------------------------------------

However the process continue's on after this, attempting to build all the channel types (even the ones found to not be supported (chan_alsa for example)).

I then tried to run "gmake menuselect" to see if i could manually disable the other channels, but, the channels option is not available in the menuselection anymore, see below:

--------------------------------------------------------------------------------
                                        **************************************************
   Asterisk Module and Build Option Selection                                         **************************************************
               Press 'h' for help.

         ---> 1.  Applications
              2.  Call Detail Recording
              3.  Codec Translators
              4.  Format Interpreters
              5.  Dialplan Functions
              6.  PBX Modules
              7.  Resource Modules
              8.  Voicemail Build Options
              9.  Compiler Flags
              10. Module Embedding
              11. Core Sound Packages
              12. Music On Hold File Packages
              13. Extras Sound Packages
--------------------------------------------------------------------------------

If I perform the same steps above, without applying this patch (h323), then there are no awk errors as shown above, and the channels menu option is in the list. If I dont export the OpenH323/PWLib environment variables, the above build process completes successfully without chan_h323.

Could it be possible that there needs to be an update to some of the menuselect code to accomodate for this patch?



By: snuffy (snuffy) 2008-02-25 06:49:34.000-0600

the 'awk' errors are easy enough to fix, i'm pretty sure the changes for it are in trunk maybe not 1.4..

basically make sure in ur path can find 'gawk' or do what i did for a while..
add /usr/xpg4/bin into your path at the front this makes sure it grabs a compatible awk and runs menuselect properly.

By: Bruce McAlister (asgaroth) 2008-02-25 06:54:27.000-0600

I will try what you mention, but I dont think that it will fix it. I have "gawk" as first in my path.

The menuselect options appear properly if I _dont_ apply the h323 patch, however, if I _do_ apply the h323 patch, then the "Channels" menu option disappears, and I have the abovementioned awk errors.

I will replace the Sun awk with GNU awk and rerun this build to see if it fixes it as you mention

By: Bruce McAlister (asgaroth) 2008-02-25 17:27:23.000-0600

snuffy, you were right on with the awk issues. I couldnt get the compile to go through with the standard Sun awk (/usr/bin/awk) or the GNU awk (/usr/sfw/bin/gawk), I was however, successfull with the XPG4 awk. The compile went through successfully.

One thing that did confuse me was that I had to run gmake twice, is that normal when building the h323 channel?

By: Digium Subversion (svnbot) 2008-02-25 17:59:53.000-0600

Repository: asterisk
Revision: 104111

U   branches/1.4/channels/chan_h323.c

------------------------------------------------------------------------
r104111 | qwell | 2008-02-25 17:59:51 -0600 (Mon, 25 Feb 2008) | 7 lines

IPTOS_MINCOST is not defined on Solaris.

(closes issue ASTERISK-11495)
Reported by: asgaroth
Patches:
     12050.patch uploaded by putnopvut (license 60)

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

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

By: Digium Subversion (svnbot) 2008-02-25 18:01:39.000-0600

Repository: asterisk
Revision: 104112

_U  trunk/

------------------------------------------------------------------------
r104112 | qwell | 2008-02-25 18:01:38 -0600 (Mon, 25 Feb 2008) | 14 lines

Blocked revisions 104111 via svnmerge

........
r104111 | qwell | 2008-02-25 18:03:30 -0600 (Mon, 25 Feb 2008) | 7 lines

IPTOS_MINCOST is not defined on Solaris.

(closes issue ASTERISK-11495)
Reported by: asgaroth
Patches:
     12050.patch uploaded by putnopvut (license 60)

........

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

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