rust-mos icon indicating copy to clipboard operation
rust-mos copied to clipboard

Build Error on Step 3 of Installation Instructions

Open U007D opened this issue 1 year ago • 3 comments

Following the build instructions:

  1. git clone https://github.com/llvm-mos/llvm-mos
  2. cd llvm-mos
cmake -C clang/cmake/caches/MOS.cmake -G "Ninja" -S llvm -B build \
         -DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF \
         -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON \
         -DLLVM_INSTALL_UTILS=ON -DLLVM_BUILD_UTILS=ON -DLLVM_TOOLCHAIN_UTILITIES=FileCheck \
         -DLLVM_TOOLCHAIN_TOOLS="llvm-addr2line;llvm-ar;llvm-cxxfilt;llvm-dwarfdump;llvm-mc;llvm-nm;llvm-objcopy;llvm-objdump;llvm-ranlib;llvm-readelf;llvm-readobj;llvm-size;llvm-strings;llvm-strip;llvm-symbolizer;llvm-config;llc" \
         -DLIBXML2_LIBRARY=/usr/local/opt/libxml2/lib/libxml2.dylib \
         -DLLVM_TARGETS_TO_BUILD="MOS;X86" \
         -DLLVM_ENABLE_PROJECTS="clang;lld;lldb"

Step three halts with the following error message:

...
-- Performing Test BUILDING_FOR_ARM64_OSX
-- Performing Test BUILDING_FOR_ARM64_OSX - Success
CMake Warning at /Users/sergibli/Code/rust-mos/llvm-mos/lldb/tools/debugserver/source/CMakeLists.txt:44 (message):
  Development code sign identity not found: 'lldb_codesign' This will cause
  failures in the test suite.  Pass '-DLLDB_USE_SYSTEM_DEBUGSERVER=ON' to use
  the system one instead.  See 'Code Signing on macOS' in the documentation.
Call Stack (most recent call first):
  /Users/sergibli/Code/rust-mos/llvm-mos/lldb/tools/debugserver/source/CMakeLists.txt:115 (get_debugserver_codesign_identity)


-- LLDB debugserver energy support is disabled
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
CMake Error at cmake/modules/LLVMDistributionSupport.cmake:286 (message):
  Specified distribution component 'clang-apply-replacements' doesn't have an
  install target
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


CMake Error at cmake/modules/LLVMDistributionSupport.cmake:294 (message):
  Specified distribution component 'clang-apply-replacements' doesn't have an
  install-stripped target.  Its installation target creation should be
  changed to use add_llvm_install_targets, or you should manually create the
  'install-clang-apply-replacements-stripped' target.
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


CMake Error at cmake/modules/LLVMDistributionSupport.cmake:286 (message):
  Specified distribution component 'clang-include-fixer' doesn't have an
  install target
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


CMake Error at cmake/modules/LLVMDistributionSupport.cmake:294 (message):
  Specified distribution component 'clang-include-fixer' doesn't have an
  install-stripped target.  Its installation target creation should be
  changed to use add_llvm_install_targets, or you should manually create the
  'install-clang-include-fixer-stripped' target.
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


CMake Error at cmake/modules/LLVMDistributionSupport.cmake:286 (message):
  Specified distribution component 'clang-tidy' doesn't have an install
  target
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


CMake Error at cmake/modules/LLVMDistributionSupport.cmake:294 (message):
  Specified distribution component 'clang-tidy' doesn't have an
  install-stripped target.  Its installation target creation should be
  changed to use add_llvm_install_targets, or you should manually create the
  'install-clang-tidy-stripped' target.
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


CMake Error at cmake/modules/LLVMDistributionSupport.cmake:286 (message):
  Specified distribution component 'clangd' doesn't have an install target
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


CMake Error at cmake/modules/LLVMDistributionSupport.cmake:294 (message):
  Specified distribution component 'clangd' doesn't have an install-stripped
  target.  Its installation target creation should be changed to use
  add_llvm_install_targets, or you should manually create the
  'install-clangd-stripped' target.
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


CMake Error at cmake/modules/LLVMDistributionSupport.cmake:286 (message):
  Specified distribution component 'find-all-symbols' doesn't have an install
  target
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


CMake Error at cmake/modules/LLVMDistributionSupport.cmake:294 (message):
  Specified distribution component 'find-all-symbols' doesn't have an
  install-stripped target.  Its installation target creation should be
  changed to use add_llvm_install_targets, or you should manually create the
  'install-find-all-symbols-stripped' target.
Call Stack (most recent call first):
  CMakeLists.txt:1423 (llvm_distribution_add_targets)


-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Looking for shm_open in rt
-- Looking for shm_open in rt - not found
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST
-- Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST - Success
-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE
-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS
-- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=/Users/sergibli/Code/rust-mos/llvm-mos/third-party/benchmark/include
-- Compiling and running to test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- success
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Compiling and running to test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Compiling and running to test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Compiling and running to test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Compiling and running to test HAVE_PTHREAD_AFFINITY
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Configuring incomplete, errors occurred!

Details: macOS Sequoia 15.0.1 cmake 3.30.5 ninja 1.12.1 llvm commit SHA 8445a95309f2e8673c967f78739e18f32f5208bf

Any thoughts on the cause of this error? (If not, can you provide the tooling version numbers and llvm-mos commit sha for the last successful Mac build? I can try to repro with that information on my end.)

U007D avatar Oct 24 '24 15:10 U007D

After hours of trying to get this to work and then realizing that there's just straight up things missing in the instructions (the python script you need to run is flat out missing something) I can safely agree with the author that you should just use the dev container found here

But if you're a better man then me and think you can get it running without docker... the solution is to clone llvm-mos under the commit c902de1fc347122577bc3538bbd3c86b90c9a8b7 and compile against that instead.

EDIT

Do not bother. See my comment further down.

IoIxD avatar Apr 11 '25 05:04 IoIxD

Encountering this problem too on Linux

retrac0 avatar May 31 '25 01:05 retrac0

@retrac0, I would actually advise trying to install this at all, as me trying to install this actually screwed up my ability to do most Rust work; I can no longer link to C/C++ code from Rust projects. I have reinstalled every package on my system. I do not know where it hid the file that is causing my problems, but I now have to do a clean reinstall at some point...which I have been procrastinating, so thankfully i can still spin up a VM to do this stuff.

Heed my warning and don't try installing this.

IoIxD avatar May 31 '25 03:05 IoIxD