AdaCore / AdaCore/aws

Setup fails due to missing directory x86_64-pc-linux-gnu/setup/src

Open Beginner friendly
#396 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ada
Stars
162
Forks
45
PR merge metrics
No merged PRs in 30d

Description

To setup the build for aws, the make setup command is executed but it fails to copy a file in the <target>/setup/src directory because that directory does not exist. At the end, the <target>/setup/src is in fact the file that was copied.

We end up with the following execution:

make setup ZLIB=false DEMOS=false LAL=false XMLADA=true SOCKET=openssl prefix=install_dir  PRJ_BUILD=Release
make[1]: Entering directory '/src/gnat/aws/config'
Setup
   [mkdir]        exec directory for project Setup
Bind
   [gprbind]      xoscons.bexch
   [Ada]          xoscons.ali
Link
   [link]         xoscons.adb
Setup OS specific definitions
/bin/sh: 1: cd: can't cd to /src/gnat/aws/x86_64-pc-linux-gnu/setup/src
cc1: fatal error: os_lib-tmplt.c: No such file or directory
compilation terminated.
make[1]: Leaving directory '/src/gnat/aws/config'
make[1]: Entering directory '/src/gnat/aws/regtests'
Can not generate system tags. The test are disabled
make[1]: Leaving directory '/src/gnat/aws/regtests'
make[1]: Entering directory '/src/gnat/aws/demos'
make[1]: Leaving directory '/src/gnat/aws/demos'
make[1]: Entering directory '/src/gnat/aws/templates_parser'
make[1]: Leaving directory '/src/gnat/aws/templates_parser'
make[1]: Entering directory '/src/gnat/aws/templates_parser'
make[1]: Leaving directory '/src/gnat/aws/templates_parser'

The root cause is the config/Makefile that uses incorrect definitions. The <target>/setup/src directory is expected to be created by:

$(SDIR)/src:
     $(MKDIR) $(STP_DIR)/src

But SDIR and STP_DIR are not the same variables, hence may not contain the same values.

And later:

$(SDIR)/src/os_lib.ads: $(SDIR)/src $(XOSCONS)$(EXEEXT) force

is wrong for the same reason.

Fixing the config/Makefile to use:

$(STP_DIR)/src:
        $(MKDIR) $(STP_DIR)/src

and

$(SDIR)/src/os_lib.ads: $(STP_DIR)/src $(XOSCONS)$(EXEEXT) force

solved the issue on my side.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in config/Makefile and run the reported make setup command to reproduce the missing /setup/src directory failure. Inspect the rules using SDIR and STP_DIR, then verify that the directory is created and os_lib.ads is generated from the correct prerequisite. Done when the setup step completes without the reported cd or os_lib-tmplt.c errors.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.