CMake hunter error: `Unexpected MSVC_VERSION` - cmake

First of all, thank you for taking your time to help!
System: Windows 10 x64
cmake version: 3.24.1
Visual Studio 2022 v17.3.3
Console with admin privileges: Developer Command Prompt for VS 2022
Perl (Strawberry Perl): perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread
I am trying to compile kawpowminer from https://github.com/RavenCommunity/kawpowminer.
I already found some other solutions to similar errors but they haven't helped me.
Looked into those files (every single one printed out in the error) and found the lines with "hunter_add_package" as the cause of those errors.
I also changed 2019 to 2022 and 15 to 17 in those config files and edited the paths if needed.
I cloned at C:\Users\MEuser\kp the described git-project from "https://github.com/RavenCommunity/kawpowminer".
This is my script, the last line is causing the error. No errors are printed out before.
mkdir kp
cd kp
git clone https://github.com/RavenCommunity/kawpowminer
cd kawpowminer
git submodule update --init --recursive
cd build
cmake -G "Visual Studio 16 2019" -A X64 -H. -Bbuild -DETHASHCL=ON -DETHASHCUDA=ON -DAPICORE=ON ..
cd build
cmake --build . --config Release
Console: Developer Command Prompt for VS 2022
CMake Warning: Ignoring extra path from command line:
"C:/Users/Meuser/k2/kawpowminer/build"
-- [cable ] Cable 0.2.14 initialized
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- [cable ] Configurations: Release;RelWithDebInfo
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: C:/.hunter
-- [hunter] [ Hunter-ID: e14bc15 | Toolchain-ID: b0b5bc7 | Config-ID: 196746b ]
[hunter ** INTERNAL **] Unexpected MSVC_VERSION: '1933' [hunter **
INTERNAL **] [Directory:C:/Users/MEuser/k2/kawpowminer]
--lol------------------------- ERROR ------------------------lol--
https://docs.hunter.sh/en/latest/reference/errors/error.internal.html
------------------------------------------------------------------
CMake Error at
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_error_page.cmake:12
(message): Call Stack (most recent call first):
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_internal_error.cmake:13 (hunter_error_page)
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_setup_msvc.cmake:73
(hunter_internal_error)
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_finalize.cmake:117
(hunter_setup_msvc)
C:/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_add_package.cmake:23
(hunter_finalize) CMakeLists.txt:56 (hunter_add_package)
-- Configuring incomplete, errors occurred!
I did found similar errors in the internet and on stack but nothing really helped me.
I also searched through the files and the config (CMakeLists.txt) and researched some lines, but I really didnt found anything interesting, similar or working.
(it's 5am in my country, please don't assume I didn't researched a lot or anything, I am just lost)
I also tried different includes for the HunterGate like
include("cmake/HunterGate.make")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.23.33.tar.gz"
SHA1 "abcf4b9b77b5a0160abc1da1cdda35f64b14196a"
)
But at this point I have to admit, I don't know what I am actually doing...

Investigating your error message,
[hunter ** INTERNAL **] Unexpected MSVC_VERSION: '1933' [hunter **
INTERNAL **] [Directory:C:/Users/MEuser/k2/kawpowminer]
I'm pretty sure this is fixed by this hunter PR ("Add support for Visual Studio 17 2022" #484), which added the following to :/cmake/modules/hunter_setup_msvc.cmake:
# ...
string(REGEX MATCH "^193[0-9]$" _vs_17_2022 "${MSVC_VERSION}")
# ...
elseif(_vs_17_2022)
set(HUNTER_MSVC_VERSION "17")
set(HUNTER_MSVC_YEAR "2022")
# ...
The solution is to update your hunter version to get this fix.
I think the Hunter first step docs should be all the information you need. Just change the HunterGate URL to use v0.23.317.
You get a gold star from me for providing so many details in your question (I think you were just missing what hunter version you're using).
If I could add a bit more to my answer, I'd say that reading long error messages to find the important parts and googling key phrases is useful (a skill? / a helpful trick?). If this is truly the cause of your issue, with luck, it's possible to find the answer yourself in less than 5 minutes. I just read your error message, and googled:
hunter "Unexpected MSVC_VERSION"
(the quotes means to look for an exact match)
, which led me to hunter_setup_msvc.cmake in the old hunter repo, and then I just went to the new repo, went to the file, and (by luck) the GitHub banner for most recent commit said "tnixeu add msvc17_2022 to huter_setup_msvc.cmake (#484)".
* Bonus link to wikipedia on MSVC versions.

Related

Missing protobuf configuration when installing via ue4-conan

I'm trying to get gRPC running in Unreal Engine 4, using the conan-ue4cli tool. I use the provided grpc-ue4 recipe linked here: https://github.com/adamrehn/ue4-conan-recipes/tree/master/grpc-ue4
While running ue4 conan build "grpc-ue4" an error is thrown "Could not find a package configuration file provided by "Protobuf""
Output:
...
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found c-ares: C:/Users/Redux Gamer/.conan/data/cares-ue4/1.16.1/adamrehn/4.27/package/7333dc905312a2df09e78e1a60d59e628a5f0321/lib/cmake/c-ares/c-ares-config.cmake (found suitable version "1.16.1", minimum required is "1.13.0")
CMake Error at cmake/protobuf.cmake:58 (find_package):
Could not find a package configuration file provided by "Protobuf" with any
of the following names:
ProtobufConfig.cmake
protobuf-config.cmake
Add the installation prefix of "Protobuf" to CMAKE_PREFIX_PATH or set
"Protobuf_DIR" to a directory containing one of the above files. If
"Protobuf" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:224 (include)
-- Configuring incomplete, errors occurred!
See also "C:/.conan/9d531a/1/CMakeFiles/CMakeOutput.log".
See also "C:/.conan/9d531a/1/CMakeFiles/CMakeError.log".
grpc-ue4/1.30.2#adamrehn/4.27:
grpc-ue4/1.30.2#adamrehn/4.27: ERROR: Package 'bf9f4e336e64d98ce96ba6aaac093ac1ff3705d4' build failed
grpc-ue4/1.30.2#adamrehn/4.27: WARN: Build folder C:\.conan\9d531a\1
ERROR: grpc-ue4/1.30.2#adamrehn/4.27: Error in build() method, line 98
cmake.configure(source_folder="grpc", args=self.cmake_flags())
ConanException: Error 1 while executing cd C:\.conan\9d531a\1 && ...
I'm running Windows 10, UE4.27, python 3.7.8, cmake 3.21.3. I tried searching for the missing protobuf-config.cmake but it also can't be found in the conan or project folder.
Any suggestions or pointers where to look would be greatly appreciated.
The responsible conan-file is here: https://github.com/adamrehn/ue4-conan-recipes/tree/master/grpc-ue4/1.30.2
This got broken with commit 865c38e99f694e63fd109ae06423472ebb7885a3 (see: https://github.com/adamrehn/ue4-conan-recipes/pull/8)
Reverting this change solved it for me.
To manually fix this:
Go to C:\Users\USERNAME.conan\data\grpc-ue4\1.30.2\adamrehn\4.27\export\conanfile.py and in line 51 change:
"-DProtobuf_DIR=" + os.path.join(protobuf.rootpath, "lib/cmake/protobuf"),
to
"-DProtobuf_DIR=" + os.path.join(protobuf.rootpath, "cmake"),
Then you need to run the command with the --no-cache parameter (otherwise the recipe will be replaced again by the original)
ue4 conan build grpc-ue4 --no-cache

Why my git svn with error "dyld: lazy symbol binding failed: Symbol not found: _svn_ra_make_callbacks"

I got this problem when I use git svn to checkout my svn repos.Then I follow some suggestions from website and try to reinstall svn:core by
sudo cpan SVN:Core
but I still got following error when I try to check out a svn repos.
dyld: lazy symbol binding failed: Symbol not found: _svn_ra_make_callbacks
Referenced from: /usr/local/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0/darwin-thread-
multi-2level/auto/SVN/_Ra/_Ra.bundle
Expected in: flat namespace
dyld: Symbol not found: _svn_ra_make_callbacks
Referenced from: /usr/local/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0/darwin-thread-
multi-2level/auto/SVN/_Ra/_Ra.bundle
Expected in: flat namespace
error: git-svn died of signal 6
I check from website that the function is declared in the library header:
libsvn_swig_perl/swigutil_pl.h
But I didn't find error message related this lib (I did see some warning) when I install SVN:Core.
Are there something I need to setup or check for this issue when I install SVN:Core to make my git svn check out work properly?
Thank you~~
Eric
You should not need to manually install Perl package SVN::Core. The Homebrew formula subversion already does that — but, only for Intel hardware currently, as you can see. Volunteering to contribute other hardware support would be warmly welcome.
That formula (script) is what powers brew install subversion. Does this command work for you at all? Can you run svn info? If not, then you should first of all get svn installation working — and only then add git-svn on top. This is because the dependency structure looks like this:
If the bottom-most box is broken for you, then messing with Perl packages is guaranteed to not help.
I check from website that the function is declared in the library header
Please be specific; which website? I don't see any _svn_ra_make_callbacks in the latest upstream source, neither in 1.14.1 tarball.

Recompiling and Problems with cmake

first sry for my gramma or my faults, i'm german but i'll try my best ;)
OK, now straight to the problem:
I'm trying to recompile my source but everytime, i got some faults.
So becouse my knowledge of cmake isn't so far, i hope to find help from you.
The project is about an azerothcore privat wow server and it's first to add thoes modules (CMakeList.txt's below) and to update the core itself.
Everytime, while trying "make -j 4; make install" the latest fail the console shows is
CMake Error at CMakeLists.txt:5 (CU_SET_PATH):
Unknown CMake command "CU_SET_PATH".
-- Configuring incomplete, errors occurred!
See also "/home/wajmanor/azerothcore/build/CMakeFiles/CMakeOutput.log".
Makefile:132: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Thoses helps i found with google everytime want to see the log-file, and that's why i attached it already ;):
CMakeOutput.log
For the Advice (thx to Tsyvarev ), i add the both CMakeList.txt's that could couse the problem:
Mod Nr. 1
cmake_minimum_required(VERSION 3.10)
AC_ADD_SCRIPT("${CMAKE_CURRENT_LIST_DIR}/src/WorldChat.cpp")
AC_ADD_SCRIPT_LOADER("WorldChat" "${CMAKE_CURRENT_LIST_DIR}/src/loader.h")
AC_ADD_CONFIG_FILE("${CMAKE_CURRENT_LIST_DIR}/conf/WorldChat.conf.dist")
Mod Nr. 2
project(GuildHouse)
cmake_minimum_required(VERSION 3.16)
CU_SET_PATH("CMAKE_guildmaster_DIR" "${CMAKE_CURRENT_LIST_DIR}")
AC_ADD_SCRIPT("${CMAKE_CURRENT_LIST_DIR}/src/guildmaster.cpp")
AC_ADD_SCRIPT_LOADER("guildmaster" "${CMAKE_CURRENT_LIST_DIR}/src/loader.h")
Hope someone could help me....

Why am I unable to use glog due to incorrect hash?

Related to my question on ReactNative init setup process being awful, I am unable to download glog due to an incorrect hash. Does anyone know what is going on here? How can I fix this so that I can use react-native properly? I have tried clearing my entire .rncache and it did nothing.
It does look like glog-0.3.5 is the most recent version... so why am I having a nightmare of a time using this? Why is the hash incorrect? Does ReactNative install something with a different hash than it is supposed to?
Incorrect hash:
61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc
?/Users/me/.rncache/glog-0.3.5.tar.gz
Retrying...
Failed to successfully download 'glog-0.3.5.tar.gz'. Debug info:
-rw-r--r-- 1 root staff 532275 Feb 15 18:24 /Users/me/.rncache/glog-0.3.5.tar.gz
61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc
/Users/me/.rncache/glog-0.3.5.tar.gz
Command PhaseScriptExecution failed with a nonzero exit code
My error was located a bit above yours in the console.
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
I fixed this by symlinking to the version I had.
ln -s /usr/local/opt/readline/lib/libreadline.7.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
If the lib does not exists and you are using Mac you can use a custom brash with brew.
https://itnext.io/upgrading-bash-on-macos-7138bd1066ba
Actually #FOLOG's suggestion, while working, was a bit of a ghetto fix. I encountered this issue and went to dig a little further and found the culprit to be gawk.
The clue is here: Referenced from: /usr/local/bin/awk
Assuming you are on Mac, just run brew upgrade gawk to fix the problem.

Not getting TBB to compile test examples

I am not getting TBB to work. I am following the steps in the "Getting started" document.
I am doing the following steps:
downloading the linux files + the sources files.
extracting them in 1 directory
calling make
going to tbb.../bin calling source tbbvars.sh intel64
going to examples/Getting_started/sub_string_finder
calling make
I then get the error:
sub_string_finder.cpp:32:30: fatal error: tbb/parallel_for.h: No such file or directory
I really googled a lot but can't find any related stuff.
I did also try to add some -I statement but it didnt help
I assume it is kind of a including/linking problem but I dont know how to fix.
This is all done on fedora 16 64bit. (kernel 3.1.4) // TBB version 4.0
The solution was to install tbb-devel package.