Ticket #39246

Please update MSYS awk; current awk-3.1.7 implementation is too old to remain viable

오픈 날짜: 2019-05-17 07:44 마지막 업데이트: 2021-04-01 18:56

Reporter:
소유자:
Status:
Open [Owner assigned]
Component:
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
1
Vote
Score: 1
100.0% (1/1)
0.0% (0/1)

Details

While developing this Mercurial Queues emulation for Git, which will be required to support git integration for this proposed MinGW package builder tool, I've run into a problem with the MSYS implementation of awk. On my LMDE system, I have awk-4.0.1, and I've written an emulator for "git qselect --series", (which I've yet to publish to the git-mq chamber). This used gawk's "asorti()" function, with a custom sort-comparator function, to present the output in lexically sorted order; it works fine in awk-4.0.1, but fails on MSYS, which offers only awk-3.1.7; (the "asorti()" function appears to be supported, but the custom comparator function reference parameter is rejected).

I've since reworked my "git qselect --series" emulation, using my own "qsort()" function implementation, instead of gawk's "asorti()" function. This makes the entire emulation significantly more portable, but it may still make sense to upgrade the MSYS implementation of awk, such that it will support more modern gawk features.

Ticket History (3/9 Histories)

2019-05-17 07:44 Updated by: keith
  • New Ticket "Please update MSYS awk; current awl-3.1.7 implementation is too old to remain viable" created
2019-05-17 07:44 Updated by: keith
  • Summary Updated
2020-01-04 04:28 Updated by: cstrauss
댓글 올리기

Dear Keith,

I will package GNU awk 4.0.1, which seems to build and run fine on current MSYS, despite some failures in the test suite.

I'm interested in switching to your mingw-pkg tool. Is it already usable? I went as far as creating a recipe, but got stuck on the distribute step.

Regards,

Cesar

2020-01-06 00:23 Updated by: keith
댓글 올리기

Reply To cstrauss

I will package GNU awk 4.0.1, which seems to build and run fine on current MSYS, despite some failures in the test suite.

Thanks, Cesar. Out of interest, could you elaborate further, on the test suite failures?

I'm interested in switching to your mingw-pkg tool. Is it already usable?

I believe so, yes. Certainly, I've been using it successfully for several years now, albeit exclusively with my self-built mingw32 cross-compiler suite, on GNU/Linux hosts; I have not tested it under MSYS. I do have some outstanding local patches, relating to mingw-port, and to cross-tool build support; pushing of these has been delayed, due to a critical regression in hg-git support, which was arrogantly and gratuitously introduced by the Arch Linux hg maintainers.

I went as far as creating a recipe, but got stuck on the distribute step.

You really will need to elaborate further on this, but maybe not here; perhaps use the mailing list, our Slack channel, or open a specific ticket, either within my development chamber, or even as a MinGW ticket, (given that I'd like to migrate the repository into MinGW project space).

2020-01-06 05:53 Updated by: cstrauss
댓글 올리기

I will package GNU awk 4.0.1, which seems to build and run fine on current MSYS, despite some failures in the test suite.

Thanks, Cesar. Out of interest, could you elaborate further, on the test suite failures?

Test log attached.

When building the same source on current Cygwin, all test pass.

I gather you migrated from LMDE to Arch Linux? Cool, I'm an Arch user myself. Mercurial did broke for me after an upgrade, but reinstalling the git extension from AUR solved it.

Since you are giving support for mingw-pkg on the mailing list, I will ask there, thanks.

2020-12-08 07:30 Updated by: wdlkmpx
댓글 올리기
(This comment has been deleted)
댓글 올리기

I recently installed mingw and found an old version of awk. Do you guys accept binaries?

gawk 5.1.0

This works for me, I was able to compile a package that requires a recent awk version https://github.com/mbuilov/gawk-windows/releases/tag/06102020

This is for Windows XP and later https://github.com/mbuilov/gawk-windows/releases/download/06102020/mingworg_gcc_32_rel_c.zip

It's just a matter of packaging that binary and make it available to users.

I works without Msys.

2021-04-01 05:32 Updated by: sizious
댓글 올리기

I agree with this ticket, awk-3.1.7-1 is very outdated and there is some source codes that can't compile anymore when these are managed by Autotools.

Indeed, Michael M. Builov ported gawk 5.1.0 to MinGW. Unfortunately, using a non-MSYS build of GNU Awk will cause issues when used in a MSYS Shell. The root cause is that the msysCORE layer (i.e. "msys-1.0.dll") which translates MSYS paths (e.g. "/home/whatever/myfile.txt") to Windows paths (e.g. "C:\MinGW\msys\1.0\home\whatever\myfile.txt"). When you pass some awk expressions to a non-MSYS build of GNU Awk, the expression itself will be "converted" to a Windows path, which doesn't make any sense, and the result is totally unusable.

That's why I compiled a MSYS version of GNU Awk, using the MSYS toolchain. You may find it here: https://github.com/sizious/msys-gawk

Plus, another interesting project I made is msysCORE Extended: https://github.com/sizious/msys-core-extended In that msysCORE version, It's now possible to disable the POSIX path conversion by setting the MSYS_NO_PATHCONV environment variable. This behaviour was extracted from Git for Windows.

2021-04-01 18:56 Updated by: cstrauss
댓글 올리기

Thanks, sizious. The new patch looks good, very similar to the old.

Nice that you were able to drop the Debian patch. Was it upstreamed, do you know?

As for the MSYS_NO_PATHCONV feature, could you please submit it as a new ticket?

Could be done as a patch, or even as a pull request (just tell me the repository and branch name).

You can clone the repository at:

git://git.code.sf.net/p/mingw/msys-runtime

Thanks.

Attachment File List

  • check.log(9KB)
    • gawk-4.0.1 `make check` output on MSYS

Edit

Please login to add comment to this ticket » Login