Bug#998779: bs1770gain: bashism in configure script
[Peter Belkner] > Hi Petter, > > I've tested it with all '=' replaced by '==' and it seemed to be ok. Very good. While these changes in the latest version of bs1770gain kept the script working with bash, it was not enough to get it working with dash. This is the output I get when trying 'dash ./configure': checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports the include directive... yes (GNU style) checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for ar... ar checking the archiver (ar) interface... ar checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking dependency style of gcc... (cached) gcc3 checking for ranlib... ranlib checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu no /usr/bin/ld: /tmp/user/1000/cctFYkiC.o: in function `main': :(.text+0x5): undefined reference to `avutil_version' collect2: error: ld returned 1 exit status ./configure: line 5754: /tmp/user/1000/tmp.xKhoNsmK13: No such file or directory /usr/bin/ld: /tmp/user/1000/ccwi8v3m.o: in function `main': :(.text+0x5): undefined reference to `avcodec_version' collect2: error: ld returned 1 exit status ./configure: line 5774: /tmp/user/1000/tmp.fQaq5bsCgh: No such file or directory /usr/bin/ld: /tmp/user/1000/ccbh40N8.o: in function `main': :(.text+0x5): undefined reference to `avformat_version' collect2: error: ld returned 1 exit status ./configure: line 5794: /tmp/user/1000/tmp.b0doz3j5GV: No such file or directory /usr/bin/ld: /tmp/user/1000/ccfWZHiU.o: in function `main': :(.text+0x5): undefined reference to `swresample_version' collect2: error: ld returned 1 exit status ./configure: line 5814: /tmp/user/1000/tmp.nNEWDzzPrk: No such file or directory /usr/bin/ld: /tmp/user/1000/cc0Noh1B.o: in function `main': :(.text+0x5): undefined reference to `swscale_version' collect2: error: ld returned 1 exit status ./configure: line 5834: /tmp/user/1000/tmp.D8Ug6LetJU: No such file or directory /usr/bin/ld: /tmp/user/1000/ccVL8tbm.o: in function `main': :(.text+0x5): undefined reference to `postproc_version' collect2: error: ld returned 1 exit status ./configure: line 5854: /tmp/user/1000/tmp.LDKuGtXYra: No such file or directory /usr/bin/ld: /tmp/user/1000/cc9Q27V7.o: in function `main': :(.text+0x5): undefined reference to `avfilter_version' collect2: error: ld returned 1 exit status ./configure: line 5874: /tmp/user/1000/tmp.WBZPnAaQZk: No such file or directory configure: linking FFmpeg checking pthread.h usability... yes checking pthread.h presence... no configure: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: pthread.h: proceeding with the compiler's result checking for pthread.h... yes checking for pthread_create in -lpthread... ./configure: line 6201: ac_fn_c_try_link: command not found no configure: *** configure: * pthread not found. * configure: * bs10gain will be build without support for parallel processing. * configure: *** checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating libpbutil/Makefile config.status: creating lib1770-2/Makefile config.status: creating libff/Makefile config.status: creating libbg/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands Because of this I keep this bug report open. -- Happy hacking Petter Reinholdtsen
Bug#998779: bs1770gain: bashism in configure script
[Petter Reinholdtsen] > Very good. While these changes in the latest version of bs1770gain kept > the script working with bash, it was not enough to get it working with > dash. Sorry, my mistake. > This is the output I get when trying 'dash ./configure': I have to use 'dash ./configure --with-ffmpeg=/usr', then it work. -- Happy hacking Petter Reinholdtsen
Bug#998779: bs1770gain: bashism in configure script
Hi Petter, I've tested it with all '=' replaced by '==' and it seemed to be ok. Many thanks Peter On 20.09.2022 07:11, Petter Reinholdtsen wrote: [Peter Belkner] is the intention of your patch to substitute all single comparison singes ('=') by double comparison singes ('==')? My intention with the patch was the other way, to replace 'test x == y' with 'test x = y', as he latter is POSIX notation, while the former is bash notation. See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html > I'm asking because on my site 'configure' is derived an hence unfortunately I cannot simply apply your patch. Note, my patch was for configure.ac, the source of configure.
Bug#998779: bs1770gain: bashism in configure script
Hi Petter, thank you for the clarification! Best regards Peter On 20.09.2022 07:11, Petter Reinholdtsen wrote: [Peter Belkner] is the intention of your patch to substitute all single comparison singes ('=') by double comparison singes ('==')? My intention with the patch was the other way, to replace 'test x == y' with 'test x = y', as he latter is POSIX notation, while the former is bash notation. See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html > I'm asking because on my site 'configure' is derived an hence unfortunately I cannot simply apply your patch. Note, my patch was for configure.ac, the source of configure.
Bug#998779: bs1770gain: bashism in configure script
[Peter Belkner] > is the intention of your patch to substitute all single comparison > singes ('=') by double comparison singes ('==')? My intention with the patch was the other way, to replace 'test x == y' with 'test x = y', as he latter is POSIX notation, while the former is bash notation. See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html > > I'm asking because on my site 'configure' is derived an hence > unfortunately I cannot simply apply your patch. Note, my patch was for configure.ac, the source of configure. -- Happy hacking Petter Reinholdtsen
Bug#998779: bs1770gain: bashism in configure script
Hi, On Mon, 19 Sep 2022, at 19:11, Petter Reinholdtsen wrote: > [Andrej Shadura] >> Your package uses configure script with bash features not present in >> POSIX without explicitly declaring the need to bash shell; this >> currently works as configure scripts select bash, but when dash enables >> LINENO support, your configure script will start failing: > > Can you confirm that this patch solve the problem. It seem to work for > me: Thanks, I think this should fix the issue. -- Cheers, Andrej
Bug#998779: bs1770gain: bashism in configure script
[Andrej Shadura] > Your package uses configure script with bash features not present in > POSIX without explicitly declaring the need to bash shell; this > currently works as configure scripts select bash, but when dash enables > LINENO support, your configure script will start failing: Can you confirm that this patch solve the problem. It seem to work for me: diff --git a/configure.ac b/configure.ac index 411da35..1a99ae5 100644 --- a/configure.ac +++ b/configure.ac @@ -132,7 +132,7 @@ if test "x$ffmpeg" != "xno"; then # [ AC_CHECK_LIB(avfilter, avfilter_version, [ffmpeg=yes LIBS="${LIBS} -lavfilter"], ffmpeg=no), ffmpeg=no) fi # ] -if test "x$ffmpeg" == "xno" ; then # [ +if test "x$ffmpeg" = "xno" ; then # [ AC_MSG_ERROR([FFmpeg not found]) fi # ] # test for FFmpeg ] @@ -312,7 +312,7 @@ if test "x$dynload" = "xyes"; then # [ AC_CHECK_LIB(dl, dlopen, [dl=yes LIBS="${LIBS} -ldl"], dl=no), dl=no) fi # ] -if test "x$dl" == "xno" ; then # [ +if test "x$dl" = "xno" ; then # [ AC_MSG_ERROR([libdl not found]) fi # ] fi # ] @@ -373,7 +373,7 @@ else # ] [ AC_CHECK_HEADER(libproc.h, AC_CHECK_LIB(proc, proc_pidpath, [proc=yes LIBS="${LIBS} -lproc"], proc=no), proc=no) -if test "x$proc" == "xno" ; then # [ +if test "x$proc" = "xno" ; then # [ AC_MSG_ERROR([libproc not found]) else # ] [ AC_DEFINE([HAVE_LIBPROC], [1], [Define to 1 if you have libproc.]) @@ -390,7 +390,7 @@ else # ] [ AC_CHECK_HEADER(pthread.h, AC_CHECK_LIB(pthread, pthread_create, [pthread=yes LIBS="${LIBS} -pthread"], pthread=no), pthread=no) - if test "x$pthread" == "xno" ; then # [ + if test "x$pthread" = "xno" ; then # [ AC_MSG_NOTICE([***]) AC_MSG_NOTICE([* pthread not found. *]) AC_MSG_NOTICE([* bs10gain will be build without support for parallel processing. *]) CC to upstream. -- Happy hacking Petter Reinholdtsen