Summary:ASTERISK-09830: Asterisk wont compile anymore
Reporter:Michiel van Baak (mvanbaak)Labels:
Date Opened:2007-07-07 06:46:08Date Closed:2007-07-07 11:31:05
Versions:Frequency of
Environment:Attachments:( 0) checkforexp2andlog2.diff
( 1) configure.gz
Description:After running svn update asterisk is no longer compiling. Here's the error:
  [LD] aelparse.o aelbison.o pbx_ael.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o -> aelparse
aelbison.o(.text+0x128f): In function `ael_yyparse':
/home/michiel/dev/personal/asterisk/asterisk-trunk/utils/ael.y:450: warning: strcpy() is almost always misused, please use strlcpy()
pbx_ael.o(.text+0x4ab2): In function `pbx_load_module':
/home/michiel/dev/personal/asterisk/asterisk-trunk/utils/pbx_ael.c:4097: warning: sprintf() is often misused, please use snprintf()
aelbison.o(.text+0x129c): In function `ael_yyparse':
/home/michiel/dev/personal/asterisk/asterisk-trunk/utils/ael.y:451: warning: strcat() is almost always misused, please use strlcat()
ast_expr2.o(.text+0x2555): In function `op_func':
/home/michiel/dev/personal/asterisk/asterisk-trunk/utils/ast_expr2.y:385: undefined reference to `exp2'
ast_expr2.o(.text+0x27c0):/home/michiel/dev/personal/asterisk/asterisk-trunk/utils/ast_expr2.y:385: undefined reference to `log2'
collect2: ld returned 1 exit status
gmake[1]: *** [aelparse] Error 1
gmake: *** [utils] Error 2


~% 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
~% uname -an
OpenBSD anima.vanbaak.info 4.1 GENERICASTERISK-1420 i386
~/dev/personal/asterisk/asterisk-trunk% svn info
Path: .
URL: http://svn.digium.com/svn/asterisk/trunk
Repository Root: http://svn.digium.com/svn/asterisk
Repository UUID: 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Revision: 73817
Node Kind: directory
Schedule: normal
Last Changed Author: russell
Last Changed Rev: 73771
Last Changed Date: 2007-07-07 01:05:24 +0200 (Sat, 07 Jul 2007)
Comments:By: Michiel van Baak (mvanbaak) 2007-07-07 06:55:04

using svn update -r<somerev> I found out commit 73449 causes this.
rev 72940 is compiling fine here.

By: Michiel van Baak (mvanbaak) 2007-07-07 07:14:06

No idea what the functions EXPR2 and LOG2 are used for but the uploaded patch removes them and makes asterisk compile again

By: Tilghman Lesher (tilghman) 2007-07-07 08:23:19

They are the base-2 equivalents to exp() and log() (which are base e).

By: Michiel van Baak (mvanbaak) 2007-07-07 09:57:51

OpenBSD and FreeBSD dont have them.
I'm now running a testcompile with a patched tree. If it works out fine I'll upload a new patch here that only compiles those functions if they excist in -lm

By: Michiel van Baak (mvanbaak) 2007-07-07 10:05:11

new patch: checkforexp2andlog2.diff
This one will use the configure script to find out wether the system has exp2 and/or log2
Now everything compiles again on my OpenBSD 4.1 and linux boxen.

By: Michiel van Baak (mvanbaak) 2007-07-07 10:40:53

uploaded regenerated configure script in gzip format for people who want to test this patch but dont want to update the configure script themselves

By: Steve Murphy (murf) 2007-07-07 11:31:05

Many thanks to mvanbaak for his patches! They were a big help.
These patches merged to trunk in 73821