|Summary:||archivers/xarchiver fails to built with bsdgrep|
|Product:||Ports & Packages||Reporter:||Piotr Smyrak <ps.ports>|
|Component:||Individual Port(s)||Assignee:||Danilo Egea Gondolfo <danilo>|
|Severity:||Affects Only Me||CC:||kevans|
|Bug Depends on:|
Description Piotr Smyrak 2020-10-01 10:35:45 UTC
When upgrading the port it ends up with the following error: checking for perl... /usr/local/bin/perl checking for perl >= 5.8.1... 5.28.3 configure: error: GNU gettext tools must be at least version 0.16 ===> Script "configure" failed unexpectedly. Please report the problem to danilo@FreeBSD.org [maintainer] and attach the "/usr/ports/archivers/xarchiver/work/xarchiver-0.5.4.15/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/local/sbin/pkg-static info -g -Ea). *** Error code 1 Stop. make: stopped in /usr/ports/archivers/xarchiver *** Error code 1 Stop. make: stopped in /usr/ports/archivers/xarchiver The reason for the failure is that the configure script fails to fulfill its assumptions that only seem to work on gnugrep and fail when grep is bsdgrep: $ gettext --version | head -1 | grep -o '[0-9.]\+$' Where: $ grep --version grep (BSD grep) 2.6.0-FreeBSD $ gettext --version | head -1 | /usr/local/bin/grep -o '[0-9.]\+$' 0.21 Where: $ /usr/local/bin/grep --version grep (GNU grep) 3.5 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and others; see <https://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
Comment 1 Piotr Smyrak 2020-10-19 13:55:58 UTC
Created attachment 218888 [details] configure patch Adding a configure patch that changes the one liner used to return gettext version. Instead of using perl regexp unsupported by bsdgrep, it uses awk to print the latest column of the xgettext output.
Comment 2 Kyle Evans 2020-12-05 03:39:02 UTC
(In reply to Piotr Smyrak from comment #1) Hi, This is actually a GNU extension to BREs rather than Perl -- I would recommend having your patch do: -xgversion="`xgettext --version | head -1 | grep -o '[0-9.]\+$'`" +xgversion="`xgettext --version | head -1 | grep -Eo '[0-9.]+$'`" This may be more palatable to upstream as it's just POSIXifying their expression. bsdgrep in -CURRENT now enables GNU extensions by default and the original incantation works again, but 12.x will be broken until 12.3. IMO, it is worth it.
Comment 3 Piotr Smyrak 2020-12-05 17:47:24 UTC
(In reply to Kyle Evans from comment #2) Nice! Thanks for looking into it. I will try to upstream the change then.
Comment 4 Piotr Smyrak 2020-12-08 13:49:10 UTC
The change suggested by Kyle has been upstreamed in https://github.com/ib/xarchiver/pull/106
Comment 5 Piotr Smyrak 2021-08-18 11:10:12 UTC
This bug has been fixed by bsdgrep improvements and an upstream fix added before 0.5.4.16 of xarchiver has been released.