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

native_libtapi build error when cross compiling for MacOS #46

Open
DeckerSU opened this issue Feb 20, 2023 · 0 comments
Open

native_libtapi build error when cross compiling for MacOS #46

DeckerSU opened this issue Feb 20, 2023 · 0 comments

Comments

@DeckerSU
Copy link
Owner

DeckerSU commented Feb 20, 2023

When cross-compiling for Mac there is possible native_libtapi package build error, like this:

-- The C compiler identification is Clang 10.0.1
-- The CXX compiler identification is Clang 10.0.1
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /home/decker/mac_test/bin/clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/decker/mac_test/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /home/decker/mac_test/bin/clang++
-- Check for working CXX compiler: /home/decker/mac_test/bin/clang++ - broken
-- Configuring incomplete, errors occurred!

As you are see there is an error with Detecting CXX compiler ABI info. Extended logs (you can also play with --log-level=VERBOSE --trace-expand --debug-trycompile argumets in cmake) will give following info:

CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
  The C++ compiler

    "/home/decker/KomodoOcean/depends/x86_64-apple-darwin19/native/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/decker/KomodoOcean/depends/work/build/x86_64-apple-darwin19/native_libtapi/664b8414f89612f2dfd35a9b679c345aa5389026-8a16f55cbed/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_a56c8/fast && gmake[1]: Entering directory '/home/decker/KomodoOcean/depends/work/build/x86_64-apple-darwin19/native_libtapi/664b8414f89612f2dfd35a9b679c345aa5389026-8a16f55cbed/build/CMakeFiles/CMakeTmp'
    /usr/bin/gmake  -f CMakeFiles/cmTC_a56c8.dir/build.make CMakeFiles/cmTC_a56c8.dir/build
    gmake[2]: Entering directory '/home/decker/KomodoOcean/depends/work/build/x86_64-apple-darwin19/native_libtapi/664b8414f89612f2dfd35a9b679c345aa5389026-8a16f55cbed/build/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_a56c8.dir/testCXXCompiler.cxx.o
    /home/decker/KomodoOcean/depends/x86_64-apple-darwin19/native/bin/clang++   -I /home/decker/KomodoOcean/depends/work/build/x86_64-apple-darwin19/native_libtapi/664b8414f89612f2dfd35a9b679c345aa5389026-8a16f55cbed/build/../src/llvm/projects/clang/include -I /home/decker/KomodoOcean/depends/work/build/x86_64-apple-darwin19/native_libtapi/664b8414f89612f2dfd35a9b679c345aa5389026-8a16f55cbed/build/projects/clang/include  -MD -MT CMakeFiles/cmTC_a56c8.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_a56c8.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_a56c8.dir/testCXXCompiler.cxx.o -c /home/decker/KomodoOcean/depends/work/build/x86_64-apple-darwin19/native_libtapi/664b8414f89612f2dfd35a9b679c345aa5389026-8a16f55cbed/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    Linking CXX executable cmTC_a56c8
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a56c8.dir/link.txt --verbose=1
    /home/decker/KomodoOcean/depends/x86_64-apple-darwin19/native/bin/clang++ -I /home/decker/KomodoOcean/depends/work/build/x86_64-apple-darwin19/native_libtapi/664b8414f89612f2dfd35a9b679c345aa5389026-8a16f55cbed/build/../src/llvm/projects/clang/include -I /home/decker/KomodoOcean/depends/work/build/x86_64-apple-darwin19/native_libtapi/664b8414f89612f2dfd35a9b679c345aa5389026-8a16f55cbed/build/projects/clang/include  CMakeFiles/cmTC_a56c8.dir/testCXXCompiler.cxx.o -o cmTC_a56c8 
    /usr/bin/ld: cannot find -lstdc++: No such file or directory
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

It means that libstdc++-XX-dev package missed on your system.

The solution is:

sudo apt install libstdc++-$(g++ -dumpversion)-dev
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

1 participant