FS#63654 - [gitlab] fails to build from source with gawk 5.x

Attached to Project: Community Packages
Opened by Steven Cook (princeconcord) - Wednesday, 04 September 2019, 14:11 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 05 September 2019, 21:24 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Gitlab 12.2.1 does not compile from source if `Gawk v5.x` is installed. A downgrade of `gawk` to 4.x was needed to compile.


Additional info:
* Gitlab 12.2.x
* No upstream bug has been reported yet to my knowledge. I will be submitting one.
* This also affects the enterprise (EE) version of Gitlab as well.

Below is the log output from running `makepkg`:

```
...
Installing gpgme 2.0.18 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/gpgme-2.0.18/ext/gpgme
/opt/ruby2.5/bin/ruby-2.5 -r ./siteconf20190904-17308-1ljbopr.rb extconf.rb
************************************************************************
IMPORTANT! gpgme gem uses locally built versions of required C libraries,
namely libgpg-error, libassuan, and gpgme.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall gpgme gem as
follows:

gem install gpgme -- --use-system-libraries

************************************************************************
Extracting libgpg-error-1.32.tar.bz2 into
tmp/x86_64-pc-linux-gnu/ports/libgpg-error/1.32... OK
Running 'configure' for libgpg-error 1.32... OK
Running 'compile' for libgpg-error 1.32... ERROR, review
'/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/gpgme-2.0.18/ext/gpgme/tmp/x86_64-pc-linux-gnu/ports/libgpg-error/1.32/compile.log'
to see what happened. Last lines are:
========================================================================
cat ./gpg-error.def.in >_gpg-error.def.h
gawk: ./mkerrcodes1.awk:84: warning: regexp escape sequence `\#' is not a known
regexp operator
gawk: ./mkerrnos.awk:86: warning: regexp escape sequence `\#' is not a known
regexp operator
gawk: fatal: cannot use gawk builtin `namespace' as variable name
gawk: ./mkstrtable.awk:113: warning: regexp escape sequence `\#' is not a known
regexp operator
make[2]: *** [Makefile:1451: errnos-sym.h] Error 2
make[2]: *** Waiting for unfinished jobs....
gawk: ./mkstrtable.awk:113: warning: regexp escape sequence `\#' is not a known
regexp operator
gcc -E -P _mkerrcodes.h | grep GPG_ERR_ | \
gawk -f ./mkerrcodes.awk >mkerrcodes.h
gcc -E -I. -I.. _gpg-error.def.h | \
grep -v '^#' >gpg-error.def
gawk: ./mkerrcodes.awk:88: warning: regexp escape sequence `\#' is not a known
regexp operator
rm _gpg-error.def.h
rm _mkerrcodes.h
mv -f .deps/gen-posix-lock-obj.Tpo .deps/gen-posix-lock-obj.Po
make[2]: Leaving directory
'/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/gpgme-2.0.18/ext/gpgme/tmp/x86_64-pc-linux-gnu/ports/libgpg-error/1.32/libgpg-error-1.32/src'
make[1]: *** [Makefile:499: all-recursive] Error 1
make[1]: Leaving directory
'/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/gpgme-2.0.18/ext/gpgme/tmp/x86_64-pc-linux-gnu/ports/libgpg-error/1.32/libgpg-error-1.32'
make: *** [Makefile:430: all] Error 2
========================================================================
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/ruby2.5/bin/$(RUBY_BASE_NAME)-2.5
--clean
--use-system-libraries
/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:402:in
`block in execute': Failed to complete compile task (RuntimeError)
from
/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:373:in
`chdir'
from
/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:373:in
`execute'
from
/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:115:in
`compile'
from
/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:154:in
`cook'
from extconf.rb:79:in `block in <main>'
from extconf.rb:65:in `tap'
from extconf.rb:65:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in
/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/gems/gpgme-2.0.18
for inspection.
Results logged to
/home/scook/projects/deadhexagon/gitlab/repos/community-x86_64/src/gitlab-ce-v12.2.1-fa2d61ef5212dd44f3d1ae61c1da476b7bfee4f9/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/gpgme-2.0.18/gem_make.out

An error occurred while installing gpgme (2.0.18), and Bundler cannot continue.
Make sure that `gem install gpgme -v '2.0.18' --source 'https://rubygems.org/'`
succeeds before bundling.

In Gemfile:
gpgme
==> ERROR: A failure occurred in build().
Aborting...
```

The specific error message from `gawk` is this:

`gawk: fatal: cannot use gawk builtin `namespace' as variable name`

Steps to reproduce:
- Git clone this repository
- Run `makepkg`
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Thursday, 05 September 2019, 21:24 GMT
Reason for closing:  Fixed
Comment by Steven Cook (princeconcord) - Wednesday, 04 September 2019, 15:08 GMT
Seems I forgot to put an issue title. My apologies.
Comment by loqs (loqs) - Wednesday, 04 September 2019, 16:21 GMT
The bundled libgpg-error used by the ruby gem gpgme 2.018 does not contain
https://github.com/gpg/libgpg-error/commit/7865041c77f4f7005282f10f9b6666b19072fbdf
Edit:
libgpg-error 1.36-1 from core also also FTBS due to the same issue.
Comment by Eli Schwartz (eschwartz) - Thursday, 05 September 2019, 00:51 GMT
  • Field changed: Summary ([gitlab] PLEASE ENTER SUMMARY → [gitlab] fails to build from source with gawk 5.x)
  • Field changed: Status (Unconfirmed → Assigned)
  • Task assigned to Sven-Hendrik Haase (Svenstaro)
I wonder if we could get the gem in question to use the system libgpg-error though... ;)
Comment by loqs (loqs) - Thursday, 05 September 2019, 09:52 GMT
Adding `bundle-2.5 config build.gpgme --use-system-libraries` before bundle-2.5 install package builds successfully.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 05 September 2019, 20:54 GMT
Thanks for the suggested fix, guys.

Loading...