Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to build with CMake #1582

Open
sanjuchopracool opened this issue Feb 20, 2024 · 4 comments
Open

Not able to build with CMake #1582

sanjuchopracool opened this issue Feb 20, 2024 · 4 comments

Comments

@sanjuchopracool
Copy link

Trying to build on intel mac with cmake , got error while configure project.

CMake Warning:
  Ignoring extra path from command line:

   "/Users/sanju/PROJECTS/sol2_build"


CMake Warning:
  Ignoring extra path from command line:

   "."


-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- The C compiler identification is AppleClang 14.0.0.14000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- sol2 is the top-level directory...
-- Performing Test CXX_CHECK_FLAG_DISABLE_PERMISSIVE
-- Performing Test CXX_CHECK_FLAG_DISABLE_PERMISSIVE - Success
-- Performing Test C_CHECK_FLAG_DISABLE_PERMISSIVE
-- Performing Test C_CHECK_FLAG_DISABLE_PERMISSIVE - Success
-- Performing Test CXX_CHECK_FLAG_UTF8_LITERAL_ENCODING
-- Performing Test CXX_CHECK_FLAG_UTF8_LITERAL_ENCODING - Success
-- Performing Test C_CHECK_FLAG_UTF8_LITERAL_ENCODING
-- Performing Test C_CHECK_FLAG_UTF8_LITERAL_ENCODING - Success
-- Performing Test CXX_CHECK_FLAG_UTF8_SOURCE_ENCODING
-- Performing Test CXX_CHECK_FLAG_UTF8_SOURCE_ENCODING - Success
-- Performing Test C_CHECK_FLAG_UTF8_SOURCE_ENCODING
-- Performing Test C_CHECK_FLAG_UTF8_SOURCE_ENCODING - Success
-- Performing Test CXX_CHECK_FLAG_EXTRA_CONSTEXPR_DEPTH
-- Performing Test CXX_CHECK_FLAG_EXTRA_CONSTEXPR_DEPTH - Success
-- Performing Test C_CHECK_FLAG_EXTRA_CONSTEXPR_DEPTH
-- Performing Test C_CHECK_FLAG_EXTRA_CONSTEXPR_DEPTH - Success
-- Performing Test CXX_CHECK_FLAG_EXTRA_CONSTEXPR_STEPS
-- Performing Test CXX_CHECK_FLAG_EXTRA_CONSTEXPR_STEPS - Success
-- Performing Test C_CHECK_FLAG_EXTRA_CONSTEXPR_STEPS
-- Performing Test C_CHECK_FLAG_EXTRA_CONSTEXPR_STEPS - Success
-- Performing Test CXX_CHECK_FLAG_TEMPLATE_DEBUGGING_MODE
-- Performing Test CXX_CHECK_FLAG_TEMPLATE_DEBUGGING_MODE - Success
-- Performing Test C_CHECK_FLAG_TEMPLATE_DEBUGGING_MODE
-- Performing Test C_CHECK_FLAG_TEMPLATE_DEBUGGING_MODE - Success
-- Performing Test CXX_CHECK_FLAG_BIG_OBJ
-- Performing Test CXX_CHECK_FLAG_BIG_OBJ - Failed
-- Performing Test C_CHECK_FLAG_BIG_OBJ
-- Performing Test C_CHECK_FLAG_BIG_OBJ - Failed
-- Performing Test CXX_CHECK_FLAG_PEDANTIC
-- Performing Test CXX_CHECK_FLAG_PEDANTIC - Success
-- Performing Test C_CHECK_FLAG_PEDANTIC
-- Performing Test C_CHECK_FLAG_PEDANTIC - Success
-- Performing Test CXX_CHECK_FLAG_WARN_PEDANTIC
-- Performing Test CXX_CHECK_FLAG_WARN_PEDANTIC - Success
-- Performing Test C_CHECK_FLAG_WARN_PEDANTIC
-- Performing Test C_CHECK_FLAG_WARN_PEDANTIC - Success
-- Performing Test CXX_CHECK_FLAG_WARN_ALL
-- Performing Test CXX_CHECK_FLAG_WARN_ALL - Success
-- Performing Test C_CHECK_FLAG_WARN_ALL
-- Performing Test C_CHECK_FLAG_WARN_ALL - Success
-- Performing Test CXX_CHECK_FLAG_WARN_EXTRA
-- Performing Test CXX_CHECK_FLAG_WARN_EXTRA - Success
-- Performing Test C_CHECK_FLAG_WARN_EXTRA
-- Performing Test C_CHECK_FLAG_WARN_EXTRA - Success
-- Performing Test CXX_CHECK_FLAG_WARN_ERRORS
-- Performing Test CXX_CHECK_FLAG_WARN_ERRORS - Success
-- Performing Test C_CHECK_FLAG_WARN_ERRORS
-- Performing Test C_CHECK_FLAG_WARN_ERRORS - Success
-- Performing Test CXX_DIAGNOSTIC_UNKNOWN_WARNING
-- Performing Test CXX_DIAGNOSTIC_UNKNOWN_WARNING - Failed
-- Performing Test C_DIAGNOSTIC_UNKNOWN_WARNING
-- Performing Test C_DIAGNOSTIC_UNKNOWN_WARNING - Failed
-- Performing Test CXX_DIAGNOSTIC_UNKNOWN_WARNING_OPTION
-- Performing Test CXX_DIAGNOSTIC_UNKNOWN_WARNING_OPTION - Success
-- Performing Test C_DIAGNOSTIC_UNKNOWN_WARNING_OPTION
-- Performing Test C_DIAGNOSTIC_UNKNOWN_WARNING_OPTION - Success
-- Performing Test CXX_DIAGNOSTIC_MICROSOFT_CAST
-- Performing Test CXX_DIAGNOSTIC_MICROSOFT_CAST - Success
-- Performing Test C_DIAGNOSTIC_MICROSOFT_CAST
-- Performing Test C_DIAGNOSTIC_MICROSOFT_CAST - Success
-- Performing Test CXX_DIAGNOSTIC_NOEXCEPT_TYPE
-- Performing Test CXX_DIAGNOSTIC_NOEXCEPT_TYPE - Success
-- Performing Test C_DIAGNOSTIC_NOEXCEPT_TYPE
-- Performing Test C_DIAGNOSTIC_NOEXCEPT_TYPE - Success
-- Performing Test CXX_DIAGNOSTIC_UNREACHABLE_CODE
-- Performing Test CXX_DIAGNOSTIC_UNREACHABLE_CODE - Success
-- Performing Test C_DIAGNOSTIC_UNREACHABLE_CODE
-- Performing Test C_DIAGNOSTIC_UNREACHABLE_CODE - Success
-- Performing Test CXX_DIAGNOSTIC_PADDING_FROM_ALIGNMENT
-- Performing Test CXX_DIAGNOSTIC_PADDING_FROM_ALIGNMENT - Failed
-- Performing Test C_DIAGNOSTIC_PADDING_FROM_ALIGNMENT
-- Performing Test C_DIAGNOSTIC_PADDING_FROM_ALIGNMENT - Failed
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Selecting PUC-RIO Lua 5.4.4 from '5.4.4' and building a SHARED library with C linkage...
CMake Warning (dev) at /usr/local/Cellar/cmake/3.28.1/share/cmake/Modules/FetchContent.cmake:1331 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  cmake/Packages/FindLuaBuild/LuaVanilla.cmake:175 (FetchContent_Declare)
  cmake/Packages/FindLuaBuild.cmake:86 (include)
  cmake/Packages/FindLuaBuild.cmake:112 (find_lua_build)
  CMakeLists.txt:229 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found LuaBuild: Lua::Lua (found version "5.4.4") 
-- Configuring done (17.4s)
CMake Error at cmake/Packages/FindLuaBuild/LuaVanilla.cmake:254 (add_dependencies):
  The dependency target "LUA_VANILLA" of target "liblua-5.4.4" does not
  exist.
Call Stack (most recent call first):
  cmake/Packages/FindLuaBuild.cmake:86 (include)
  cmake/Packages/FindLuaBuild.cmake:112 (find_lua_build)
  CMakeLists.txt:229 (find_package)


-- Generating done (0.2s)
CMake Generate step failed.  Build files cannot be regenerated correctly.

@phwissmann
Copy link

Does this #1586 fix it for you?

@Maddimax
Copy link
Contributor

Maddimax commented Apr 4, 2024

#1586 Fixes the initial cmake problem for for me.
When I enable all SOL2_EXAMPLES, SOL2_INTEROP_EXAMPLES, SOL2_DYNAMIC_LOADING_EXAMPLES I get the following error during building:

[279/325  84% :: 19.263] Performing update step for 'LUABRIDGE_BUILD_SOURCE'
[279/325  85% :: 19.525] Building CXX object examples/customization/CMakeFiles/customization_to_table.dir/source/lua_zm_interop.cpp.o
[279/325  85% :: 19.602] Building CXX object examples/customization/CMakeFiles/customization_to_table.dir/source/lua_interop.cpp.o
[279/325  85% :: 23.373] Performing download step (git clone) for 'LUWRA_BUILD_SOURCE'
Cloning into 'luwra_0.5.0'...
Already on 'master'
Your branch is up to date with 'origin/master'.
Submodule 'deps/catch' (https://github.com/philsquared/Catch.git) registered for path 'deps/catch'
Cloning into '/Users/mtillmanns/projects/qt/sol2/build/Clean/Debug/vendor/luwra_0.5.0/deps/catch'...
Submodule path 'deps/catch': checked out 'd758428fe297655e558a86cc6a013fcb1bcc8c7d'
ninja: build stopped: subcommand failed.
build finished with error(s).

@sanjuchopracool
Copy link
Author

Not working,

[cmake] -- Found LuaBuild: Lua::Lua (found version "5.4.4") 
[cmake] -- Configuring done (6.8s)
[cmake] CMake Error at cmake/Packages/FindLuaBuild/LuaVanilla.cmake:254 (add_dependencies):
[cmake]   The dependency target "LUA_VANILLA" of target "liblua-5.4.4" does not
[cmake]   exist.
[cmake] Call Stack (most recent call first):
[cmake]   cmake/Packages/FindLuaBuild.cmake:86 (include)
[cmake]   cmake/Packages/FindLuaBuild.cmake:112 (find_lua_build)
[cmake]   CMakeLists.txt:229 (find_package)
[cmake] 
[cmake] 
[cmake] -- Generating done (0.0s)
[cmake] CMake Generate step failed.  Build files cannot be regenerated correctly.
[cmake] 
[cmake] The command "/home/sanju/Qt/Tools/CMake/bin/cmake -S /home/sanju/PROJECTS/sol2 -B /home/sanju/PROJECTS/sol2/build/DEKSTOP_CLANG_17_QT_6_5_3-Debug -DCMAKE_GENERATOR:STRING=Ninja -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=/home/sanju/PROJECTS/sol2/build/DEKSTOP_CLANG_17_QT_6_5_3-Debug/.qtc/package-manager/auto-setup.cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/sanju/Qt/6.5.3/gcc_64/bin/qmake -DCMAKE_PREFIX_PATH:PATH=/home/sanju/Qt/6.5.3/gcc_64 -DCMAKE_C_COMPILER:FILEPATH=/bin/clang-17 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-17 -DCMAKE_CXX_FLAGS_INIT:STRING=-DQT_QML_DEBUG" terminated with exit code 1.
[cmake] 
[cmake] Elapsed time: 00:07.

@estebanfer
Copy link

estebanfer commented Jun 20, 2024

I had the same issue and #1586 fully fixed the issue for me, on Windows 10, CMake 3.29.5, MSVC 14.40 (Visual Studio 2022, 17.10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants