[Home]

Summary:ASTERISK-15501: [patch] Configured CFLAGS/LDFLAGS are used by main, but not by modules built out of tree
Reporter:Philip Prindeville (pprindeville)Labels:
Date Opened:2010-01-24 22:09:19.000-0600Date Closed:2010-06-08 10:41:46
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-1.6-cflags2.patch
Description:The patch supplied by Kevin in:

http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214696

doesn't include Makefile.rules, so out-of-tree modules (which use Makefile.moddir_rules which includes Makefile.rules) won't have properly initialized values for _ASTCFLAGS and ASTLDFLAGS.
Comments:By: Philip Prindeville (pprindeville) 2010-01-31 14:59:54.000-0600

Actually, this patch fails when used with app_rxfax, spandsp, and the out-of-tree module makefile proposed by Tilghman in 15759.

There are enough issues with building in various scenarios that the question could be begged if the build system needs a comprehensive review of how it does in various scenarios that could be supported but aren't.

By: Tilghman Lesher (tilghman) 2010-02-08 15:07:10.000-0600

I really don't see why this needs a review on our part.  From our perspective, if code is under a license where it could be linked to Asterisk, it might as well be contributed to Asterisk, where it could exist in-tree.  So there doesn't appear to be a good reason either for modules to exist outside of the tree or for us to support such a beast.

Beyond that, as you noted above, this patch is incomplete.

By: Tilghman Lesher (tilghman) 2010-02-15 16:48:04.000-0600

No response from reporter.

By: Philip Prindeville (pprindeville) 2010-02-19 20:38:26.000-0600

You closed this after a week?  Really???

I've filed lots of bugs that I'm still waiting for any sort of movement on, months later.

How does that work?

By: Philip Prindeville (pprindeville) 2010-02-19 20:43:18.000-0600

Anyway, regarding your question:

Sometimes it's just *useful* to build out of tree.

(1) you're making changes to Asterisk core functionality, but don't want those changes spilling over into modules which should be free of dependencies on those changes.

(2) you're building on a machine with limited resources, and don't want to build against the source tree... just the required headers and libraries.

And I'm not asking for a review... I'm asking for a fix.  The way that LDFLAGS and CFLAGS are used in various subdirectories is highly inconsistent (and somewhat suspect).  This should probably be cleaned up.

Preferably by the person that made the changes in the first place, since (a) he knows what end-goal he's trying to achieve better than anyone else does, and (b) fixing this damage might remind him of other places where he's incurred similar damage that hasn't yet been reported.

By: Tilghman Lesher (tilghman) 2010-02-20 11:08:36.000-0600

Our policy is to close issues when we've requested feedback and had no response for 3 business days.

As it is, it is a feature request without a patch, and thus does not belong on the issue tracker.  Whether it's inconsistent or not is irrelevant:  we do not support building modules outside of the tree against our Makefiles, and thus it is not within our purview.

If you disagree with my interpretation of policy, you are more than welcome to send an email to the asterisk-dev list, asking for clarification and/or a policy change.

By: Philip Prindeville (pprindeville) 2010-03-06 18:47:00.000-0600

"I really don't see why this needs a review on our part. From our perspective, if code is under a license where it could be linked to Asterisk, it might as well be contributed to Asterisk, where it could exist in-tree. So there doesn't appear to be a good reason either for modules to exist outside of the tree or for us to support such a beast."

The corollary to that reasoning, of course, is that you're not making it possible for users who wish to build code that requires a different license to do so (out-of-tree).  For instance, if they wanted to use a resource or feature that required non-GPL licensing (such as libnfconntrack, or an MP3 codec).

By: Tilghman Lesher (tilghman) 2010-03-06 22:43:32.000-0600

It is unlawful for somebody to prepare a package which is intended to be linked to Asterisk but is not licensed under the GPL, except by special arrangement with Digium.

By: Philip Prindeville (pprindeville) 2010-03-07 13:46:57.000-0600

"It is unlawful for somebody to prepare a package which is intended to be linked to Asterisk but is not licensed under the GPL, except by special arrangement with Digium."

That may be, but someone may still have a legitimate reason for building such code if only to do a proof-of-concept *before* bothering to waste Digium's time by negotiating a "special arrangement" for something that may or may not turn out to be technically feasible.

By: Tilghman Lesher (tilghman) 2010-03-07 23:29:44.000-0600

Any such person needs to contact Digium directly.  Please do not reopen this issue again unless you have an ACTUAL NEED, not a theoretical situation that may never happen.

By: Philip Prindeville (pprindeville) 2010-05-27 15:08:55

Wasn't the outcome of the conference call concurrence from Russell that sometimes it is indeed useful to be able to build a directory against several different source trees when developing?

For instance, if I'm building a module which I want to interoperate with 1.4, 1.6, and trunk I might have that in a separate directory, but want to build it against 3 separate external trees just to make sure it's portable.

By: Digium Subversion (svnbot) 2010-06-08 10:41:23

Repository: asterisk
Revision: 269008

U   trunk/Makefile.rules

------------------------------------------------------------------------
r269008 | russell | 2010-06-08 10:41:23 -0500 (Tue, 08 Jun 2010) | 5 lines

Ensure CONFIG_FLAGS makes it into the build rules when doing out of tree builds.

(closes issue ASTERISK-15501)
Reported by: pprindeville

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

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

By: Digium Subversion (svnbot) 2010-06-08 10:41:45

Repository: asterisk
Revision: 269009

_U  branches/1.6.2/
U   branches/1.6.2/Makefile.rules

------------------------------------------------------------------------
r269009 | russell | 2010-06-08 10:41:45 -0500 (Tue, 08 Jun 2010) | 12 lines

Merged revisions 269008 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r269008 | russell | 2010-06-08 10:41:23 -0500 (Tue, 08 Jun 2010) | 5 lines
 
 Ensure CONFIG_FLAGS makes it into the build rules when doing out of tree builds.
 
 (closes issue ASTERISK-15501)
 Reported by: pprindeville
........

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

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