Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683254 - dev-libs/libgpg-error-1.32-r1 with gawk-5: fatal: cannot use gawk builtin `namespace' as variable name
Summary: dev-libs/libgpg-error-1.32-r1 with gawk-5: fatal: cannot use gawk builtin `na...
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C)
URL:
Whiteboard:
Keywords: PATCH, UPSTREAM
Depends on:
Blocks:
 
Reported: 2019-04-13 16:42 UTC by Patrick Lauer
Modified: 2020-01-09 08:13 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libgpg-error-1.36-gawk5_namespace_reserved_word.patch (libgpg-error-1.36-gawk5_namespace_reserved_word.patch,2.30 KB, patch)
2019-04-13 18:04 UTC, Lars Wendler (Polynomial-C)
Details | Diff
libgpg-error-1.36-gawk5_namespace_reserved_word.part2.patch (01-libgpg-error-1.36-gawk5_namespace_reserved_word.patch,463 bytes, patch)
2019-04-16 08:35 UTC, Jarek Rymut
Details | Diff
upstream patch with additional Makefile.in fix (0001-Fully-support-gawk-5.patch,4.20 KB, patch)
2019-04-21 22:34 UTC, Jory A. Pratt
Details | Diff
Version bump along with upstream patch directly. (0001-dev-libs-libgpg-error-Version-bump-fix-gawk5-support.patch,9.09 KB, patch)
2019-04-21 23:16 UTC, Jory A. Pratt
Details | Diff
version bump with gawk-5 upstream path version 2 (0001-dev-libs-libgpg-error-version-bump-along-with-gawk-5.patch,8.50 KB, patch)
2019-04-22 21:53 UTC, Jory A. Pratt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2019-04-13 16:42:33 UTC
>>> Compiling source in /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32 ...
 * abi_x86_64.amd64: running multilib-minimal_abi_src_compile
make -j8
make  all-recursive
make[1]: Entering directory '/var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32-abi_x86_64.amd64'
Making all in m4
make[2]: Entering directory '/var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32-abi_x86_64.amd64/m4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32-abi_x86_64.amd64/m4'
Making all in src
make[2]: Entering directory '/var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32-abi_x86_64.amd64/src'
gawk -f /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkerrnos.awk /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/errnos.in >code-to-errno.h
gawk -f /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkerrcodes1.awk /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/errnos.in >_mkerrcodes.h
gawk -f /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkstrtable.awk -v textidx=2 -v nogettext=1 \
        /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/err-sources.h.in >err-sources-sym.h
gawk -f /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkstrtable.awk -v textidx=2 -v nogettext=1 \
        /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/err-codes.h.in >err-codes-sym.h
gawk -f /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkstrtable.awk -v textidx=2 -v nogettext=1 \
        -v prefix=GPG_ERR_ -v namespace=errnos_ \
        /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/errnos.in >errnos-sym.h
x86_64-pc-linux-gnu-gcc -g -O0 -I. -I/var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src -o mkheader /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkheader.c
gawk: /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkerrnos.awk:86: warning: regexp escape sequence `\#' is not a known regexp operator
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src -I..     -O2 -pipe -flto -fuse-linker-plugin -Wall -Wpointer-arith -Wno-psabi -fvisibility=hidden -c -o gen-posix-lock-obj.o /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/gen-posix-lock-obj.c
cp gpg-error-config gpgrt-config
gawk: /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkstrtable.awk:113: warning: regexp escape sequence `\#' is not a known regexp operator
cat /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/gpg-error.def.in >_gpg-error.def.h
gawk: /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkerrcodes1.awk:84: warning: regexp escape sequence `\#' is not a known regexp operator
gawk: /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkstrtable.awk:113: warning: regexp escape sequence `\#' is not a known regexp operator
echo "/*dummy*/" > mkw32errmap.map.c
gawk: fatal: cannot use gawk builtin `namespace' as variable name
x86_64-pc-linux-gnu-gcc -E   -P _mkerrcodes.h | grep GPG_ERR_ | \
               gawk -f /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkerrcodes.awk >mkerrcodes.h
make[2]: *** [Makefile:1451: errnos-sym.h] Error 2
make[2]: *** Waiting for unfinished jobs....
x86_64-pc-linux-gnu-gcc -E -I. -I/var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src -I..   _gpg-error.def.h | \
  grep -v '^#' >gpg-error.def
gawk: /var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32/src/mkerrcodes.awk:88: warning: regexp escape sequence `\#' is not a known regexp operator
rm _mkerrcodes.h
rm _gpg-error.def.h
make[2]: Leaving directory '/var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32-abi_x86_64.amd64/src'
make[1]: *** [Makefile:499: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-libs/libgpg-error-1.32-r1/work/libgpg-error-1.32-abi_x86_64.amd64'
make: *** [Makefile:430: all] Error 2
 * ERROR: dev-libs/libgpg-error-1.32-r1::gentoo failed (compile phase):
 *   emake failed

Portage 2.3.62 (python 2.7.16-final-0, default/linux/amd64/17.0, gcc-8.3.0, glibc-2.29-r2, 5.0.4-gentoo x86_64)
=================================================================
System uname: Linux-5.0.4-gentoo-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    16438060 total,   7043412 free
KiB Swap:          0 total,         0 free
sh bash 5.0_p3-r1
ld GNU ld (Gentoo 2.32 p1) 2.32.0
app-shells/bash:          5.0_p3-r1::gentoo
dev-lang/perl:            5.28.0-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.5.7::gentoo, 3.6.8::gentoo, 3.7.3::gentoo
dev-util/cmake:           3.14.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 24

adjust
    location: /overlay/gentoo-overlay
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -flto -fuse-linker-plugin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -flto -fuse-linker-plugin"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-O2 -flto"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp sqlite ssl tcpd test unicode xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6 python3_7 pypy pypy3" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="dummy fbdev glint intel mach64 nouveau nv r128 radeon savage sis trident v4l vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Lars Wendler (Polynomial-C) gentoo-dev 2019-04-13 18:04:42 UTC
Created attachment 572680 [details, diff]
libgpg-error-1.36-gawk5_namespace_reserved_word.patch

Possible fix. Simply renamed all occurences of "namespace" with "libgpg_error_namespace". The patch requires an additional call from autotools because it changes one Makefile.am file.

FYI, I patched libgpg-error-1.36 which is the latest available release.
Comment 2 Christohper Harrington 2019-04-15 19:05:10 UTC
Downgrading to sys-apps/gawk-4.2.1-r1 and rebuilding dev-libs/libgpg-error-1.32-r1 succeeds.
Comment 3 Jarek Rymut 2019-04-16 08:35:59 UTC
Created attachment 573002 [details, diff]
libgpg-error-1.36-gawk5_namespace_reserved_word.part2.patch

I can build it without problems after droping previous patch together with mine into /etc/portage/patches.

So thanks!
Comment 4 Kristian Fiskerstrand (RETIRED) gentoo-dev 2019-04-16 12:12:07 UTC
Thanks, is there an open upstream bug report on https://dev.gnupg.org for this issue?
Comment 5 Lars Wendler (Polynomial-C) gentoo-dev 2019-04-16 12:36:47 UTC
Yes, there is (see "See Also")
Comment 6 Kristian Fiskerstrand (RETIRED) gentoo-dev 2019-04-21 15:00:23 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #5)
> Yes, there is (see "See Also")

Thanks, I see it is also accepted upstream, so feel free to patch it
Comment 7 Lars Wendler (Polynomial-C) gentoo-dev 2019-04-21 15:07:19 UTC
(In reply to Kristian Fiskerstrand from comment #6)
> (In reply to Lars Wendler (Polynomial-C) from comment #5)
> > Yes, there is (see "See Also")
> 
> Thanks, I see it is also accepted upstream, so feel free to patch it

Eh, the upstream fix differs from my patch. According to dilfridge the upstream patch does still have some issues (breaks gawk-4 and/or doesn't apply cleanly to the libgpg-error versions in our tree). He seems to like mine better :)
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2019-04-21 17:00:42 UTC
(In reply to Kristian Fiskerstrand from comment #6)
> (In reply to Lars Wendler (Polynomial-C) from comment #5)
> > Yes, there is (see "See Also")
> 
> Thanks, I see it is also accepted upstream, so feel free to patch it

Upstream's stuff doesnt build, neither with gawk 4 nor gawk 5. 
Ours does. 

https://gitweb.gentoo.org/proj/riscv.git/tree/dev-libs/libgpg-error
Comment 9 Kristian Fiskerstrand (RETIRED) gentoo-dev 2019-04-21 19:50:50 UTC
(In reply to Andreas K. Hüttel from comment #8)
> (In reply to Kristian Fiskerstrand from comment #6)
> > (In reply to Lars Wendler (Polynomial-C) from comment #5)
> > > Yes, there is (see "See Also")
> > 
> > Thanks, I see it is also accepted upstream, so feel free to patch it
> 
> Upstream's stuff doesnt build, neither with gawk 4 nor gawk 5. 
> Ours does. 
> 
> https://gitweb.gentoo.org/proj/riscv.git/tree/dev-libs/libgpg-error

The real place for discussing that is really in the upstream bug, once it is upstreamed it can be included in our downstream.
Comment 10 Andreas K. Hüttel archtester gentoo-dev 2019-04-21 20:00:10 UTC
(In reply to Kristian Fiskerstrand from comment #9)
> (In reply to Andreas K. Hüttel from comment #8)
> > (In reply to Kristian Fiskerstrand from comment #6)
> > > (In reply to Lars Wendler (Polynomial-C) from comment #5)
> > > > Yes, there is (see "See Also")
> > > 
> > > Thanks, I see it is also accepted upstream, so feel free to patch it
> > 
> > Upstream's stuff doesnt build, neither with gawk 4 nor gawk 5. 
> > Ours does. 
> > 
> > https://gitweb.gentoo.org/proj/riscv.git/tree/dev-libs/libgpg-error
> 
> The real place for discussing that is really in the upstream bug, once it is
> upstreamed it can be included in our downstream.

That's actually the job of the maintaining team, which should get moving.
Since for weeks already this is the only package in ~arch which fails to build.
Comment 11 Lars Wendler (Polynomial-C) gentoo-dev 2019-04-21 20:02:24 UTC
And you wanna leave dev-libs/libgpg-error being broken in ~arch until upstream finally fixes this? Why not adding some intermediate fix at least?
Comment 12 Jory A. Pratt gentoo-dev 2019-04-21 22:34:30 UTC
Created attachment 573756 [details, diff]
upstream patch with additional Makefile.in fix

Please test and apply, I have successfully used on both musl and glibc
Comment 13 Jory A. Pratt gentoo-dev 2019-04-21 23:16:21 UTC
Created attachment 573760 [details, diff]
Version bump along with upstream patch directly.

This is the version bump along with the upstream patch. We simply call eautomake to force the regeneration of src/Makefile.in which will fix the namespace not being updated by upstream patch.
Comment 14 Alexandru N. Barloiu 2019-04-22 18:18:19 UTC
The patches work. Thank you.
Comment 15 Tomáš Mózes 2019-04-22 21:01:47 UTC
According to https://dev.gnupg.org/T4459:
Added a fix to GnuPG, too (master and stable 2.2).
Comment 16 Jory A. Pratt gentoo-dev 2019-04-22 21:40:30 UTC
(In reply to Tomáš Mózes from comment #15)
> According to https://dev.gnupg.org/T4459:
> Added a fix to GnuPG, too (master and stable 2.2).

The gnupg fix is same fix and only added for those who do not use libgpg-error as a standalone. The gnupg tree is fine in gentoo with gawk5 as we use libgpg-error and do not worry about what is bundled.
Comment 17 Jory A. Pratt gentoo-dev 2019-04-22 21:53:38 UTC
Created attachment 573842 [details, diff]
version bump with gawk-5 upstream path version 2

This is based on actually gentoo tree instead of my overlay. It removes the libtoolize call and makes it eautoreconf as ~arch users are gonna be on automake-1.16 which will force a full rebuilt of autotools anyway.
Comment 18 Jory A. Pratt gentoo-dev 2019-04-22 22:07:47 UTC
K_F granted permission for me to push the update along with the upstream patch. I am leaving bug open for crypto team to really finalize the solution they want and to ensure they remember to swap back to libtoolize next release which will include the upstream patch directly.
Comment 19 Tomáš Mózes 2019-04-22 22:46:26 UTC
Thanks.