Closed FirePing32 closed 7 months ago
@FirePing32 do you have full logs of the cmake
and make
steps?
@viferga was able to solve it by passing the /usr/local/include
dir. First, I changed the cmake config -
diff --git a/source/plugins/backtrace_plugin/CMakeLists.txt b/source/plugins/backtrace_plugin/CMakeLists.txt
index 0789db78..2ed95f31 100644
--- a/source/plugins/backtrace_plugin/CMakeLists.txt
+++ b/source/plugins/backtrace_plugin/CMakeLists.txt
@@ -150,6 +150,11 @@ target_include_directories(${target}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}/include
+ # Using custom include directory for backward.hpp
+ if( DEFINED ${BACKTRACE_INCLUDE_PATH} )
+ ${BACKTRACE_INCLUDE_PATH}
+ endif()
+
$<TARGET_PROPERTY:${META_PROJECT_NAME}::metacall,INCLUDE_DIRECTORIES> # MetaCall includes
PUBLIC
Then build cmake with the -DBACKTRACE_INCLUDE_PATH
flag.
I am not sure this workaround is valid. The backward.hpp dependency is downloaded automatically if it's not found, there should be a better way of solving it rather than manually installing it and then passing the include folder.
Probably this is a bug of the embedding of the project through CMake, we should investigate it further.
@viferga The script was able to find backward.hpp
on my system, but while compiling the backtrace plugin, it does not include the relevant directory (-I/usr/local/lib
).
@FirePing32 let's see if these commits solves the issue: https://github.com/metacall/core/commit/6e2914726c018d708590309d51002a99c20e449f https://github.com/metacall/core/commit/cd3569104830b5f8d2076d2bfad8cf87c7b4a8dd
Can you test it again?
@viferga Yeah sure. Will test it by 21:00 GMT+05:30
Thanks @FirePing32
š Bug Report
Building with cmake fails (at least for me) on MacOS. The backtrace plugin cannot find
backward.hpp
in the already passed include directories. https://github.com/metacall/core/blob/34b28423138e607b3b77a984566f941e141ada4b/source/plugins/backtrace_plugin/source/backtrace_plugin.cpp#L23Expected Behavior
The backtrace plugin should be built successfully.
Current Behavior
Cmake fails when installing the backtrace plugin.
Possible Solution
Pass an argument to Cmake at build time to use additional include directories.
Steps to Reproduce
Context (Environment)
Platform: Intel/AMD64 OS: MacOS 13.5
Logs