[Home]

Summary:ASTERISK-00386: [patch] Build Asterisk on FreeBSD
Reporter:Thorsten Lockert (tholo)Labels:
Date Opened:2003-10-14 17:28:48Date Closed:2008-01-15 14:36:15.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) freebsd.diff
( 1) freebsd-v2.diff
( 2) lpc10.diff
( 3) warnings.diff
Description:I have built some patches to build Asterisk cleanly on FreeBSD, in addition to OpenBSD and Linux.

****** ADDITIONAL INFORMATION ******

Note that only FreeBSD 4.8-STABLE has been tried with this so far.  Also note that there are some minor issues with sched.c complaining about attempts to schedule things in the past.  These can be safely ignored, but I will have a fix for that, too, shortly.

This builds and runs with both LPC10 and SpeeX support, as well as chan_oss and app_intercom building...
Comments:By: Mark Spencer (markster) 2003-10-16 05:18:32

Added to CVS

By: John Todd (jtodd) 2003-10-17 02:19:20

This was backed out this afternoon by Martin due to the missing "-LIBS+=" string.  Here's the patch to the patch (too trivial to add as a completely new file):

RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.35
diff -u -r1.35 Makefile
--- Makefile    16 Oct 2003 10:44:04 -0000      1.35
+++ Makefile    16 Oct 2003 17:40:07 -0000
@@ -144,7 +144,7 @@
endif
LIBS+=-lncurses -lm
ifeq (${OSARCH},Linux)
--lresolv  #-lnjamd
+LIBS+=-lresolv  #-lnjamd
endif
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
       translate.o file.o say.o pbx.o cli.o md5.o term.o \

By: Mark Spencer (markster) 2003-10-20 21:44:50

Version 2 applied to CVS

By: John Todd (jtodd) 2003-10-21 02:51:25

Try, try again.  :-)  Current CVS doesn't compile on Linux.  This patch resolves the problem and compiles/installs cleanly.



Date: Tue, 21 Oct 2003 02:30:27 -0500 (CDT)
Subject: Try this patch to the top level Makefile
From: "James Sharp" <jsharp@psychoses.org>
To: jtodd@loligo.com
Reply-To: jsharp@psychoses.org

--- Makefile.old        Tue Oct 21 02:29:17 2003
+++ Makefile    Tue Oct 21 02:29:26 2003
@@ -132,7 +132,7 @@
CFLAGS+=# -fomit-frame-pointer
SUBDIRS=res channels pbx apps codecs formats agi cdr astman
ifeq (${OSARCH},Linux)
-LIBS=-ldl
+LIBS=-ldl -lpthread
endif
ifeq (${OSARCH},OpenBSD)
LIBS=-pthread

By: jerjer (jerjer) 2003-10-21 04:10:06

jtodd's diff to cvs

By: jerjer (jerjer) 2003-10-21 04:11:12

that is:  added jtodd's diff to cvs

By: Thorsten Lockert (tholo) 2003-10-21 09:51:48

Some systems get a compile error in codecs/lpc10/lpcini.c -- by swapping the order of the #include's that is fixed.

By: Thorsten Lockert (tholo) 2003-10-21 10:14:02

A couple of new warnings got introduced on some systems due to the fact that "ntohl()" on some systems returns "unsigned int" and on others return "long"...  Patch added.

By: Mark Spencer (markster) 2003-10-21 21:27:44

Merged warning fixes

By: Digium Subversion (svnbot) 2008-01-15 14:36:15.000-0600

Repository: asterisk
Revision: 1644

U   trunk/apps/app_cdr.c
U   trunk/channels/chan_iax.c
U   trunk/channels/iax2-parser.c

------------------------------------------------------------------------
r1644 | markster | 2008-01-15 14:36:15 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix compile warnings (bug ASTERISK-386)

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

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