Summary:ASTERISK-08307: [patch] OpenBSD 4.0 "make" fails
Reporter:John Todd (jtodd)Labels:
Date Opened:2006-12-07 18:39:54.000-0600Date Closed:2006-12-19 17:03:57.000-0600
Versions:Frequency of
Environment:Attachments:( 0) fix_mxml_clean.patch
( 1) openbsd4.0-makefail.txt
Description:A fresh install from TRUNK as of this evening doesn't compile.  Actually, I have no idea how long it's been since TRUNK compiled on OpenBSD, since it's been at least a year since I've given it a try.  
Comments:By: John Todd (jtodd) 2006-12-07 18:40:44.000-0600

I've tried "make" and "gmake" to no avail.

By: Anthony LaMantia (alamantia) 2006-12-07 18:43:41.000-0600

you should ensure that you have the latest release of make,

also, maybe for kicks
try running make menuselect    or ./bootstrap.sh -> ./conifgure -> make and see
if that resolves the problem for you.

By: John Todd (jtodd) 2006-12-07 19:44:31.000-0600

./bootstrap.sh ran without error.  

./configure ran without error.

The problems happen when I hit "make" or "gmake" - they both die with different errors (gmake errors included in attachment)

I've tried "gmake menuselect" - that's in the notes I included in the text file attached to the bug.

The version of "make" is what came with OpenBSD 4.0, but I think that's irrelevant since it has never worked, even back when Asterisk did work previously on OpenBSD - I always had to use gmake.

The version of "gmake" is:
bash-3.1# gmake -v
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

By: Anthony LaMantia (alamantia) 2006-12-07 19:55:43.000-0600

you should try to use a version of GNU Make that is greater then 3.81.

By: Russell Bryant (russell) 2006-12-08 01:03:25.000-0600

The build system has been changed such that the GNU make version requirement isn't there anymore.  3.80 should work fine.

By: Paul Belanger (pabelanger) 2006-12-08 10:31:49.000-0600

I can also confirm the latest trunk (48358) no longer compiles on FreeBSD (6.1).  Working on back tracing revs to see where it broke.

By: Paul Belanger (pabelanger) 2006-12-08 10:53:32.000-0600

Found the problem (http://svn.digium.com/view/menuselect/trunk/Makefile?r1=48&r2=71).  Seems cleaning out mxml is a bad thing ;).

By: Paul Belanger (pabelanger) 2006-12-08 11:00:55.000-0600

Ok, uploaded a patch for menuselect/Makefile to fix the problem.

Disclaimer on file.

By: Matt O'Gorman (mogorman) 2006-12-08 14:07:46.000-0600

fixed in trunk, and 1.4 mxml commit 72 and 73.


By: John Todd (jtodd) 2006-12-11 21:40:20.000-0600

Not quite sure if this is solved  yet.  My 4.0 system still doesn't do the right thing.  Even after ./bootstrap.sh and ./configure, this is what results now with a complete re-downloaded version from SVN as of a few minutes ago:

...[blah blah blah]
configure: Package configured for:
configure: OS type  : openbsd4.0
configure: Host CPU : i386
bash-3.1# gmake menuselect
gmake: *** [menuselect/menuselect] Error 1

Just for giggles, I tried gmake 3.81 and that gave the same results as 3.80 (above)

By: Joshua C. Colp (jcolp) 2006-12-11 22:18:35.000-0600

I saw this as well under my OpenBSD test machine awhile back. I'll see if I can get it going and isolate the cause.

By: John Todd (jtodd) 2006-12-18 14:35:05.000-0600

If you need an OpenBSD 4.0 machine on which to test, please let me know - I can provide a remotely accessible system for any tests.

By: Joshua C. Colp (jcolp) 2006-12-18 21:48:09.000-0600

Fixed in 1.4 as of revision 48571 and trunk as of revision 48572. Portability is hard, but it should be good now :D rock on!

By: John Todd (jtodd) 2006-12-18 23:24:08.000-0600

Not quite, but getting there...
bash-3.1# gmake update
Updating from Subversion...

Fetching external item into 'menuselect'

Fetching external item into 'menuselect/mxml'
External at revision 14.

At revision 90.
At revision 48572.
bash-3.1# gmake
[blah blah blah]
  [CC] strcompat.c -> strcompat.o
  [LD] aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o -> aelparse
aelbison.o(.text+0x1212): In function `ael_yyparse':
/local/root/builds/asterisk/asterisk/utils/ael.y:441: warning: strcpy() is almost always misused, please use strlcpy()
pbx_ael.o(.text+0x475e): In function `pbx_load_module':
/local/root/builds/asterisk/asterisk/utils/pbx_ael.c:3975: warning: sprintf() is often misused, please use snprintf()
aelbison.o(.text+0x121f): In function `ael_yyparse':
/local/root/builds/asterisk/asterisk/utils/ael.y:442: warning: strcat() is almost always misused, please use strlcat()
  [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:47: error: `RLIMIT_VMEM' undeclared here (not in a function)
res_limit.c:47: error: initializer element is not constant
res_limit.c:47: error: (near initialization for `limits[9].resource')
res_limit.c:47: error: initializer element is not constant
res_limit.c:47: error: (near initialization for `limits[9]')
gmake[1]: *** [res_limit.o] Error 1
gmake: *** [res] Error 2

By: Joshua C. Colp (jcolp) 2006-12-18 23:40:14.000-0600

That is very very odd - we have a fresh OpenBSD 4.0 install that I've been using and Asterisk builds perfectly on it after the Makefile change. I'll look and see tomorrow... if there's a difference.

By: John Todd (jtodd) 2006-12-19 00:08:27.000-0600

Yeah, that's on a fairly stock version of OpenBSD 4.0.  Are there any specific libraries that maybe I'm missing?

By: Joshua C. Colp (jcolp) 2006-12-19 15:59:51.000-0600

Fixed in trunk as of revision 48591. Try that!

By: John Todd (jtodd) 2006-12-19 17:03:57.000-0600

OK, third time's a charm!  Compiles and launches.  Thanks!