[llvm-dev] Building LLVM on Mac

Abid Malik via llvm-dev llvm-dev at lists.llvm.org
Tue May 4 01:10:53 PDT 2021


Hello,

I am trying to build the framework on MacBook but getting errors while
compilation; e.g., some are

/Users/abidmalik/Programming/MLIR_target/llvm-project/libcxx/include/wchar.h:137:77:
error: use of undeclared identifier 'wcschr'
wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {return
(wchar_t*)wcschr(__s, __c);}

^
/Users/abidmalik/Programming/MLIR_target/llvm-project/libcxx/include/wchar.h:144:87:
error: use of undeclared identifier 'wcspbrk'
wchar_t* __libcpp_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return
(wchar_t*)wcspbrk(__s1, __s2);}


Certainly, it has to do with the compiler flags related paths given to
Cmake. I tried a couple of options but unable to solve the issue.

----
I build with:

cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DLLVM_INCLUDE_TESTS=OFF
../llvm
 -DLLVM_ENABLE_PROJECTS="mlir;clang;clang-tools-extra;libcxx;libcxxabi;lld;openmp"
    -DLLVM_BUILD_EXAMPLES=ON  -DLLVM_TARGETS_TO_BUILD="X86;NVPTX;AMDGPU"
-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
*-DCMAKE_C_FLAGS="-isysroot
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk"
-DCMAKE_CXX_FLAGS="-isysroot
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
-I/Users/abidmalik/Programming/MLIR_target/llvm-project/libcxx/include"*
-DCMAKE_INSTALL_PREFIX=/Users/abidmalik/Programming/MLIR_target/llvm-project/INSTALL


I looked on Google as well for the solution. The closest one could find is

http://clang-developers.42468.n3.nabble.com/clang-libcxxabi-Unknown-type-names-size-t-and-uint64-t-td4064204.html

But unable to resolve the issue yet.
Any thoughts and suggestions?

-- 
Abid M. Malik
******************************************************
"I have learned silence from the talkative, toleration from the intolerant,
and kindness from the unkind"---Gibran
"Success is not for the chosen few, but for the few who choose" --- John
Maxwell
"Being a good person does not depend on your religion or status in life,
your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD
YOU TREAT OTHERS"--- Abid
"The Universe is talking to us, and the language of the Universe is
mathematics."----Abid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210504/9a5c1d72/attachment.html>


More information about the llvm-dev mailing list