Code Monkey home page Code Monkey logo

Comments (4)

stcarrez avatar stcarrez commented on June 13, 2024

Some notes when trying to spot the issue.... It is not related to Fedora and it occurs on other systems. I've created a blank project that only with aws and at some point I got the following error:

   [mkdir]        object directory for project Valhalla
   [mkdir]        exec directory for project Valhalla
src.gpr:39:37: "../.build/x86_64-pc-linux-gnu/setup/src" is not a valid directory
gprbuild: "/src/vacs/valhalla/valhalla.gpr" processing failed
error: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/src/vacs/valhalla/valhalla.gpr"] exited with code 4
error: Compilation failed.

Looking at the cache/dependencies/aws_23.0.0_6c406859/.build directory, it contained a
x86_64-linux-gnu and another x86_64-pc-linux-gnu directory. The src directory was generated in x86_64-linux-gnu. The makefile.setup was created with the line:

TARGET=x86_64-linux-gnu

but the AWS toml configuration is defined with:

TARGET = "x86_64-pc-linux-gnu"

I think the root issue is that when we run the AWS post-fetch setup command, we don't give the TARGET configuration. It means the configuration is made by using AWS default which is:

TARGET = $(shell gcc -dumpmachine)

When Alire uses its own compiler, you get:

~/.config/alire/cache/dependencies/gnat_native_12.1.2_66b989b5/bin/gcc -dumpmachine
x86_64-pc-linux-gnu

But if you use some system default, you get:

/usr/bin/gcc -dumpmachine
x86_64-linux-gnu

which means that depending on your PATH and which compiler you use and/or is installed on the system by default, we can get different results.

@Fabien-Chouteau , to solve this issue, we could change the post-fetch action to:

command = ["make", "setup", "ZLIB=false", "DEMOS=false",
           "LAL=false", "XMLADA=false", "SOCKET=openssl", "prefix=install_dir",
           "PRJ_BUILD=Release", TARGET="x86_64-pc-linux-gnu"]

which also means there must be specific post-fetch actions for each target.

This explains the failure of Ada Utility Library AWS 2.6.0 crate for Debian and Fedora (it's ok for Arch and Ubuntu latest).

from alire.

stcarrez avatar stcarrez commented on June 13, 2024

@Fabien-Chouteau and @mosteo, I think the root issue comes from the script https://github.com/alire-project/alire-index-checks/blob/stable-1.2.1/scripts/gh-build-crate.sh.

What happens is that the alr dependencies are run first with a default compiler in the PATH (/usr/bin/gcc probably).

Then, we seem to select a different compiler with alr toolchain --select and a different compiler is used: the TARGET is changed but the setup scripts have been executed.

from alire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.