Sysprogs forums › Forums › VisualGDB › Cmake error incorect git version
- This topic has 12 replies, 3 voices, and was last updated 5 months, 1 week ago by Nakame.
-
AuthorPosts
-
May 22, 2024 at 08:00 #35640NakameParticipant
Hello !
I am trying to add fuzz testing to my project using google fuzztest framework but when i try to add the cmakelist i get the following error :
CMake Error at C:/Users/User/AppData/Local/VisualGDB/CMake/share/cmake-3.28/Modules/ExternalProject.cmake:2796 (message):
git version 1.6.5 or later required for –recursive flag with ‘git
submodule …’: GIT_VERSION_STRING=”
Call Stack (most recent call first):
C:/Users/User/AppData/Local/VisualGDB/CMake/share/cmake-3.28/Modules/ExternalProject.cmake:2915 (_ep_get_git_submodules_recurse)
C:/Users/User/AppData/Local/VisualGDB/CMake/share/cmake-3.28/Modules/ExternalProject.cmake:4422 (_ep_add_download_command)
CMakeLists.txt:29 (ExternalProject_Add)— Configuring incomplete, errors occurred!
CMake Error at C:/Users/User/AppData/Local/VisualGDB/CMake/share/cmake-3.28/Modules/FetchContent.cmake:1667 (message):
CMake step for abseil-cpp failed: 1
Call Stack (most recent call first):
C:/Users/User/AppData/Local/VisualGDB/CMake/share/cmake-3.28/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
C:/Users/User/AppData/Local/VisualGDB/CMake/share/cmake-3.28/Modules/FetchContent.cmake:1819 (cmake_language)
C:/Users/User/AppData/Local/VisualGDB/CMake/share/cmake-3.28/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
fuzztest/cmake/BuildDependencies.cmake:71 (FetchContent_MakeAvailable)
fuzztest/CMakeLists.txt:37 (include)Adding the lines :
find_package(Git)
message(STATUS “GIT_EXECUTABLE=’${GIT_EXECUTABLE}'”)seem to give me the correct path to the toolchain’s git executable ( ” GIT_EXECUTABLE=’C:/SysGCC/raspberryBuster/arm-linux-gnueabihf/sysroot/usr/bin/git’ ” ) but i still get the error.
Any ideas on how i could fix that ?
Thank you in advance !
May 22, 2024 at 08:35 #35641supportKeymasterHi,
This looks like an issue with CMake and not VisualGDB. Please consider asking in the CMake community instead.
May 22, 2024 at 08:49 #35642bflanneryParticipantIf you want to use git within CMake on windows you need to make sure git is runnable from from your ps/cmd environment.
You will probably find difficult to run the arm-linux-gnueabihf git executable on your windows machine.
If you add git to your PATH and restart visual studio I believe this issue will go away. (also remove the find_git)
Test by running “git version” from your command prompt.
- This reply was modified 5 months, 2 weeks ago by bflannery.
May 23, 2024 at 01:35 #35645NakameParticipantWhile i agree that it is a cmake problem, it is also a visualGDB problem as other cmake projects seem to work fine.
I do have git installed for window and the PATH environment variable is corretly set. Git work in the window cmd terminal without issues, but the visualGDB cmake file stubornly keep looking for git inside the toolchain files. I did not find a way to force it to look for my local git installation .
C:\Users\User>git version
git version 2.45.1.windows.1May 23, 2024 at 08:25 #35648bflanneryParticipantThis post on stack overflow seems to describe a solution to your problem.
https://stackoverflow.com/a/43995834
And if clearing the cache doesn’t work perhaps you can try setting the variable manually.
May 23, 2024 at 12:05 #35650supportKeymaster@bflannery, thanks for the link
@Nakame, If you believe this is a VisualGDB problem, please make sure you can reproduce it on a clean project created from scratch. If it persists, please share complete repro steps that we could follow on our side to reproduce the issue. Please make sure the steps include the screenshots of all screens where you change any settingsĀ (e.g. all wizard pages). You can read more about the scope of VisualGDB support here: https://visualgdb.com/support/scope/May 24, 2024 at 07:08 #35652NakameParticipant@bflannery thank you for the link but i had already tryed that before comming here š How can i force the directory for git myself ?
@support i am almost positive this have something to do with visualGDB as it does work on other cmake project. Here is the screenshots of me creating a new project from scratch and failing
Attachments:
You must be logged in to view attached files.May 24, 2024 at 07:53 #35657supportKeymasterHi,
According to the screenshots, you are referencing a 3rd-party library that is raising the error.
Please try creating a similar project manually outside VisualGDB using the same toolchain referencing the same library.
If it works without errors, please share the screenshots of the manual process (including the screenshots of all files you edited), and we will help you configure VisualGDB to match the manually configured project.
May 24, 2024 at 08:43 #35658bflanneryParticipantMay 27, 2024 at 01:41 #35668NakameParticipantHello !
@bfannery thank you very much ! This is helpful and i learned something š Unfortunatly it doest solve the issue at all. I have the exact same error . From what i can gather the error come from the fact that cmake in visualGDB projects look for git in the toolchain folder and so fail to use it ( since it’s a git for linux and i am working on window ) I could not find a way to force cmake to look inside another forlderĀ for git …
@support I used the method showed by @bfannery to try and fetch a git folder for another cmake project i made using visualGDB and i am having the same error. I am joining here both cmakefiles
Attachments:
You must be logged in to view attached files.May 27, 2024 at 01:43 #35671NakameParticipantho and here is the error i get. You can see that the git executable found is located inside the toolchain folder and not in windows as expected.
Attachments:
You must be logged in to view attached files.May 28, 2024 at 05:28 #35676bflanneryParticipantYou can override the variable by setting it in your CMakeLists.txt file.
Otherwise, you should just be able to modify your CMakeCache.txt to point the variables at the correct git executable.
This is located under {ProjectDir}/build/VisualGDB/{Configuration}/CMakeCache.txt
Not sure why it is finding the wrong git.exe to begin with though. It may have something to do with where you added git.exe in your environment variables. If visual studio wasn’t running under your credentials it may not see a user variable.
May 30, 2024 at 06:21 #35687NakameParticipantThank you very much ! I will try this solution as soon as i have some time to spare.
-
AuthorPosts
- You must be logged in to reply to this topic.