While trying to use Cmake on windows 10, it is not possible as OpenSSL wasn't found in my system even though I have it downloaded and installed.
CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenSSL (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
src/cmake/macros/FindOpenSSL.cmake:184 (find_package_handle_standard_args)
CMakeLists.txt:92 (find_package)
I'm not familiar with Cmake, especially not as well on managing software like this for windows 10 (Because it's not meant for win10) but help would be appreciated!
Expected results: Azeroath core to compile and load normally
Outcome results: Azeroath core didn't compile at all
Make sure your using correct version, it has to be full installer and "NOT" light version. Also check your using x86 or x64 (dont mix DLL).
This is where i get mine for windows https://slproweb.com/products/Win32OpenSSL.html
Related
I am trying to cross-compile the aws-sdk-cpp and I am getting the following error just the very first time I run CMAKE. If I run it a second time it compiles and links and I have tested the application and I can indeed use the aws-sdk-cpp functionality. I have searched and searched for days and tried all kinds of things:
Setting environment variable for OPENSSL_ROOT_DIR
Setting it in a cmake variable, etc.
I print the OPENSSL_ROOT_DIR variable right before the call to
find_package(OpenSSL REQUIRED)
and it prints the right PATH.
I have also set the variable OPENSSL_USE_STATIC_LIBS to TRUE without any difference.
I honestly don't understand what is going on since if I run it a second time it builds and links just fine.
CMake Error at /snap/cmake/1035/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR) (found version "1.1.1n")
Call Stack (most recent call first):
/snap/cmake/1035/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/snap/cmake/1035/share/cmake-3.22/Modules/FindOpenSSL.cmake:574 (find_package_handle_standard_args)
Projects/libraries/aws/s3/crt/aws-crt-cpp/crt/aws-c-cal/CMakeLists.txt:89 (find_package)
Ok so I have figured what was going on.
the issue was that I was setting the values for
OPENSSL_INCLUDE_DIR
OPENSSL_CRYPTO_LIBRARY
OPENSSL_SSL_LIBRARY
Once I deleted them it worked.
I am trying to build a project that requires LLVM 11 as a dependency. They bundle a copy of LLVM 11.0.1. I want to build it against the system version, which is LLVM 11.1.0. In the cmake build files, they have:
find_package(LLVM 11.0 CONFIG)
If you try to use the system LLVM, you get the following error:
CMake Warning at 3rdparty/llvm.cmake:42 (find_package):
Could not find a configuration file for package "LLVM" that is compatible
with requested version "11.0".
The following configuration files were considered but not accepted:
/usr/lib/llvm/11/lib64/cmake/llvm/LLVMConfig.cmake, version: 11.1.0
/usr/lib/llvm/11/lib/cmake/llvm/LLVMConfig.cmake, version: 11.1.0
Call Stack (most recent call first):
3rdparty/CMakeLists.txt:436 (include)
I thought that changing the line to this would fix it:
find_package(LLVM 11 CONFIG)
but it doesn't, and I get the exact same error:
CMake Warning at 3rdparty/llvm.cmake:42 (find_package):
Could not find a configuration file for package "LLVM" that is compatible
with requested version "11".
The following configuration files were considered but not accepted:
/usr/lib/llvm/11/lib64/cmake/llvm/LLVMConfig.cmake, version: 11.1.0
/usr/lib/llvm/11/lib/cmake/llvm/LLVMConfig.cmake, version: 11.1.0
Call Stack (most recent call first):
3rdparty/CMakeLists.txt:436 (include)
What am I missing? Here is a full link to the code: https://github.com/RPCS3/rpcs3/blob/master/3rdparty/llvm.cmake
Whether a version is deemed compatible to the requested version is specified by the package you're trying to find. I haven't looked at the LLVM config, but I suspect it specifies that only the exact version is compatible instead of all versions with the same major version.
If you're running CMake 3.19 or later you can pass a version range to find_package, so you could try find_package(LLVM 11...<12 CONFIG) instead.
Yesterday I asked a rather similar question. But this one is slightly different.
I am on Arch Linux with gcc 10 installed. I need to use gcc with version < 9 (a colleague even uses gcc4) to compile a Fortran code base.
So I installed the gcc7-fortran package because this colleague told me that it once worked with this compiler.
CMake figures out that it has to use mpif90 to compile the whole project which does not call gfortran-7 but gfortran which is version 10.
I could not yet figure out how to tell mpif90 to use another compiler as gfortran. So i did a little hack: I moved /usr/bin/gfortran to /usr/bin/gfortran-10 and made a soft link from /usr/bin/gfortran-7 to /usr/bin/gfortran. Now mpif90 uses gfortran with version 7. Great.
Now here comes the error. CMake is able to find MPI if I use gfortran-10 as compiler but is not able to find MPI if I use gfortran-7.
-- Could NOT find MPI_Fortran (missing: MPI_Fortran_WORKS)
CMake Error at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find MPI (missing: MPI_Fortran_FOUND) (found version "3.1")
Call Stack (most recent call first):
/usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
CMAKE/modules/FindMPI.cmake:1721 (find_package_handle_standard_args)
CMakeLists.txt:388 (find_package)
Has anyone ever had a similar issue?
Thanks in advance!
EDIT
when using gfortran-10 cmake tells finding MPI with this message
-- Found MPI_Fortran: /usr/lib/openmpi/libmpi_usempif08.so (found version "3.1")
On a vanilla CentOS 7 box, I have OpenMPI installed (stock version), and did:
module load mpi
to load the MPI stuff into the environment. Under this setting, cmake (I tried both 2.8 and latest 3.12) can't seem to find the MPI. Any idea how to resolve this? Thanks
-- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS)
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS)
CMake Error at /home/f7b/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/cmake-3.12.2-25n7srkgvu3elwswze6dckezvfkxqks7/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)
Call Stack (most recent call first):
/home/f7b/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/cmake-3.12.2-25n7srkgvu3elwswze6dckezvfkxqks7/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/home/f7b/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/cmake-3.12.2-25n7srkgvu3elwswze6dckezvfkxqks7/share/cmake-3.12/Modules/FindMPI.cmake:1666 (find_package_handle_standard_args)
CMakeLists.txt:27 (find_package)
Appending /usr/lib64/openmpi/bin/ to the PATH before running cmake worked for me.
have you installed openmpi-devel?
what do you get when you do "which mpicc"?
can you re-try after doing:
export MPI_C=`which mpicc`
export MPI_CXX=`which mpicxx`
also this might be due to the fact that 'spack' sanitizes the environment. So might want to try "spack install --dirty ..." or else put openmpi preference in packages.yaml
Also, I would guess that missing environment variables should correspond to or found under the the following paths:
module show mpi
Try cmake version 3.9. When I built Lammps with MPI and Intel Parallel Suite, I solved the issue by using cmake 3.9 while 3.10 still had that problem. There are some discussions here.
I'm trying to include wxWidgets library in my project.
I'm working on Ubuntu 16.04. You can get wxWidgets from the repository (already compiled) and just include it by modifying a cmake file (included in CLion). It works fine doing just that.
However, I need to modify the sources and this means that I have to compile the library myself.
I followed the instructions from this file:
https://github.com/wxWidgets/wxWidgets/blob/v3.1.0/docs/gtk/install.txt
Now Cmake can't find the library.
What may be missing?
EDIT:
The part of CMake regarding wxWidgets :
find_package(wxWidgets 3.1.0 COMPONENTS core base media REQUIRED)
include(${wxWidgets_USE_FILE})
target_link_libraries(projectName ${wxWidgets_LIBRARIES})
Error:
CMake Error at /home/usrName/Clion/clion-2017.2/bin/cmake/share/cmake-
3.8/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find wxWidgets: Found unsuitable version "3.0.2", but required is
at least "3.1.0" (found
-L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0;-
lwx_gtk2u_media-3.0)
Call Stack (most recent call first):
/home/usrName/Clion/clion-2017.2/bin/cmake/share/cmake-
3.8/Modules/FindPackageHandleStandardArgs.cmake:375 (_FPHSA_FAILURE_MESSAGE)
/home/usrName/Clion/clion-2017.2/bin/cmake/share/cmake-
3.8/Modules/FindwxWidgets.cmake:931 (find_package_handle_standard_args)
CMakeLists.txt:18 (find_package)