Coder Social home page Coder Social logo

Comments (5)

adamski avatar adamski commented on September 22, 2024

Found the issue. For some reason the 'x64' part of the URL is being removed in GitLab CI.

Correct URL:
https://static.realm.io/downloads/dependencies/openssl/3.0.8/openssl-3.0.8-x64-windows-static.tar.gz

URL in GitLab CI:
https://static.realm.io/downloads/dependencies/openssl/3.0.8/openssl-3.0.8--windows-static.tar.gz

from realm-cpp.

adamski avatar adamski commented on September 22, 2024

I suspected CMAKE_CXX_COMPILER_ARCHITECTURE_ID was not being set on the CI server, but I checked and it is set to "x64"

from realm-cpp.

adamski avatar adamski commented on September 22, 2024

So I changed then following:

diff --git forkSrcPrefix/tools/cmake/AcquireRealmDependency.cmake forkDstPrefix/tools/cmake/AcquireRealmDependency.cmake
index 0c395b61cb6444100f2f579d8d1ffac81402ac01..4e9d00d3e74eac3001b17352a30f22e66c0115d9 100644
--- forkSrcPrefix/tools/cmake/AcquireRealmDependency.cmake
+++ forkDstPrefix/tools/cmake/AcquireRealmDependency.cmake
@@ -22,7 +22,7 @@ function(realm_acquire_dependency dep_name dep_version out_dep_cmake)
 
     if(ANDROID)
         set(_target_architecture ${CMAKE_ANDROID_ARCH_ABI})
-    elseif(MSVC)
+    elseif(WIN32)
         set(_target_architecture ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID})
     else()
         set(_target_architecture ${CMAKE_SYSTEM_PROCESSOR})

Which got the download working, but I now get this error:

-- Getting https://static.realm.io/downloads/dependencies/openssl/3.0.8/openssl-3.0.8-x64-windows-static.tar.gz...
-- Uncompressing openssl...
CMake Error at C:/Program Files/CMake/share/cmake-3.27/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) (found
  version "3.0.8")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.27/Modules/FindOpenSSL.cmake:668 (find_package_handle_standard_args)
  C:/Gitlab-Runner/CPM/Cache/cpprealm/a112b5bb90cb3776710c6a09806b2adf70fad799/realm-core/CMakeLists.txt:319 (find_package)
-- Configuring incomplete, errors occurred!

from realm-cpp.

adamski avatar adamski commented on September 22, 2024

The odd thing is that building in CLion on the same machine works fine.

It seems to be when running in Powershell that the problem arises.

from realm-cpp.

adamski avatar adamski commented on September 22, 2024

OK - seems to be some issue with the CMake script when using the Ninja generator within PowerShell.

Switching to the Visual Studio generator, with the architecture specified works.

from realm-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.