url: liburl from Boost-1.83 is not built under MSYS2/MinGW-W64
When I try to build Boost I get the following message:
[...]
gcc.link.dll D:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\threadapi-win32\threading-multi\visibility-hidden\libboost_url-mgw13-mt-x32-1_83.dll
common.copy D:\Works\Libraries\boost-1.83.0\lib\libboost_url-mgw13-mt-x32-1_83.dll.a
The system cannot find the file specified.
copy /b "D:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\threadapi-win32\threading-multi\visibility-hidden\libboost_url-mgw13-mt-x32-1_83.dll.a" + this-file-does-not-exist-A698EE7806899E69 "D:\Works\Libraries\boost-1.83.0\lib\libboost_url-mgw13-mt-x32-1_83.dll.a"
...failed common.copy D:\Works\Libraries\boost-1.83.0\lib\libboost_url-mgw13-mt-x32-1_83.dll.a...
boost-install.generate-cmake-variant- D:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\threadapi-win32\threading-multi\visibility-hidden\libboost_url-variant-mgw13-mt-x32-1_83-shared.cmake
common.copy D:\Works\Libraries\boost-1.83.0\lib\cmake\boost_url-1.83.0\libboost_url-variant-mgw13-mt-x32-1_83-shared.cmake
D:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\threadapi-win32\threading-multi\visibility-hidden\libboost_url-variant-mgw13-mt-x32-1_83-shared.cmake
1 file(s) copied.
common.copy D:\Works\Libraries\boost-1.83.0\lib\libboost_url-mgw13-mt-x32-1_83.dll
The system cannot find the file specified.
copy /b "D:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\threadapi-win32\threading-multi\visibility-hidden\libboost_url-mgw13-mt-x32-1_83.dll" + this-file-does-not-exist-A698EE7806899E69 "D:\Works\Libraries\boost-1.83.0\lib\libboost_url-mgw13-mt-x32-1_83.dll"
...failed common.copy D:\Works\Libraries\boost-1.83.0\lib\libboost_url-mgw13-mt-x32-1_83.dll...
[...]
At the same time in the root source directory (where b2 is) files Worksboost_1_83_0builddirboostbin.v2libsurlbuildgcc-13releasethreadapi-win32threading-multivisibility-hiddenlibboost_url-mgw13-mt-x32-1_83.dll.a and Worksboost_1_83_0builddirboostbin.v2libsurlbuildgcc-13releasethreadapi-win32threading-multivisibility-hiddenlibboost_url-mgw13-mt-x32-1_83.dll are created.
It seems to be a forward slash/backslash issue – as far as I can see liburl is the only library which uses response files (.rsp) and generated response files use both types of slashes, while, I think, they should use only forward slashes.
Static version has similar problem:
[...]
gcc.archive D:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\link-static\threadapi-win32\threading-multi\visibility-hidden\libboost_url-mgw13-mt-x32-1_83.a
C:/Tools/MSYS/mingw32/i686-w64-mingw32/bin/ar.exe: D:Worksboost_1_83_0builddirboostbin.v2libsurlbuildgcc-13releaselink-staticthreadapi-win32threading-multivisibility-hiddenauthority_view.o: No such file or directory
"C:/Tools/MSYS/mingw32/i686-w64-mingw32/bin/ar.exe" rsc "D:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\link-static\threadapi-win32\threading-multi\visibility-hidden\libboost_url-mgw13-mt-x32-1_83.a" @"D:/Works/boost_1_83_0/builddir/boost/bin.v2/libs/url/build/gcc-13/release/link-static/threadapi-win32/threading-multi/visibility-hidden/libboost_url-mgw13-mt-x32-1_83.a.rsp"
...failed gcc.archive D:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\link-static\threadapi-win32\threading-multi\visibility-hidden\libboost_url-mgw13-mt-x32-1_83.a...
...removing D:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\link-static\threadapi-win32\threading-multi\visibility-hidden\libboost_url-mgw13-mt-x32-1_83.a
...skipped <pD:\Works\Libraries\boost-1.83.0\lib>libboost_url-mgw13-mt-x32-1_83.a for lack of <pD:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\link-static\threadapi-win32\threading-multi\visibility-hidden>libboost_url-mgw13-mt-x32-1_83.a...
...skipped <pD:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\link-static\threadapi-win32\threading-multi\visibility-hidden>libboost_url-variant-mgw13-mt-x32-1_83-static.cmake for lack of <pD:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\link-static\threadapi-win32\threading-multi\visibility-hidden>libboost_url-mgw13-mt-x32-1_83.a...
...skipped <pD:\Works\Libraries\boost-1.83.0\lib\cmake\boost_url-1.83.0>libboost_url-variant-mgw13-mt-x32-1_83-static.cmake for lack of <pD:\Works\boost_1_83_0\builddir\boost\bin.v2\libs\url\build\gcc-13\release\link-static\threadapi-win32\threading-multi\visibility-hidden>libboost_url-variant-mgw13-mt-x32-1_83-static.cmake...
[...]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 20 (11 by maintainers)
Commits related to this issue
- Fix back-slash in archive action. Unlike all the other actions in gcc, the archive action was producing platform paths instead of regular slash paths. The platform paths on Windows (\) cause problems... — committed to bfgroup/b2 by grafikrobot 3 years ago
- Patch for Boost.Build in Boost 1.83.0 (https://github.com/boostorg/url/issues/779 and https://github.com/bfgroup/b2/commit/2474be56b42e191bbc0706d46177703b24a7e7c3). — committed to mabrarov/build-scripts by mabrarov 2 years ago
Fixed with https://github.com/bfgroup/b2/commit/2474be56b42e191bbc0706d46177703b24a7e7c3
Reported upstream as https://github.com/bfgroup/b2/issues/352.
The problem is with this line:
https://github.com/bfgroup/b2/blob/5dca2965cb083060137498d6581fcbfb9522cfbc/src/tools/gcc.jam#L1094
The final
:E="$(>)"needs to be changed to:E="$(>:T)".This fixes the static version. I don’t get an error while building the dynamic version, and the
:Tseems properly present there already, so I’m not sure why the above doesn’t work.This sounds like a b2 issue for me. However, looking at gcc.jam, it doesn’t seem to be true that URL is the only library using response files. E.g. in
https://github.com/bfgroup/b2/blob/5dca2965cb083060137498d6581fcbfb9522cfbc/src/tools/gcc.jam#L1094
response files are used unconditionally.
So this same issue should occur with any compiled Boost library, and it’s odd if it indeed affects only URL.
I was using powershell, not a bash shell. However, I was using it as a conan package.
Under Windows, you should build
b2usingbootstrap.batinstead ofbootstrap.shfrom abashshell, in order for it to know that it’s running under Windows so that it can interpret\as a directory separator.I tried cmake and it works. And yesterday I tried to execute the error command manually and replace the backslashes to slash in the rsp file, b2 can compile successfully.