Open stcarrez opened 2 months ago
Hello @stcarrez ,
I am able to build aws_24.0.0_2b75fe6d with Alire 2.0.1 on my machine:
alr get aws
cd .\aws_24.0.0_2b75fe6d\
alr build
And also when using AWS as a dependency.
It could be a regression in Alire 2.1.0-dev but I doubt it. It could be a problem with the max filepath length on Windows.
@Fabien-Chouteau, it still fails when building from GitHub action
https://github.com/alire-project/alire-index/actions/runs/10330561591/job/28599751519?pr=1183
make[1]: Entering directory '/c/Users/runneradmin/AppData/Local/alire/cache/builds/aws_24.0.0_2b75fe6d/76ffc400ad3402a54fb70c8123b2c7e3ca05994d4ebde43aa84bc3b5eaa2e888/tools/wsdl2aws-templates'
../../.build/x86_64-w64-mingw32/debug/static/tools/awsres \
-r wsdl2aws_templates \
-o ../../.build/x86_64-w64-mingw32/common/src \
*.tad[sb] *.macros
AWSRes - Resource Creator v1.3
creating s-main.tadb
Cannot create embedded resource file
make[1]: *** [Makefile:20: gen-templates] Error 1
make[1]: Leaving directory '/c/Users/runneradmin/AppData/Local/alire/cache/builds/aws_24.0.0_2b75fe6d/76ffc400ad3402a54fb70c8123b2c7e3ca05994d4ebde43aa84bc3b5eaa2e888/tools/wsdl2aws-templates'
I doubt that the issue comes from the path length (current dir length is 146). It is still the same issue: it fails when running the awsres
tool in the gen-templates
target.
Note: it is not clear why these resources are generated since they are not used by the Ada Utility project.
Hello @stcarrez ,
I am able to build aws_24.0.0_2b75fe6d with Alire 2.0.1 on my machine:
alr get aws cd .\aws_24.0.0_2b75fe6d\ alr build
From what I've seen in the Windows 11 VM build it that only the wsdl2aws_templates.adb
file is created.
Compared to a Linux build, the wsdl2aws_templates.ads
and the wsdl2aws_templates-p_*
are not created.
I was able to run the Makefile target gen-templates
manually but for some reasons it did not generated the files at the target expected location.
Adding into this, doesn't seem to be working in github actions for me either, I installed alire on a windows machine via
- name: Set up alire
uses: alire-project/setup-alire@v3
But it fails with:
Build Libraries
[gprlib] z.lexch
[gprlib] xmlada_unicode.lexch
[gprlib] xmlada_input_sources.lexch
[archive] libxmlada_unicode.a
[archive] libz.a
[index] libz.a
[index] libxmlada_unicode.a
[gprlib] xmlada_sax.lexch
[archive] libxmlada_input_sources.a
[index] libxmlada_input_sources.a
[gprlib] xmlada_dom.lexch
[archive] libxmlada_sax.a
[index] libxmlada_sax.a
[gprlib] xmlada_schema.lexch
[archive] libxmlada_dom.a
[index] libxmlada_dom.a
[gprlib] gpr.lexch
[archive] libxmlada_schema.a
[index] libxmlada_schema.a
[gprlib] gnatcoll.lexch
[archive] libgpr.a
[index] libgpr.a
[gprlib] aws_ssl.lexch
[archive] libgnatcoll.a
[index] libgnatcoll.a
[gprlib] aws.lexch
[archive] libaws_ssl.a
[index] libaws_ssl.a
[archive] libaws.a
[index] libaws.a
Bind
[gprbind] awsres.bexch
[Ada] awsres.ali
Link
[archive] libtools.a
[index] libtools.a
[link] awsres.adb
make[1]: Entering directory '/c/Users/runneradmin/AppData/Local/alire/cache/builds/aws_24.0.0_2b75fe6d/76ffc400ad3402a54fb70c8123b2c7e3ca05994d4ebde43aa84bc3b5eaa2e888/tools/wsdl2aws-templates'
../../.build/x86_64-w64-mingw32/debug/static/tools/awsres \
-r wsdl2aws_templates \
-o ../../.build/x86_64-w64-mingw32/common/src \
*.tad[sb] *.macros
AWSRes - Resource Creator v1.3
creating s-main.tadb
Cannot create embedded resource file
make[1]: *** [Makefile:20: gen-templates] Error 1
make[1]: Leaving directory '/c/Users/runneradmin/AppData/Local/alire/cache/builds/aws_24.0.0_2b75fe6d/76ffc400ad3402a54fb70c8123b2c7e3ca05994d4ebde43aa84bc3b5eaa2e888/tools/wsdl2aws-templates'
make: *** [Makefile:220: gen-templates] Error 2
ERROR: Command ["make", "all", "ENABLE_SHARED=false"] exited with code 2
Error: Process completed with exit code 1.
EDIT: See https://github.com/AdaCore/aws/issues/380
My workaround is adding this to my alire.toml
:
[[depends-on]]
# See https://github.com/AdaCore/aws/issues/380
# and https://github.com/alire-project/alire/issues/1710
[depends-on.'case(os)'.windows]
aws = "^23.0.0"
xmlada = "^23.0.0"
gnatcoll = "^23.0.0"
[depends-on.'case(os)'.'...']
aws = "^24.0.0"
xmlada = "^24.0.0"
gnatcoll = "^24.0.0"
Checklist
alr version
.Describe the bug aws 24 crate fails to build on Windows:
aws
(ex: utilada_aws),The error reported in ada-lang.io forum is the same as the one when you submit a crate and the automated build system tries to validate the submitted crate: it fails when linking the
awsres
binary.To Reproduce Steps to reproduce the behavior:
alr with aws
on a fresh install on WindowsExpected Behavior it builds.
alr
version alr version: 2.1.0-dev libalire version: 2.1.0-dev compilation date: 2024-06-30 09:12:58 compiled with version: 14.1.0alr
logs