-
Notifications
You must be signed in to change notification settings - Fork 472
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
Add xrt::version APIs #7696
Add xrt::version APIs #7696
Conversation
Ability to checkout XRT version and build at run-time. Signed-off-by: Soren Soe <[email protected]>
Build failed :( |
In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. Signed-off-by: Soren Soe <[email protected]>
256a8e5
to
99c0f6c
Compare
Signed-off-by: Soren Soe <[email protected]>
Build failed :( |
2 similar comments
Build failed :( |
Build failed :( |
retest this please - seems to build correctly when using build_edge -aarch versal locally |
Build failed :( |
1 similar comment
Build failed :( |
retest this please - debugging issue with Vamshi |
Build failed :( |
I am discovering this |
I admit I didn't track down where this include came from, but xrt_version.cpp does not include (implicitly) anything but I suspect iostream is the culprit, and yes, I don't really fancy |
retest this please. (Including hidden files during checkout) |
Curious. |
Well I don't know, but as I said, the macro mess is isolated to Btw., the error was isolated to edge builds for aarch64, not x64 |
The version.h is generated at CMake time from XRT/src/CMake/config/version.h.in by XRT/src/CMake/version.cmake. version.cmake uses ${GIT_EXECUTABLE} to get meta data specific to version of XRT being built, but none of the data is gathered in CI when running `build_edge.sh -aarch versal -full` and the version.h file is missing Git data which instead ends up as empty string. XRT_BUILD is a define macro based on number of commits acquired from Git, but if this value is empty the use of the macro fails. This PR defaults the value to 0 in hopes it gets overwritten by Git. Signed-off-by: Soren Soe <[email protected]>
Signed-off-by: Soren Soe <[email protected]>
Build failed :( |
Build failed :( |
1 similar comment
Build failed :( |
The feature id (xrt::version::feature()) is defined as the total number of commits to XRT main branch. For branches off of XRT's main branch, the feature number is the total number of commits at the time the branch diverged from XRT's main branch. The feature id is computed as the difference between number of commits on current branch and the number of commits since origin of branch from master. (git rev-list HEAD --count) - (git rev-list HEAD ^origin/master --count) Signed-off-by: Soren Soe <[email protected]>
Build Passed! |
Problem solved by the commit
Ability to check XRT version and build at run-time.