-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
VERSION file may be picked from root '/' #71384
Labels
Comments
tejlmand
added a commit
to tejlmand/zephyr
that referenced
this issue
Apr 11, 2024
Fixes: zephyrproject-rtos#71384 A VERSION file placed in `/` or `<drive>:\` was accidentally being picked up during `find_package(Zephyr)`. This happened because Zephyr loads the VERSION file to determine if it is the correct Zephyr to use. During initial phase of find_package(), then APPLICATION_SOURCE_DIR is not defined, causing one version file to be picked up from `/VERSION` instead of `<app>/VERSION`. `/VERSION` is outside any Zephyr repo, west workspace, or the application itself and therefore should not be picked up accidentally. Fix this be checking that APPLICATION_SOURCE_DIR is defined, and only when defined, look for a VERSION file there. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
aescolar
pushed a commit
that referenced
this issue
Apr 15, 2024
Fixes: #71384 A VERSION file placed in `/` or `<drive>:\` was accidentally being picked up during `find_package(Zephyr)`. This happened because Zephyr loads the VERSION file to determine if it is the correct Zephyr to use. During initial phase of find_package(), then APPLICATION_SOURCE_DIR is not defined, causing one version file to be picked up from `/VERSION` instead of `<app>/VERSION`. `/VERSION` is outside any Zephyr repo, west workspace, or the application itself and therefore should not be picked up accidentally. Fix this be checking that APPLICATION_SOURCE_DIR is defined, and only when defined, look for a VERSION file there. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
zephyrbot
pushed a commit
that referenced
this issue
Apr 15, 2024
Fixes: #71384 A VERSION file placed in `/` or `<drive>:\` was accidentally being picked up during `find_package(Zephyr)`. This happened because Zephyr loads the VERSION file to determine if it is the correct Zephyr to use. During initial phase of find_package(), then APPLICATION_SOURCE_DIR is not defined, causing one version file to be picked up from `/VERSION` instead of `<app>/VERSION`. `/VERSION` is outside any Zephyr repo, west workspace, or the application itself and therefore should not be picked up accidentally. Fix this be checking that APPLICATION_SOURCE_DIR is defined, and only when defined, look for a VERSION file there. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no> (cherry picked from commit 4959a02)
MaureenHelm
pushed a commit
that referenced
this issue
May 1, 2024
Fixes: #71384 A VERSION file placed in `/` or `<drive>:\` was accidentally being picked up during `find_package(Zephyr)`. This happened because Zephyr loads the VERSION file to determine if it is the correct Zephyr to use. During initial phase of find_package(), then APPLICATION_SOURCE_DIR is not defined, causing one version file to be picked up from `/VERSION` instead of `<app>/VERSION`. `/VERSION` is outside any Zephyr repo, west workspace, or the application itself and therefore should not be picked up accidentally. Fix this be checking that APPLICATION_SOURCE_DIR is defined, and only when defined, look for a VERSION file there. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no> (cherry picked from commit 4959a02)
Lahyllas
pushed a commit
to tsnlab/zephyr
that referenced
this issue
May 16, 2024
Fixes: zephyrproject-rtos#71384 A VERSION file placed in `/` or `<drive>:\` was accidentally being picked up during `find_package(Zephyr)`. This happened because Zephyr loads the VERSION file to determine if it is the correct Zephyr to use. During initial phase of find_package(), then APPLICATION_SOURCE_DIR is not defined, causing one version file to be picked up from `/VERSION` instead of `<app>/VERSION`. `/VERSION` is outside any Zephyr repo, west workspace, or the application itself and therefore should not be picked up accidentally. Fix this be checking that APPLICATION_SOURCE_DIR is defined, and only when defined, look for a VERSION file there. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When a (stray?)
VERSION
file is present at the root of the filesystem, Linux / MacOS/VERSION
, Windows<drive>:\VERSION
, then it may be picked up accidentally by Zephyr.As such a root VERSION file is not intended for Zephyr, then chances are high that it doesn't follow the Zephyr formatting of the VERSION file.
This may result in hard to understand errors like this:
See more details here: https://devzone.nordicsemi.com/f/nordic-q-a/109058/cmake-error-math-cannot-parse-the-expression-with-ncs-2-4-2/478116
The text was updated successfully, but these errors were encountered: