Bug 1999491 - whatsup fails to build from source in Fedora 36 with autoconf-2.71: ./configure: line 15855: syntax error near unexpected token `as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`'
Summary: whatsup fails to build from source in Fedora 36 with autoconf-2.71: ./configu...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: whatsup
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/bui...
Whiteboard:
Depends On:
Blocks: 1936597 F36FTBFS
TreeView+ depends on / blocked
 
Reported: 2021-08-31 08:08 UTC by Ondrej Dubaj
Modified: 2021-11-26 15:10 UTC (History)
2 users (show)

Fixed In Version: whatsup-1.14-37.fc36
Clone Of:
Environment:
Last Closed: 2021-11-26 15:10:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github chaos whatsup pull 3 0 None open Adjust to Autoconf-2.71 2021-11-26 14:54:11 UTC

Description Ondrej Dubaj 2021-08-31 08:08:09 UTC
Your package fails to build with the newest autoconf-2.71, which was part of a recent wide Fedora change. More information about Fedora autoconf Change available here: https://fedoraproject.org/wiki/Changes/Autoconf_271#How_To_Test. The easiest way to reproduce the problem is to execute a fedora scratch-build on your package. Thank you for cooperation!

Comment 1 Petr Pisar 2021-11-26 13:11:22 UTC
From the build log:

./configure --build=aarch64-redhat-linux-gnu --host=aarch64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-static --with-perl-extensions --with-perl-vendor-arch --with-perl-destdir=/builddir/build/BUILDROOT/whatsup-1.14-36.fc36.aarch64
[...]
checking for GNU libc compatible malloc... yes
./configure: line 15855: syntax error near unexpected token `as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`'
./configure: line 15855: `  as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`'
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.LfkFO0 (%build)
    extra tokens at the end of %else directive in line 186:  %else # EPEL thing
    extra tokens at the end of %else directive in line 204:  %else # EPEL thing
    extra tokens at the end of %else directive in line 223:  %else #EPEL thing
    Bad exit status from /var/tmp/rpm-tmp.LfkFO0 (%build)
Child return code was: 1
EXCEPTION: [Error()]

Comment 2 Petr Pisar 2021-11-26 13:23:50 UTC
There is an escaping error:

  for ac_func in strcpy strdup strchr \ strlen \ strcat \ strtok \
do :
  as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
  cat >>confdefs.h <<_ACEOF
#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF

fi

Because of the backslashes at "for" line,  the "do" word is not recognized as keyword. Also ac_func variable contains " strlen" value instead of "strlen".

Comment 3 Petr Pisar 2021-11-26 13:37:23 UTC
This comes from configure.ac:

AC_CHECK_FUNCS( \
  strcpy \
  strdup \
  strchr \
  strlen \
  strcat \
  strtok \
)

Old autoconf converts it into:

for ac_func in \
  strcpy \
  strdup \
  strchr \
  strlen \
  strcat \
  strtok \

do :

New autoconf into:

  for ac_func in strcpy strdup strchr \ strlen \ strcat \ strtok \
do :

Comment 4 Petr Pisar 2021-11-26 14:54:12 UTC
There were blank lines at the end of the lines. I will fix it.


Note You need to log in before you can comment on or make changes to this bug.