[Bug 42981] New: cross-compile lldb for ios fails

Bug ID 42981
Summary cross-compile lldb for ios fails
Product lldb
Version 8.0
Hardware Macintosh
OS MacOS X
Status NEW
Severity enhancement
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter mryusolo@live.com
CC jdevlieghere@apple.com, llvm-bugs@lists.llvm.org

i cross-compile lldb for ios, but it failed.
cmake -DCMAKE_CROSSCOMPILING=True
-DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/IOS.cmake
-DCMAKE_IOS_SDK_ROOT=/Users/ruizhang/Documents/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk
-DLLVM_TABLEGEN=/Users/ruizhang/Desktop/tsdb/third_party/llvm/build_mac/bin/llvm-tblgen
-DCLANG_TABLEGEN=/Users/ruizhang/Desktop/tsdb/third_party/llvm/build_mac/bin/clang-tblgen
-DLLVM_HOST_TRIPLE=aarch64-apple-darwin18 -DLLVM_TARGET_ARCH=AArch64
-DLLVM_TARGETS_TO_BUILD=AArch64 -DCMAKE_OSX_ARCHITECTURES="armv7;armv7s;arm64"
-DLLVM_ENABLE_RTTI=1 -DLLDB_DISABLE_LIBEDIT=1 -DLLDB_DISABLE_CURSES=1
-DLLDB_DISABLE_PYTHON=1 -DLLVM_ENABLE_TERMINFO=0 -DLLVM_ENABLE_PIC=False
-DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_EXAMPLES=OFF
-DLLVM_BUILD_TESTS=OFF -DLLVM_ENABLE_BACKTRACES=OFF -DLLVM_INCLUDE_TESTS=OFF
-DLLDB_BUILD_FRAMEWORK=1 -DLLDB_CODESIGN_IDENTITY=lldb_codesign 
-DCMAKE_BUILD_TYPE=Release ../   

there is a lack of lockdown.h in cross-compiling. The detailed error
information is as follows:

/Users/ruizhang/Desktop/tsdb/third_party/llvm/tools/lldb/tools/debugserver/source/RNBSocket.h:24:10:
fatal error: 
      'lockdown.h' file not found
#include "lockdown.h"
         ^~~~~~~~~~~~
In file included from
/Users/ruizhang/Desktop/tsdb/third_party/llvm/tools/lldb/tools/debugserver/source/libdebugserver.cpp:23:
In file included from
/Users/ruizhang/Desktop/tsdb/third_party/llvm/tools/lldb/tools/debugserver/source/RNBRemote.h:21:
/Users/ruizhang/Desktop/tsdb/third_party/llvm/tools/lldb/tools/debugserver/source/RNBSocket.h:24:10:
fatal error: 
      'lockdown.h' file not found
#include "lockdown.h"
         ^~~~~~~~~~~~
1 error generated.
make[2]: ***
[tools/lldb/tools/debugserver/source/CMakeFiles/lldbDebugserverCommon.dir/libdebugserver.cpp.o]
Error 1
In file included from
/Users/ruizhang/Desktop/tsdb/third_party/llvm/tools/lldb/tools/debugserver/source/RNBContext.cpp:27:
In file included from
/Users/ruizhang/Desktop/tsdb/third_party/llvm/tools/lldb/tools/debugserver/source/RNBRemote.h:21:
[ 38%] Building CXX object
lib/Transforms/AggressiveInstCombine/CMakeFiles/LLVMAggressiveInstCombine.dir/TruncInstCombine.cpp.o
/Users/ruizhang/Desktop/tsdb/third_party/llvm/tools/lldb/tools/debugserver/source/RNBSocket.h:24:10:
fatal error: 
      'lockdown.h' file not found
#include "lockdown.h"
         ^~~~~~~~~~~~
1 error generated.
make[2]: ***
[tools/lldb/tools/debugserver/source/CMakeFiles/lldbDebugserverCommon.dir/RNBContext.cpp.o]
Error 1
[ 38%] Building CXX object
lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/BoundsChecking.cpp.o
1 error generated.
make[2]: ***
[tools/lldb/tools/debugserver/source/CMakeFiles/lldbDebugserverCommon.dir/RNBRemote.cpp.o]
Error 1
Scanning dependencies of target LLVMInstCombine
[ 38%] Building CXX object
lib/Transforms/InstCombine/CMakeFiles/LLVMInstCombine.dir/InstructionCombining.cpp.o
/Users/ruizhang/Desktop/tsdb/third_party/llvm/tools/lldb/tools/debugserver/source/MacOSX/MachProcess.mm:218:9:
fatal error: 
      'BackBoardServices/BKSOpenApplicationConstants_Private.h' file not found
#import <BackBoardServices/BKSOpenApplicationConstants_Private.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: ***
[tools/lldb/tools/debugserver/source/CMakeFiles/lldbDebugserverCommon.dir/MacOSX/MachProcess.mm.o]
Error 1
[ 38%] Building CXX object
lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/CGProfile.cpp.o
/Users/ruizhang/Desktop/tsdb/third_party/llvm/tools/lldb/tools/debugserver/source/MacOSX/MachTask.mm:54:9:
fatal error: 
      'BackBoardServices/BKSWatchdogAssertion.h' file not found
#import <BackBoardServices/BKSWatchdogAssertion.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: ***
[tools/lldb/tools/debugserver/source/CMakeFiles/lldbDebugserverCommon.dir/MacOSX/MachTask.mm.o]
Error 1

Davide Italiano changed bug 42981

mryusolo changed bug 42981

Jonas Devlieghere changed bug 42981

What Removed Added
Status REOPENED RESOLVED
Resolution WONTFIX

Comment # 6 on bug 42981 from Jonas Devlieghere

(In reply to mryusolo from comment #5)

>    Thank you very much for your reply. Is this an official unresolved
> problem or a problem I use? Lldb works well on other platforms, including
> Android, but there are many problems on IOS platform. I haven't found any
> cross-compiled information about lldb IOS on the official website, and there
> are few related information on the internet. Now I encounter many problems
> on IOS platform. In confusion, I have tried several versions, but none of
> them can.
> 
>    If you know what the problem is, I hope you can reply to me. Thank you
> very much.

Correct, we acknowledge that this is an issue, but it's not something we
support or plan to support.