Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374143 - dev-db/virtuoso-server fails to build with gawk-4.0.0
Summary: dev-db/virtuoso-server fails to build with gawk-4.0.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Maciej Mrozowski
URL: https://sourceforge.net/tracker/?func...
Whiteboard:
Keywords:
: 374315 375147 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-05 14:15 UTC by Sascha Cunz
Modified: 2011-11-24 01:09 UTC (History)
19 users (show)

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


Attachments
Proposed patch for sql_to_c.awk script (libsrc_wi_sql_to_c.diff,760 bytes, patch)
2011-08-31 00:29 UTC, Patrick van Kleef
Details | Diff
Patch fixing all occurrences of gsub that I could find in awk scripts. (virtuoso-opensource-6.1.3-gawk4-1.patch,2.51 KB, patch)
2011-11-16 13:33 UTC, Nico R.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Cunz 2011-07-05 14:15:27 UTC
virtuoso-server generates C code from SQL files using some awk scripts. These produce bad escape-sequences with gawk-4.0.0 while working correctly with gawk-3.x

Reproducible: Always

Steps to Reproduce:
1. ACCEPT_KEYWORDS=~x86
2. emerge -1 gawk virtuoso-server
3.
Comment 1 Agostino Sarubbo gentoo-dev 2011-07-06 10:30:49 UTC
PLease add also build.log as attachment and emerge --info. So you should specify which version of virtuoso-server otherwise I must close as NEEDINFO. TIA
Comment 2 Maciej Mrozowski gentoo-dev 2011-07-07 22:51:04 UTC
*** Bug 374315 has been marked as a duplicate of this bug. ***
Comment 3 Maciej Mrozowski gentoo-dev 2011-07-07 23:01:23 UTC
I've restricted <sys-apps/gawk-4.0.0 in virtuoso.eclass for now.
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-07-08 11:51:30 UTC
I've opened an upstream bug about this (see URL).
Comment 5 Ian Abbott 2011-07-14 08:38:42 UTC
It's quite easy to change the awk scripts to work with gawk-4.0.0, but then they would no longer work with earlier versions of gawk.  Since virtuoso's dependency on gawk version is set in virtuoso.eclass, this couldn't be changed until gawk-4.0.0 is stable on all the arches that virtuoso-server-6.1.2 and virtuoso-odbc-6.1.2 is stable on.  Once that happens, a patch could be added to VOS-genpatches-6.1.2 and VOS-genpatches-6.1.3 to change the awk scripts for gawk-4.0.0 and the eclass changed to depend on gawk-4.0.0 or above.

gawk-4.0.0 doesn't have a command-line option to make the gsub() function compatible with earlier versions, and earlier versions of gawk wouldn't understand the option anyway.  Also, Virtuoso's awk scripts use GAWK-specific functionality, so they can't be run in gawk's compatibility mode or posix mode.

One option might be to conditionally patch virtuoso depending on the currently installed version of gawk, as it's only a build-time dependency, not a run-time dependency.
Comment 6 Maciej Mrozowski gentoo-dev 2011-07-14 11:59:02 UTC
I've requested virtuoso-6.1.3 stabilization to simplify things a bit, bug 375171
Comment 7 Martin von Gagern 2011-07-29 22:08:27 UTC
(In reply to comment #5)
> Since virtuoso's
> dependency on gawk version is set in virtuoso.eclass, this couldn't be changed
> until gawk-4.0.0 is stable on all the arches that virtuoso-server-6.1.2 and
> virtuoso-odbc-6.1.2 is stable on.  Once that happens, a patch could be added to
> VOS-genpatches-6.1.2 and VOS-genpatches-6.1.3 to change the awk scripts for
> gawk-4.0.0 and the eclass changed to depend on gawk-4.0.0 or above.

Is there a good reason agains moving the dependency from the eclass to the individual ebuilds, and having the gawk script adjustment patch tested on ~ARCH soon, in revbumped ebuilds which depend on gawk-4? Once gawk-4 goes stable, you could either stabilize them or--if you want to avoid unnecessary upgrades for stable users--you could simply rename them to the un-revbumped names, forcing ~ARCH to downgrade but keeping stable ARCH with the same runtime setup.
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2011-08-02 21:37:11 UTC
*** Bug 375147 has been marked as a duplicate of this bug. ***
Comment 9 Patrick van Kleef 2011-08-31 00:29:02 UTC
Created attachment 285109 [details, diff]
Proposed patch for sql_to_c.awk script

I have made a fix which works with both gawk 3.1.5, 3.1.8 and 4.0.0.

This will be part of the upcoming VOS 6.1.4 release.
Comment 10 Ian Abbott 2011-08-31 09:07:21 UTC
(In reply to comment #9)
> Created attachment 285109 [details, diff]
> Proposed patch for sql_to_c.awk script
> 
> I have made a fix which works with both gawk 3.1.5, 3.1.8 and 4.0.0.
> 
> This will be part of the upcoming VOS 6.1.4 release.

I think there are a few other awk scripts that use gsub() that would need a similar fix.
Comment 11 Nico R. 2011-11-16 10:31:23 UTC
Indeed. A quick glance at <URL:http://virtuoso.cvs.sourceforge.net/viewvc/virtuoso/virtuoso-opensource/binsrc/hosting/python/py_to_c.awk?revision=1.1.1.1&view=markup#l51> makes me think that the problem has not been resolved everywhere in the 6.1.4 release.

Hint if you like to patch this: take the sources and run a
$ find -name \*.awk -exec grep -l gsub '{}' +
and maybe (the quite hackish)
$ find -name \*.awk -exec grep -l gsub '{}' + | xargs grep -l PROCINFO

This may not find all awk programs; I don’t know how the code is organized.
Comment 12 Nico R. 2011-11-16 13:33:39 UTC
Created attachment 292757 [details, diff]
Patch fixing all occurrences of gsub that I could find in awk scripts.

With this patch, I can successfully build dev-db/virtuoso-odbc-6.1.3 and dev-db/virtuoso-server-6.1.3-r1 with sys-apps/gawk-4.0.0 installed.

Feel free to take this upstream so that it can be fixed in 6.1.5+.
Comment 13 Ian Abbott 2011-11-16 14:56:15 UTC
(In reply to comment #12)
> Feel free to take this upstream so that it can be fixed in 6.1.5+.

I wonder if Patrick van Kleef (comment #9) will spot this as he doesn't appear to be on the Cc list.

I hope we can get this fix in VOS-genpatches-6.1.2.tar.bz2 and VOS-genpatches-6.1.3.tar.bz2 at least, and remove the '<sys-apps/gawk-4.0.0' dependency in virtuoso.eclass.
Comment 14 Alexey Shvetsov archtester gentoo-dev 2011-11-19 14:47:05 UTC
Hmm... Any news on this?
Comment 15 Alexey Shvetsov archtester gentoo-dev 2011-11-19 23:30:20 UTC
I added updated virtuoso 6.1.4 to kde overlay
Comment 16 Maciej Mrozowski gentoo-dev 2011-11-24 01:09:17 UTC
6.1.4 in tree. Thanks Alexxy, I've replaced your VOS-genpatches-6.1.4 with 6.1.3 renamed (it seems you unnecessarily repacked this tarball).

Retroactively patching 6.1.2 and/or 6.1.3 for gawk4 is futile imho - we'd rather stabilize 6.1.4. I've moved gawk 'blocks' from eclass to respective virtuoso-server versions.

Thanks for the patch Nico (and Patrick, although he unsubscribed). I haven't added it yet since it doesn't fix anything we package, I'll try to upstream it though.