its works in local AMD64 but fail in Torizon ARMv8
CMakeList.txt partial code:
find_package(Subversion)
if(Subversion_FOUND)
Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} SVN)
set(SVN_REVISION ${SVN_WC_REVISION})
else()
set(SVN_REVISION “unknown”)
endif()
set(APP_VERSION “1.0.${SVN_REVISION}”)
target_compile_definitions(LoggerEvolution PRIVATE APP_VERSION=“${APP_VERSION}”)
Cpp partial code:
QApplication::setApplicationVersion(APP_VERSION);
result in Local AMD64: “1.0.SVN revision number”
result in Torizon ARMv8:
Command “/usr/bin/svn info /home/torizon/app” failed with output:
svn: E155007: ‘/home/torizon/app’ is not a working copy
Call Stack (most recent call first):
CMakeLists.txt:16 (Subversion_WC_INFO)
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
The issue you’re experiencing seems to be related to the Subversion_WC_INFO
function not working as expected on the Torizon ARMv8 platform. This could be due to several reasons:
-
Subversion Package Availability: Ensure that the Subversion package is installed and available on the Torizon ARMv8 environment. The find_package(Subversion)
command relies on the presence of Subversion tools to gather the working copy information.
-
Environment Differences: There might be differences in the environment setup between your local AMD64 and the Torizon ARMv8 platform. Check if the necessary environment variables and paths are correctly set on the ARMv8 platform.
-
CMake Version: Ensure that the version of CMake used on the Torizon ARMv8 platform supports the Subversion_WC_INFO
function. There might be differences in CMake versions that could affect the availability or behavior of certain functions.
-
Permissions and Access: Verify that the Torizon ARMv8 environment has the necessary permissions to access the Subversion repository and retrieve the working copy information.
-
Debugging Output: Add additional debugging output to your CMake script to verify whether Subversion_FOUND
is true and what values are being set for SVN_REVISION
.
If these suggestions do not resolve the issue, you may need to further investigate the specific environment setup on the Torizon ARMv8 platform or consider alternative methods to retrieve the Subversion revision number.
Greetings @Oliverio,
I’m not too experienced with SVN myself, so apologies for any ignorance on my side.
When you run the project locally it just uses the local file structure on your machine where VSCode is running. However, when the target is a Torizon device (i.e. ARMv8/ARMv7), your application is instead built and executed in a container filesystem.
Our extension does the work of copying the needed files into the container to compile your application. It might be possible some files/information needed for SVN to work weren’t copied into the container environment.
At least that is my best assumption for what might have happened here.
Best Regards,
Jeremias