Re: [FFmpeg-devel] [PATCH] configure: fix module dependencies on zlib

2017-11-20 Thread James Almer
On 11/20/2017 4:25 PM, Michael Niedermayer wrote:
> On Mon, Nov 20, 2017 at 02:58:58PM -0300, James Almer wrote:
>> On 11/20/2017 2:34 PM, Michael Niedermayer wrote:
>>> On Sun, Nov 19, 2017 at 04:00:11PM -0300, James Almer wrote:
 select should not be used with external libraries. It's mean to soft
 enable internal modules/features.

 Signed-off-by: James Almer 
 ---
  configure | 48 ++--
  1 file changed, 26 insertions(+), 22 deletions(-)
>>>
>>> btw, is all the *suggest= zlib stuff correct ?
>>>
>>> at least in the past configure could not handle a mix of
>>> dependancies which turned targets on and which turned sources off
>>> as the order in which they where executed resilted in different
>>> outcomes
>>
>> 'foo_suggest="bar"' nowadays is basically the same as doing 'enabled foo
>> && enable_weak bar && enabled bar && append foo_extralibs
>> $bar_extralibs'. It does not disable foo under any circumstances.
>>
>> enable_weak can't enable what was hard disabled, and zlib being
>> autodetected will be either hard enabled or hard disabled by the
>> automated check or by a command line option by the time dependency
>> checks are made.
> 
> IIRC the issue i remember was:
> 
> 'foo_suggest="bar"' or 'foo_select="bar"'
> AND
> 'dot_deps="bar"'
> 
> had in the past unpredictable behavior because if foo_suggest/select is
> evaluated first dot will be enabled and if dot_deps is evaluated first
> dot would stay disabled.

That sounds like it would only be possible with _select, and I'm not
even sure if even then at all.
_deps of course doesn't try to enable anything, and _suggest can't
enable what was hard disabled, and external libraries (autodetected or
not) get hard disabled long before dependencies are resolved.

As long as bar was hard disabled by the time dependencies are resolved,
it shouldn't matter which module gets checked first in your scenario, if
dot or foo.

> 
> That is the dependency solver would produce different results when
> one would not expect it. On top of that the dependency solver recursivly
> evaluted things making it a tad bit unpredictable what would get
> evaluated first.
> 
> I remember thinking back then that all dependancies should be clear
> one way, eiter only deps or only selects/suggest. (which was the case
> back then for nearly all things as i rememer checking)
> 
> But its a while ago that i looked at this so i might misremember a detail
> and there where various changes since then in configure.

My bet is that yeah, so many changes have been made to configure that by
now such scenarios are probably not a problem anymore.

> 
> but after a bit of looking now, i found my grep command i used to check
> for this issue:
> 
> egrep '(suggest|select)=' configure | sed 's/.*=//;s/"//g' | tr ' ' '\n' | 
> sort | uniq > select.tmp
> egrep '(deps|deps_any)=' configure | sed 's/.*=//;s/"//g' | tr ' ' '\n' | 
> sort | uniq >dep.tmp
> cat select.tmp dep.tmp |sort | uniq -d
> 
> [...]
> 
> 
> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: fix module dependencies on zlib

2017-11-20 Thread Michael Niedermayer
On Mon, Nov 20, 2017 at 02:58:58PM -0300, James Almer wrote:
> On 11/20/2017 2:34 PM, Michael Niedermayer wrote:
> > On Sun, Nov 19, 2017 at 04:00:11PM -0300, James Almer wrote:
> >> select should not be used with external libraries. It's mean to soft
> >> enable internal modules/features.
> >>
> >> Signed-off-by: James Almer 
> >> ---
> >>  configure | 48 ++--
> >>  1 file changed, 26 insertions(+), 22 deletions(-)
> > 
> > btw, is all the *suggest= zlib stuff correct ?
> > 
> > at least in the past configure could not handle a mix of
> > dependancies which turned targets on and which turned sources off
> > as the order in which they where executed resilted in different
> > outcomes
> 
> 'foo_suggest="bar"' nowadays is basically the same as doing 'enabled foo
> && enable_weak bar && enabled bar && append foo_extralibs
> $bar_extralibs'. It does not disable foo under any circumstances.
> 
> enable_weak can't enable what was hard disabled, and zlib being
> autodetected will be either hard enabled or hard disabled by the
> automated check or by a command line option by the time dependency
> checks are made.

IIRC the issue i remember was:

'foo_suggest="bar"' or 'foo_select="bar"'
AND
'dot_deps="bar"'

had in the past unpredictable behavior because if foo_suggest/select is
evaluated first dot will be enabled and if dot_deps is evaluated first
dot would stay disabled.

That is the dependency solver would produce different results when
one would not expect it. On top of that the dependency solver recursivly
evaluted things making it a tad bit unpredictable what would get
evaluated first.

I remember thinking back then that all dependancies should be clear
one way, eiter only deps or only selects/suggest. (which was the case
back then for nearly all things as i rememer checking)

But its a while ago that i looked at this so i might misremember a detail
and there where various changes since then in configure.

but after a bit of looking now, i found my grep command i used to check
for this issue:

egrep '(suggest|select)=' configure | sed 's/.*=//;s/"//g' | tr ' ' '\n' | sort 
| uniq > select.tmp
egrep '(deps|deps_any)=' configure | sed 's/.*=//;s/"//g' | tr ' ' '\n' | sort 
| uniq >dep.tmp
cat select.tmp dep.tmp |sort | uniq -d

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: fix module dependencies on zlib

2017-11-20 Thread James Almer
On 11/20/2017 2:34 PM, Michael Niedermayer wrote:
> On Sun, Nov 19, 2017 at 04:00:11PM -0300, James Almer wrote:
>> select should not be used with external libraries. It's mean to soft
>> enable internal modules/features.
>>
>> Signed-off-by: James Almer 
>> ---
>>  configure | 48 ++--
>>  1 file changed, 26 insertions(+), 22 deletions(-)
> 
> btw, is all the *suggest= zlib stuff correct ?
> 
> at least in the past configure could not handle a mix of
> dependancies which turned targets on and which turned sources off
> as the order in which they where executed resilted in different
> outcomes

'foo_suggest="bar"' nowadays is basically the same as doing 'enabled foo
&& enable_weak bar && enabled bar && append foo_extralibs
$bar_extralibs'. It does not disable foo under any circumstances.

enable_weak can't enable what was hard disabled, and zlib being
autodetected will be either hard enabled or hard disabled by the
automated check or by a command line option by the time dependency
checks are made.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: fix module dependencies on zlib

2017-11-20 Thread Michael Niedermayer
On Sun, Nov 19, 2017 at 04:00:11PM -0300, James Almer wrote:
> select should not be used with external libraries. It's mean to soft
> enable internal modules/features.
> 
> Signed-off-by: James Almer 
> ---
>  configure | 48 ++--
>  1 file changed, 26 insertions(+), 22 deletions(-)

btw, is all the *suggest= zlib stuff correct ?

at least in the past configure could not handle a mix of
dependancies which turned targets on and which turned sources off
as the order in which they where executed resilted in different
outcomes


[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: fix module dependencies on zlib

2017-11-19 Thread James Almer
On 11/19/2017 5:33 PM, Michael Niedermayer wrote:
> On Sun, Nov 19, 2017 at 04:00:11PM -0300, James Almer wrote:
>> select should not be used with external libraries. It's mean to soft
>> enable internal modules/features.
>>
>> Signed-off-by: James Almer 
>> ---
>>  configure | 48 ++--
>>  1 file changed, 26 insertions(+), 22 deletions(-)
> 
> didnt test this but LGTM
> 
> thx

Pushed, thanks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] configure: fix module dependencies on zlib

2017-11-19 Thread Michael Niedermayer
On Sun, Nov 19, 2017 at 04:00:11PM -0300, James Almer wrote:
> select should not be used with external libraries. It's mean to soft
> enable internal modules/features.
> 
> Signed-off-by: James Almer 
> ---
>  configure | 48 ++--
>  1 file changed, 26 insertions(+), 22 deletions(-)

didnt test this but LGTM

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"Nothing to hide" only works if the folks in power share the values of
you and everyone you know entirely and always will -- Tom Scott



signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel