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

[Bug?]: Toolchain Prefix/Suffix Support #95

Closed
4 of 13 tasks
424778940z opened this issue Dec 31, 2023 · 4 comments
Closed
4 of 13 tasks

[Bug?]: Toolchain Prefix/Suffix Support #95

424778940z opened this issue Dec 31, 2023 · 4 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@424778940z
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Unusable feature

It cannot build the solution as it's using the wrong compiler, and there seems no way to change it

Current Behavior

I have multiple GCC toolchains in PATH, currently there seems no way to chose between them, it always grub the gcc instaead of arm-none-eabi-gcc

Expected Behavior

look at the cmake ext, give an option to chose what kit the user wants. or at least give a way to override in config files

Steps To Reproduce

No response

Affected tools

  • cbuild
  • cbuild-gen
  • cpackget
  • csolution
  • packchk
  • svdconv

Affected operating systems

  • Windows amd64
  • Windows arm64
  • Linux amd64
  • Linux arm64
  • MacOS amd64
  • MacOS arm64

Environment

No response

@424778940z 424778940z added bug Something isn't working critical Sever bug that blocks certain use-cases labels Dec 31, 2023
@jkrech jkrech self-assigned this Jan 2, 2024
@jkrech
Copy link
Member

jkrech commented Jan 2, 2024

CMake is offering the fallback option to pick a gcc compiler from your path. This is not recommended.
Instead please follow the instructions for Toolchain Registration

@jkrech jkrech removed the critical Sever bug that blocks certain use-cases label Jan 2, 2024
@jkrech jkrech changed the title [Blocker]: Toolchain Prefix/Sunfix Support [Bug?]: Toolchain Prefix/Suffix Support Jan 9, 2024
@jkrech jkrech added the question Further information is requested label Jan 9, 2024
@jkrech
Copy link
Member

jkrech commented Jan 9, 2024

Please reopen the issue in case registering the GCC compiler using an environment variable GCC_TOOLCHAIN_<major>_<minor>_<patch> containing the absolute path to the bin directory of the GCC compiler installation does not solve the above problem.

@purdurnr
Copy link

The same situation occurred with my laptop setup.
Having several GCC compilers, the cbuild selected incorrect version. Correcting path/environment variables resolved problem.
However, I would like to propose that a version of compiler be added to the cSolution spec.
The current spec allows user to specify/lock versions of Software Packs.
I believe it may be beneficial if user could specify/lock version of compiler that has been tested.
This will prevent a user from running with "C-Compiler" without knowing what version was used in the tested case.
This also avoids issues with Environment Variables being configured through different setup processes (NXP, ARM, IAR...)
Currently the cBuild outputs a "Warning". Possibly update the Warning to list the suggested version from cSolution.

@jkrech jkrech closed this as completed Jan 16, 2024
@jkrech
Copy link
Member

jkrech commented Jan 16, 2024

#1276 is intended to ensure environment variables are configured for the toolchains being used and therefore cbuild becomes independent from the user's $PATH / %PATH%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants