Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS 24.0 fails to build on Windows #1710

Open
2 tasks done
stcarrez opened this issue Jun 30, 2024 · 4 comments
Open
2 tasks done

AWS 24.0 fails to build on Windows #1710

stcarrez opened this issue Jun 30, 2024 · 4 comments
Labels
area: catalog contents Updates to catalog contents type: broken release A release is unusable due to some kind of brokenness

Comments

@stcarrez
Copy link
Contributor

Checklist

  • I've included the output of alr version.
  • I've included complete steps to reproduce my issue.

Describe the bug
aws 24 crate fails to build on Windows:

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:

  1. alr with aws on a fresh install on Windows

Expected 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.0

alr logs

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
stderr: Command ["make", "all", "ENABLE_SHARED=false"] exited with code 2
ERROR: Command ["make", "all", "ENABLE_SHARED=false"] exited with code 2```
stcarrez added a commit to stcarrez/ada-util that referenced this issue Jun 30, 2024
The root cause is aws that fails to build the awsres binary on Windows.
See alire-project/alire#1710
@mosteo mosteo added area: catalog contents Updates to catalog contents type: broken release A release is unusable due to some kind of brokenness labels Jul 1, 2024
@Fabien-Chouteau
Copy link
Member

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.

@stcarrez
Copy link
Contributor Author

@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.

@stcarrez
Copy link
Contributor Author

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
  • It does not work from GitHub Windows build action,
  • It does not work on a fresh installed Windows 11 VM with Alire 2.0.1 (downloaded from ada-lang.io),

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.

@AJ-Ianozi
Copy link
Contributor

AJ-Ianozi commented Aug 24, 2024

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 AdaCore/aws#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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: catalog contents Updates to catalog contents type: broken release A release is unusable due to some kind of brokenness
Projects
None yet
Development

No branches or pull requests

4 participants