Summary:ASTERISK-03889: [patch] Rework of make subsystem for chan_h323 to be compatible with OpenH323
Reporter:Paul Cadach (pcadach)Labels:
Date Opened:2005-04-07 13:01:57Date Closed:2008-01-15 15:32:33.000-0600
Versions:Frequency of
Environment:Attachments:( 0) ast-h323-mk1.diff
Description:Existing make operations is pretty depends on configuration (and version) of OpenH323. Usage of OpenH323-compatible make subsystem gives a chance to remove possible crashes of chan_h323 due to incompatible options used to compile OpenH323/PWLib itself and ast_h323.cpp.


Disclaimer is on file.
Comments:By: Paul Cadach (pcadach) 2005-04-07 13:03:36

ast-h323-mk1.diff is real Makefile-system update, ast-h323-mk2.diff is just rename of channels/h323/ast_h323.cpp into channels/h323/ast_h323.cxx (extension is changed to be compatible with make subsystem of OpenH323).

By: Paul Cadach (pcadach) 2005-04-07 13:12:05

Short usage notes: just go to channels/h323/ then issue make you used to build OpenH323/PWLib (i.e. make opt, make debug, make optnoshared, etc.). You will have generated libchanh323.a, and Makefile.ast which holds options OpenH323 uses to compile and link its own modules. Makefile.ast is then included from channels/'s makefile to have libraries and paths to successful link chan_h323.so.

Simple and easy.

By: jerjer (jerjer) 2005-04-07 21:06:53

when someone vouches for the santy of this patch, I will apply it to cvs -head.

By: Paul Cadach (pcadach) 2005-04-08 15:22:01

ast-h323-mk1.diff is updated - mistype fixed.

By: Chih-Wei Huang (cwhuang) 2005-04-11 22:39:14

Nice work! I have tried it and now I can statically link Openh323 to chan_h323.so. Cool!

Some questions:
* I don't understand these lines:
$(SOURCES):     Makefile ../../Makefile
       touch $(SOURCES)
why $(SOURCES) depends on Makefiles and why touches $(SOURCES)?
(I dislike to touch on making time since it may cause problems)

* When files in h323 subdirectory be changed, chan_h323.so still will not be re-linked. I still have to re-make the h323 subdirectory. But since now the target is variable(opt, debug, optnoshared, ...), the problem is a little difficult than before...

By: Paul Cadach (pcadach) 2005-04-12 22:41:21

About next part of Makefile:
$(SOURCES): Makefile ../../Makefile
       touch $(SOURCES)

This just forcing to full recompilation of all code if something is changed in Makefiles (mostly compiling/building options).

You should always check when to rebuild channels/h323 manually. With moving to OpenH323-compatible building subsystem there is no way to do this automatically.

By: Jeffrey C. Ollie (jcollie) 2005-04-19 01:10:48

Well, these patches at least enabled me to build chan_h323, and with the correct compiler flags etc.  I'm having some odd results while testing the new channel (like segfaults when I try and unload chan_h323.so) but I don't know if the problems are my fault, a bug in chan_h323, a bug in openh323 or a bug in these pathes.

By: Paul Cadach (pcadach) 2005-04-20 02:44:53

ast-h323-mk2.diff isn't required anymore. ast-h323-mk1 emulates rename by making hardlink between ast_h323.cpp and ast_h323.cxx. Hardlink choosed just to have real updates (including times) on ast_h323.cxx when ast_h323.cpp is changed (such way allows to apply patches to traditional ast_h323.cpp until real rename is done).

By: Paul Cadach (pcadach) 2005-04-20 15:25:17

Patch is updated to force (re-)creation of ast_h323.cxx (for situations when ast_h323.cpp is unlinked, for example, applying patches).

By: wgfreewill (wgfreewill) 2005-04-20 23:57:08

It seems the 1.0.7 stable BRIstuffed included with Debian Sarge, with the asterisk-oh323 0.6.6pre3-3 works like a champ.

apt-get install asterisk asterisk-oh323 copy my old configs into place and its been running for about 24 hours stable.

I know oh323 is a lot slower than chan_h323. Hopefully the total re-write will solve all issues permanantly.

By: Paul Cadach (pcadach) 2005-04-22 01:44:10

Reminder sent to JerJer

Is vouches enough to apply the patch to the CVS-HEAD? We needs to move forward...

By: Kevin P. Fleming (kpfleming) 2005-04-22 08:24:56

Yes, let's get this in, it appears that plenty of people are vouching for its value :-)

By: Paul Cadach (pcadach) 2005-04-24 14:23:01

Updated .cvsignore and README files to represent new building technique.

By: jerjer (jerjer) 2005-04-28 23:42:26

Applied to cvs -head

By: jerjer (jerjer) 2005-04-28 23:42:43

not in stable

By: Digium Subversion (svnbot) 2008-01-15 15:32:32.000-0600

Repository: asterisk
Revision: 5527

_U  trunk/channels/h323/
U   trunk/channels/h323/.cvsignore
U   trunk/channels/h323/Makefile
U   trunk/channels/h323/README

r5527 | jeremy | 2008-01-15 15:32:32 -0600 (Tue, 15 Jan 2008) | 2 lines

Rework astersk make process to be compatable with the Open H.323 build process. Bug ASTERISK-3889



By: Digium Subversion (svnbot) 2008-01-15 15:32:33.000-0600

Repository: asterisk
Revision: 5528

U   trunk/channels/Makefile

r5528 | jeremy | 2008-01-15 15:32:33 -0600 (Tue, 15 Jan 2008) | 2 lines

Rework astersk make process to be compatable with the Open H.323 build process. Bug ASTERISK-3889