Summary:ASTERISK-05568: Asterisk 1.2.0-rc1 compilation fail.
Reporter:Adam Rybak (adamr)Labels:
Date Opened:2005-11-11 06:47:17.000-0600Date Closed:2011-06-07 14:10:17
Versions:Frequency of
Environment:Attachments:( 0) session.log
Description:Im trying compile asterisk on my testing enviroment where i successfully compiled CVS-HEAD versions many times and im getting errors from compilation.

Im using PLD Linux 1.1 (www.pld-linux.org)
GCC: gcc version 2.95.4 20010319 (prerelease)
Kernel: 2.4.31 with GRSecurity
GLIBC: 2.2.5-25


Compilation fails on the including files dyld.h:
dlfcn.c:40: mach-o/dyld.h: No such file or directory
dlfcn.c:41: mach-o/nlist.h: No such file or directory
dlfcn.c:42: mach-o/getsect.h: No such file or directory
dlfcn.c:83: parse error before `*'
dlfcn.c:84: warning: type defaults to `int' in declaration of `NSSymbol'
dlfcn.c:84: `NSSymbol' declared as function returning a function
dlfcn.c:84: warning: function declaration isn't a prototype
dlfcn.c:84: function `NSSymbol' is initialized like a variable
dlfcn.c:124: parse error before `NSModule'
dlfcn.c:124: warning: no semicolon at end of struct or union
dlfcn.c:131: parse error before `}'

complete log attached (session.txt)
Comments:By: Tilghman Lesher (tilghman) 2005-11-11 08:21:32.000-0600

gcc 2.95 is no longer supported.  Please upgrade to gcc 3.2 or later.

By: Adam Rybak (adamr) 2005-11-11 10:23:54.000-0600

I commented out:

#ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)                
#  OBJS+= dlfcn.o                                                              
#  ASTCFLAGS+=-DDLFCNCOMPAT                                                    

and complied. What fuunctionality i lost?


By: Kevin P. Fleming (kpfleming) 2005-11-11 11:02:06.000-0600

That file is used to provide dynamic loading/linking services on platforms that don't have them. Your glibc headers should have provided /usr/include/dlfcn.h, which would have stopped Asterisk from trying to build its own copy (and obviously your library must have it, since otherwise the build would have failed).

Please find out where your distro has placed that file; if it's in a non-standard location, it should be corrected.

By: Kevin P. Fleming (kpfleming) 2005-11-11 11:30:40.000-0600

I am changing the severity of this bug since the problem is clearly related to the user's distro, not Asterisk itself.

By: BJ Weschke (bweschke) 2005-11-11 12:10:23.000-0600

gcc >= 3.0 is required to compile Asterisk 1.2