metacall / core

MetaCall: The ultimate polyglot programming experience.
https://metacall.io
Apache License 2.0
1.57k stars 160 forks source link

Build fails in macOS after adding C support #440

Closed ahmedihabb2 closed 1 year ago

ahmedihabb2 commented 1 year ago

🐛 Bug Report

Changes

    elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then
        brew install libffi
        brew install --HEAD tcc
        brew install llvm@11 
        brew link llvm@11 --force --overwrite
        mkdir -p build
        CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt"
        TCC_PREFIX=$(brew --prefix tcc)
        LIBC_PREFIX=$(brew --prefix llvm@11)
        echo "-DLIBTCC_LIBRARY=${TCC_PREFIX}/lib/libtcc.a" >> $CMAKE_CONFIG_PATH
        echo "-DLIBTCC_INCLUDE_DIR=${TCC_PREFIX}/include" >> $CMAKE_CONFIG_PATH
        echo "-DLibClang_INCLUDE_DIR=${LIBC_PREFIX}/include/clang-c" >> $CMAKE_CONFIG_PATH
        echo "-DLibClang_LIBRARY=${LIBC_PREFIX}/lib/libclang.dylib" >> $CMAKE_CONFIG_PATH

Error

/Users/runner/work/core/core/source/scripts/c/libloadtest/source/libloadtest.cpp:6:19: error: non-aggregate type 'std::vector<int>' cannot be initialized with an initializer list
        std::vector<int> v = { 7, 323, 16, 8 };
[ 19%] Building CXX object source/scripts/extension/sum_extension/CMakeFiles/sum_extension.dir/source/sum_extension.cpp.o
                         ^   ~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [source/scripts/c/libloadtest/CMakeFiles/c-libloadtest-shared.dir/source/libloadtest.cpp.o] Error 1
make[2]: Target `source/scripts/c/libloadtest/CMakeFiles/c-libloadtest-shared.dir/build' not remade because of errors.
make[1]: *** [source/scripts/c/libloadtest/CMakeFiles/c-libloadtest-shared.dir/all] Error 2

Full CI Logs

6_Configure.txt

7_Build.txt

viferga commented 1 year ago

This is solved already, no?