Summary:ASTERISK-15073: OpenSolaris Build Problem with editline
Reporter:Ben Klang (bklang)Labels:
Date Opened:2009-11-03 23:32:04.000-0600Date Closed:2010-01-15 14:05:43.000-0600
Versions:Frequency of
Environment:Attachments:( 0) build-log
( 1) build-log-2
Description:This is a continuation of the suspended bug ASTERISK-12901.  I did not see a way to comment on that bug, so I have opened this one. This bug is observed against

Most build issues reported in ASTERISK-12901 appear to be resolved, but at least this one regarding editline is still present:

In file included from sig.h:47,
                from el.h:107,
                from common.c:51,
                from editline.c:4:
/usr/include/signal.h:95: error: syntax error before '*' token
make[2]: *** [editline.o_a] Error 1
make[1]: *** [editline/libedit.a] Error 2
make: *** [main] Error 2

A full log of the build output is attached.
Comments:By: Leif Madsen (lmadsen) 2009-11-04 09:01:02.000-0600

Ya, don't worry about that information for product version and such; it's just duplicate information from the field which is kept up to date, which you filled in correctly.

By: Ben Klang (bklang) 2009-11-06 11:24:43.000-0600

After some searching, I came across this potentially identical bug: ASTERISK-13617.  It's marked as closed, with a fix committed to trunk, 1.6.0, 1.6.1 and 1.6.2 SVN branches.  We are trying to see if the fixes from ASTERISK-13617 can be used to solve this build problem.

Also, I have downloaded the latest release, and the problem is still present.

By: Leif Madsen (lmadsen) 2009-11-06 11:38:49.000-0600 is a security only fix based on The change you mentioned was only put in yesterday. I am currently building release candidates now, and you can test them later today.

This fix should be in the next full release, when available. Closing this issue for now. Please reopen if the issue is not resolved in or the release candidate.


By: Ben Klang (bklang) 2009-11-06 12:26:46.000-0600

I am reopening this bug because the issues are not completely resolved.

I just checked out the latest SVN branch of 1.6.1 and found that the patch from ASTERISK-13617 does seem to fix the syntax error building editline.o.  However, as also reported in ASTERISK-13617, there is now a problem linking editline.  The message is this:

Undefined                       first referenced
symbol                             in file
MAX                                 channel.o
MIN                                 udptl.o
ld: fatal: symbol referencing errors. No output written to asterisk
collect2: ld returned 1 exit status
make[1]: *** [asterisk] Error 1
make: *** [main] Error 2

According to comment #108424 by Snuffy in ticket ASTERISK-13617 (dated July 30, 2009) a fix has been applied to trunk that resolves this issue.  However, that fix has not apparently been applied to the 1.6.1 branch.  I did search the ticketing system and the asterisk-commits archives, but I was not able to find the ticket related to the MIN/MAX symbols missing in udptl.o.  I will attach an updated build log.

I'm sorry if this is an inappropriate action, but I felt it was the most direct one.  Please let me know if I should open a new ticket regarding the problem linking udptl.o

By: Ben Klang (bklang) 2009-11-06 20:56:19.000-0600

I did a comparison of the sources between Asterisk trunk and branch/1.6.1.  I found the following macros were defined in trunk, but not in 1.6.1:

(near line 225 of asterisk-trunk/include/asterisk/utils.h)
#undef MIN
#define MIN(a, b) ({ typeof(a) __a = (a); typeof(b) __b = (b); ((__a > __b) ? __b : __a);})
#undef MAX
#define MAX(a, b) ({ typeof(a) __a = (a); typeof(b) __b = (b); ((__a < __b) ? __b : __a);})

Adding these two macros to 1.6.1 allows a successful build on OpenSolaris.

By: Ben Klang (bklang) 2010-01-15 13:43:02.000-0600

This code appears to have been merged in r238497.  This ticket can be closed.

By: Leif Madsen (lmadsen) 2010-01-15 14:05:43.000-0600

Closed per reporter.