sqlite autoconf amalgamation source fails to build with MSYS2/MinGW64
(1) By anonymous on 2025-02-07 19:38:35 [link] [source]
The current sqlite autoconf archive fails to build on MSYS2/MinGW64. Tried with https://www.sqlite.org/2025/sqlite-autoconf-3490000.tar.gz . After extracting into /c/Windows/Temp/xxxx/xxxxwd.YVYxOE/sqlite-autoconf-3490000 the configure script fails with: Error: couldn't change working directory to "C:/Windows/Temp//xxxxwd.YVYxOE/sqlite-autoconf-3490000": no such file or directory It seems to work after moving/renaming the directory to /c/Windows/Temp/test. But now it tells: xxx@xxx MINGW64 /c/Windows/Temp/test $ ./configure Error: No auto.def found in "C:/Windows/Temp" (use configure --init to create one) Try: 'configure --help' for options $ ./configure --init=make Unknown type, --init=make Use one of the following types (e.g. --init=make) The former version 3.48.0 was okay and built successfully.
(2) By Stephan Beal (stephan) on 2025-02-07 20:22:20 in reply to 1 [source]
Error: couldn't change working directory to "C:/Windows/Temp//xxxxwd.YVYxOE/sqlite-autoconf-3490000": no such file or directory
My msys2 attempt fails with "cannot open directory" when trying to route through /c/windows/temp/... but works as expected when unpacking and building under, e.g., /c/users/stephan/downloads/sqlite-autoconf-3490000. Try running it outside of a system-level directory and it will likely work for you (as it just did for me a moment ago). If it still fails for you under /c/users/you..., but works from your msys2 home dir then build it there.
Richard recently proclaimed that the only Windows builds we are officially putting effort into supporting is native builds with Microsoft's compiler. If you can get it building in msys or cygwin, great, but we are no longer going to chase our proverbial tails trying to account for the various mysterious oddities which crop up in those environments.
That said: i will continue to ensure that the build at least basically works in msys2, and will gladly accept concrete suggestions for platform-specific fixes, but won't expend any significant effort trying to resolve why, e.g., it works under /c/users/... but not /c/windows/temp.
The former version 3.48.0 was okay and built successfully.
The 3.48.0 "autoconf" bundle used a different build system which we no longer use or support. As of 3.49.0, the "autoconf" bundle no longer uses GNU Autoconf but retains its historical "autoconf" name to minimize downstream disruption.
(3) By anonymous on 2025-02-07 20:50:10 in reply to 2 [link] [source]
Building from the home directory works. The configure script is also functional. Thank you for the quick response.
(4) By Stephan Beal (stephan) on 2025-02-07 20:52:34 in reply to 3 [link] [source]
Building from the home directory works.
For my own enlightenment: from the msys home or /c/users/you... ?
(5) By anonymous on 2025-02-08 13:50:19 in reply to 4 [link] [source]
I also found this behavior worth investigating more closely. It works from the MSYS2 root ("/") which is located in D:msys64, from the MSYS2 home ("~"), and also from /c and /c/Users/username/Desktop. I was able to unpack the archive in /c/Windows/Temp, but then I couldn't display the directory. When I opened c:WindowsTemp in Explorer, a dialog informed me that I did not have the required access rights and immediately asked if I wanted to set them permanently. The dialog only appeared in Explorer, not in MSYS2 bash. After that, it worked from there too. My build system uses a subdirectory in c:WindowsTemp for the project and in this a separate temporary working directory for each build (mktemp -d). Why it only didn't work with sqlite, but didn't occur with other builds, is unclear to me. But that's not so important to me at the moment. Thanks.