icu
icu copied to clipboard
ICU-21554 don't use bash for mingw in pkgdata runCommand
Issue filed: https://unicode-org.atlassian.net/browse/ICU-21554
As discussed in #1666 mingw don't uses bash
For me it fixes the build, but the pipeline seems to be not so happy.
The only error I still get is:
/usr/bin/install: cannot stat 'sicudtd.lib': No such file or directory
-- return status = 1
Error installing library. Failed command: cd ../lib/ && /usr/bin/install -c sicudtd.lib C:/Users/LeanderSchulten/git_projects/Lichtsteuerung.git/vcpkg/packages/icu_x64-mingw-static/C/Users/LeanderSchulten/git_projects/Lichtsteuerung.git/vcpkg/installed/x64-mingw-static/debug/../tools/icu/debug/bin
make[1]: *** [Makefile:185: install-local] Error 1
make: *** [Makefile:153: install-recursive] Error 2
The .lib
file extension is wrong, is must be .a
. But I couldn't find the responsible code. Can someone say why it is .lib
and not .a
CI isn't very happy about it. I wonder if we can get some verbose output from pkgdata.
...
make[0]: Making `install' in `data'
make[1]: Entering directory '/d/a/1/s/icu4c/source/data'
Detected MSYS version: 3
/bin/sh ../mkinstalldirs /tmp/build-icu/lib
PATH=../stubdata:../tools/ctestfw:../lib:$PATH ../bin/pkgdata -O ../data/icupkg.inc -q -c -s D:/a/1/s/icu4c/source/data//out/build/icudt69l -d ../lib -m dll -r 69 -e icudt69 -T ./out/tmp -s ./out/build/icudt69l -p icudt69l -L icudt ./out/tmp/icudata.lst -I /tmp/build-icu/bin
The system cannot find the path specified.
-- return status = 1
Error installing library. Failed command: cd ../lib/ && /usr/bin/install -c icudt69.dll C:/tools/msys64/tmp/build-icu/bin/icudt69.dll
pkgdata: cd ../lib/ && /usr/bin/install -c icudt69.dll C:/tools/msys64/tmp/build-icu/bin/icudt69.dll
make[1]: *** [Makefile:185: install-local] Error 1
make[1]: Leaving directory '/d/a/1/s/icu4c/source/data'
make: *** [Makefile:153: install-recursive] Error 2
A file list would be also interesting. So that you can see which files are where.
But my local and the ci error seems to be the same. Both in line 185 of the makefile while copying the icudt lib. Locally a static and in the ci a dynamic lib.
Error installing library. Failed command: cd ../lib/ && /usr/bin/install -c icudt69.dll C:/tools/msys64/tmp/build-icu/bin/icudt69.dll
Since we're executing the command directly now, /usr/bin/install
doesn't work, and neither do the forward-slash paths. How is this handled with MSVC?
Since we're executing the command directly now,
/usr/bin/install
doesn't work
I think you can simply use install
, that works on my system
and neither do the forward-slash paths.
You can use forward-slash paths on windows, they work
How is this handled with MSVC?
I don't know, I always use mingw
I think you can simply use
install
, that works on my system
If we're going the native route, we might as well use native Windows tools (copy
instead of install
for example). If anyone knows how this is handled in MSVC, I'd love to learn more about it.
Thank you both very much for the discussion and investigation on this!
If we're going the native route, we might as well use native Windows tools (
copy
instead ofinstall
for example). If anyone knows how this is handled in MSVC, I'd love to learn more about it.
For MSVC, do you mean the Visual Studio/MSVC builds for Windows, or do you mean something else perhaps?
If you mean the Visual Studio/MSVC builds, then the output files are copied by a variety of means, but mostly by the MSBuild (*.vcxproj
/*.props
/*.targets
) files.
For example, the public header files are copied with the following target:
<!-- Generate a list of all files that end in .h from the 'unicode' folder, relative to the current project. -->
<OutputFiles Include=".\unicode\**\*.h" />
In the file https://github.com/unicode-org/icu/blob/main/icu4c/source/allinone/Windows.CopyUnicodeHeaderFiles.targets#L17
For the data DLL, for a source archive it gets copied by a native copy
command in the makedata.mak
file here:
copy "$(U_ICUDATA_NAME).dll" "$(DLL_OUTPUT)"
In the file https://github.com/unicode-org/icu/blob/main/icu4c/source/data/makedata.mak#L415
For MSVC, do you mean the Visual Studio/MSVC builds for Windows
Yes that's what I mean, specifically how the data DLL is handled on MSVC.
On MinGW, it's handled with /usr/bin/install
, as shown here
cd ../lib/ && /usr/bin/install -c icudt69.dll C:/tools/msys64/tmp/build-icu/bin/icudt69.dll
I'm wanting to change this into a native copy
, since /usr/bin/install
is unavailable if we don't use bash
.
@autoantwort Can you add me as a collaborator?
@autoantwort Can you add me as a collaborator?
@longnguyen2004 Sorry for my late reply. I have invited you to my fork (I hope you meant that with add me as a collaborator
).
Yep that's what I mean, thanks.
Sorry for the inactivity, I'm waiting for the end of the school term so I can have more time working on this.
Hooray! The files in the branch are the same across the force-push. 😃
~ Your Friendly Jira-GitHub PR Checker Bot
Closing stale PR. Please re-open when this gets active again.