I am trying to install ffmpeg 6.1 (https://ffmpeg.org/releases/ffmpeg-6.1.1.tar.xz), but when executing the configure script my bash version 5.0.17 removes the double quotes from the parameters containing the condition to select the version of the libraries being searched for to pass this parameter to pkg-config.
For example, when processing code
check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version
, the pkg-config call will look something like
pkg-config --exists libopenjp2 >= 2.1.0
As a result, configure execution stops with the following error.
ERROR: libopenjp2 >= 2.1.0 not found using pkg-config
As a hint, you may be prompted to set the path to the 2.1.0.pc file in PKG_CONFIG_PATH.
It is interesting that this is the case in other versions of bash, for example, this problem is not observed in version 5.1.16.
Does this mean that bash version 5.0.17 will actually not be able to work with configure to build most code sources, because such version selection conditions are used quite often when searching for the right libraries?
Or perhaps I can influence this bash behaviour in some way? Or, alternatively, have I misinterpreted the problem at all and the solution is in a completely different area?
The problem was identified in the Linux Mint 20.1 distribution.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20.1
Release: 20.1
Codename: ulyssa
First of all, I checked that if I call pkg-config correctly, it can find the right library on my system.
$ pkg-config --exists "libopenjp2 >= 2.1.0"
$ echo $?
0
or
$ pkg-config --cflags --libs "libopenjp2 >= 2.1.0"
-I/usr/include/openjpeg-2.3 -lopenjp2
Next, I examined the configure code associated with this problem and came to the conclusion I outlined above.