Building ACK with MSYS2 #363
Replies: 10 comments 4 replies
-
|
Just to add, I looked in ack > plat >pc86 > emu > build.py and found that line 1 in that file has: from build.c import hostclibrary, hostcprogram This is strange as the error is reported from /bin/sh, rather than Python. Also at the top of build.py, would a "Sh-bang" be expected to refer to Python? loading plat/pc86/emu/build.py Aty this point I'm just guessing... |
Beta Was this translation helpful? Give feedback.
-
|
I see this in the command line: The Also, Windows doesn't like the sandbox script I'm using. The known good command line invocation (from the I forget why the The ACK, by the way, is now much easier to build than it was in the 5.5 days, believe it or not... |
Beta Was this translation helpful? Give feedback.
-
|
Just to add, when I look at the files at the top of the build directory, I see the following. Again, I'm just guessing... $ ls |
Beta Was this translation helpful? Give feedback.
-
|
Could you try the version at #364 and let me know if that helps any? It looks like you'll need to completely wipe your working tree, as it's likely files are corrupted. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, I'll take a look.
Krista
…________________________________
From: David Given ***@***.***>
Sent: Thursday, April 23, 2026 5:57 PM
To: davidgiven/ack ***@***.***>
Cc: Hill, Krista ***@***.***>; Author ***@***.***>
Subject: [External-email]: Re: [davidgiven/ack] Building ACK with MSYS2 (Discussion #363)
**Caution: This email was sent from outside the university. Please exercise caution when clicking links, opening attachments, or replying. When in doubt, contact the helpdesk.**
Could you try the version at #364<#364> and let me know if that helps any? It looks like you'll need to completely wipe your working tree, as it's likely files are corrupted.
—
Reply to this email directly, view it on GitHub<#363?email_source=notifications&email_token=AAYSHRWKKVQDGLXYDD2N6KD4XKGV7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRWHEYDSNBWUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVRTG633UMVZF6Y3MNFRWW#discussioncomment-16690946>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAYSHRRHL7QZ7EU4OAVZPNT4XKGV7AVCNFSM6AAAAACYC54QZWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNRZGA4TINQ>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/AAYSHRSP6BGPB7Q3N5VSCPD4XKGV7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRWHEYDSNBWUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVJTG633UMVZF62LPOM> and Android<https://github.com/notifications/mobile/android/AAYSHRQUDFANZVA7432KM2L4XKGV7A5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRWHEYDSNBWUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>. Download it today!
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Wait, I think I know what's going on! I bet you have a Windows-specific ninja installation installed, via chocolatey or something. That's appearing on your path and MSYS is finding it before the MSYS-specific one. The Windows ninja is executing commands via cmd.exe rather than sh, so the Try |
Beta Was this translation helpful? Give feedback.
-
|
What you described seems right to me... if I call gcc from the command interpreter, then the MSYS2 version of gcc replies, so something is going on...
C:\Users\Hill>gcc --version
gcc (Rev14, Built by MSYS2 project) 15.2.0
[Copyright notice snipped]
I next tried MSYS2 with ninja
[PATH] UCRT64 ~
$ ninja --version
1.13.2
[PATH] UCRT64 ~
$ which ninja
/ucrt64/bin/ninja
And I next tried the command interpreter
C:\Users\Hill>ninja
ninja: error: loading 'build.ninja': The system cannot find the file specified.
I'm thinking that something else is invoking ninja. In looking at the PATH in the environment variable editor I found C:\msys64\ucrt64\bin in there, which I removed.
So now I cannot call gcc from the command interpreter.
Just recloned ACK, grabbed pull 364, and tried to build. Again the .py files were loaded and then the FAILED error was encountered and eventually ninja produces the error summary.
Thanks again, so far. I'll look about for anything...
Krista
=====================
[lines removed]
loading plat/linuxppc/libsys/build.py
loading examples/build.py
[1/7129] CHEADERS modules/src/alloc/+alloc_hdr
FAILED: [code=1] .obj/modules/src/alloc/+alloc_hdr/alloc.h
rm -rf .obj/modules/src/alloc/+alloc_hdr/sandbox && python3 build/_sandbox.py --link -s .obj/modules
/src/alloc/+alloc_hdr/sandbox modules/src/alloc/alloc.h && (cd .obj/modules/src/alloc/+alloc_hdr/san
dbox && mkdir -p .obj/modules/src/alloc/+alloc_hdr ) && (cd .obj/modules/src/alloc/+alloc_hdr/sandbo
x && cp modules/src/alloc/alloc.h .obj/modules/src/alloc/+alloc_hdr/alloc.h ) && python3 build/_sand
box.py --export -s .obj/modules/src/alloc/+alloc_hdr/sandbox .obj/modules/src/alloc/+alloc_hdr/alloc
.h
rm: unknown option -- link
Try 'rm --help' for more information.
[lines removed]
ninja: build stopped: subcommand failed.
make: *** [build/ab.mk:126: +all] Error 1
…________________________________
From: David Given ***@***.***>
Sent: Friday, April 24, 2026 6:07 PM
To: davidgiven/ack ***@***.***>
Cc: Hill, Krista ***@***.***>; Author ***@***.***>
Subject: [External-email]: Re: [davidgiven/ack] Building ACK with MSYS2 (Discussion #363)
**Caution: This email was sent from outside the university. Please exercise caution when clicking links, opening attachments, or replying. When in doubt, contact the helpdesk.**
Wait, I think I know what's going on! I bet you have a Windows-specific ninja installation installed, via chocolatey or something. That's appearing on your path and MSYS is finding it before the MSYS-specific one. The Windows ninja is executing commands via cmd.exe rather than sh, so the && shell syntax isn't being parsed and instead the entire command line is going to rm which of course is completely confused about it.
Try which ninja and see what it says.
—
Reply to this email directly, view it on GitHub<#363 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAYSHRVOQWAO4UEK2ZRPFT34XPQRBAVCNFSM6AAAAACYC54QZWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNZQG4ZDCMI>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/AAYSHRTK6OVKD7W23I5EMFT4XPQRBA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRXGA3TEMJRUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVJTG633UMVZF62LPOM> and Android<https://github.com/notifications/mobile/android/AAYSHRTMD2HIMZ334SPNSKL4XPQRBA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRXGA3TEMJRUZZGKYLTN5XKMYLVORUG64VFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>. Download it today!
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Just took a look in ack/.obj/modules/src/alloc/+alloc_hdr and found the dir to be empty, so perhaps rm did delete the first item listed in the error, then choked on what follows. |
Beta Was this translation helpful? Give feedback.
-
|
I found an update on how to prepare for building the ACK under Win MSYS2. I'm using UCRT64. While this note may help others wanting to build the ACK, my result is as I've seen before, in this thread. The gh command requires credentials and didn't help the build, but is from a prior note in this thread 'Best, =========== |
Beta Was this translation helpful? Give feedback.
-
|
just to add, I'm not sure if ninja is included in base-devel, but ninja is needed |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello folks, after following up with the ACK discussions and looking about I'm noting the following:
o With Win, the MSYS tools appears to be suggested
o The ninja build system is also used, which is easy to install using pacman
o In using the MSYS2 UCRT64 environment, soon after many .py files appear to be loaded, an error is encountered:
o I next tried the MSYS2 MINGW64 environment and had a similar result. After the make command, again many .py files appear to be loaded, but this time, much slower. A similar error appeared:
In looking about it appears that rm doesn't support the "--link -s" options
==========================
The following is snipped from the MSYS2 UCRT64 environment
[prior output removed]
loading plat/linuxppc/libsys/build.py
loading examples/build.py
[1/7129] RULE h/+local
FAILED: [code=1] .obj/h/+local/local.h
rm -rf .obj/h/+local/sandbox&&python3 build/_sandbox.py --link -s .obj/h/+local/sandbox&&(cd .obj/h/
+local/sandbox && mkdir -p .obj/h/+local )&&(cd .obj/h/+local/sandbox && echo '#define VERSION 3' >
.obj/h/+local/local.h )&&(cd .obj/h/+local/sandbox && echo '#define ACKM "pc86"' >> .obj/h/+local/lo
cal.h )&&(cd .obj/h/+local/sandbox && echo '#define BIGMACHINE 1' >> .obj/h/+local/local.h )&&(cd .o
bj/h/+local/sandbox && echo '#define SYS_5' >> .obj/h/+local/local.h )&&python3 build/_sandbox.py --
export -s .obj/h/+local/sandbox .obj/h/+local/local.h
rm: unknown option -- link
Try 'rm --help' for more information.
[Much further below there was an an error summary]
ninja: build stopped: subcommand failed.
make: *** [build/ab.mk:126: +all] Error 1
==================
The following is snipped from the MSYS2 MINGW64 environment build
[prior output removed]
loading plat/pc86/emu/build.py
/bin/sh: line 1: pkg-config: command not found
[1/9927] CHEADERS modules/src/data/+data_hdr
FAILED: [code=1] .obj/modules/src/data/+data_hdr/array.h .obj/modules/src/data/+data_hdr/astring.h .ob
j/modules/src/data/+data_hdr/warnings.h .obj/modules/src/data/+data_hdr/imap.h .obj/modules/src/data/+
data_hdr/pmap.h .obj/modules/src/data/+data_hdr/smap.h .obj/modules/src/data/+data_hdr/stringlist.h
rm -rf .obj/modules/src/data/+data_hdr/sandbox&&python3 build/_sandbox.py --link -s .obj/modules/src/d
ata/+data_hdr/sandbox modules/src/data/imap.h modules/src/data/smap.h modules/src/data/astring.h modul
es/src/data/array.h modules/src/data/stringlist.h modules/src/data/warnings.h modules/src/data/pmap.h&
&(cd .obj/modules/src/data/+data_hdr/sandbox && mkdir -p .obj/modules/src/data/+data_hdr/. )&&(cd .obj
/modules/src/data/+data_hdr/sandbox && cp modules/src/data/array.h .obj/modules/src/data/+data_hdr/./a
rray.h )&&(cd .obj/modules/src/data/+data_hdr/sandbox && cp modules/src/data/astring.h .obj/modules/sr
c/data/+data_hdr/./astring.h )&&(cd .obj/modules/src/data/+data_hdr/sandbox && cp modules/src/data/war
nings.h .obj/modules/src/data/+data_hdr/./warnings.h )&&(cd .obj/modules/src/data/+data_hdr/sandbox &&
cp modules/src/data/imap.h .obj/modules/src/data/+data_hdr/./imap.h )&&(cd .obj/modules/src/data/+dat
a_hdr/sandbox && cp modules/src/data/pmap.h .obj/modules/src/data/+data_hdr/./pmap.h )&&(cd .obj/modul
es/src/data/+data_hdr/sandbox && cp modules/src/data/smap.h .obj/modules/src/data/+data_hdr/./smap.h )
&&(cd .obj/modules/src/data/+data_hdr/sandbox && cp modules/src/data/stringlist.h .obj/modules/src/dat
a/+data_hdr/./stringlist.h )&&python3 build/_sandbox.py --export -s .obj/modules/src/data/+data_hdr/sa
ndbox .obj/modules/src/data/+data_hdr/./array.h .obj/modules/src/data/+data_hdr/./astring.h .obj/modul
es/src/data/+data_hdr/./warnings.h .obj/modules/src/data/+data_hdr/./imap.h .obj/modules/src/data/+dat
a_hdr/./pmap.h .obj/modules/src/data/+data_hdr/./smap.h .obj/modules/src/data/+data_hdr/./stringlist.h
rm: unknown option -- link
Try 'rm --help' for more information.
Then much further down, there was an error summary:
ninja: build stopped: subcommand failed.
make: *** [build/ab.mk:126: +all] Error 1
================
Your advice in this matter will be appreciated.
Krista
Beta Was this translation helpful? Give feedback.
All reactions