Opened 3 years ago

Closed 3 years ago

#5246 closed defect (fixed)

./configure handles duplicate flags badly

Reported by: divVerent Owned by:
Priority: normal Component: build system
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

./configure options cannot be specified twice any more. Specifying options twice tends to sometimes happen with calling scripts - for example mpv's config script will under some conditions add --enable-openssl --enable-nonfree, but also includes a file with local options which might contain --enable-nonfree --enable-fdk-aac. This is a recent regression, as none of the recent release branches exhibit this problem.

How to reproduce:

% ./configure --enable-gpl --enable-gpl
gpl cannot be enabled
% ./configure --enable-gpl --disable-gpl
gpl cannot be enabled

Looks like the problem is in the request() function, which when enabling a flag first disables it it and then enables it again to "force the refresh of the dependencies", and the disable() function, which bails out if the option was previously explicitly requested.

So one solution could be calling disable_weak() from request() instead (which doesn't perform this check). Another solution could be disabling ${var}_requested before the disable call (and afterwards it's enabled again, so all is well).

Change History (1)

comment:1 Changed 3 years ago by heleppkes

  • Resolution set to fixed
  • Status changed from new to closed

The change that caused this has been reverted for the time being as it proved to be troublesome and no clear fix has been found.

Note: See TracTickets for help on using tickets.