I want to make some changes to the SBAPI and build lldb with those changes. If I build Swift using this command on Linux:
./swift/utils/build-script --release --assertions --lldb --extra-cmake-options=-DLLDB_USE_STATIC_BINDINGS=OFF
Then I get this failure:
+ /usr/local/bin/cmake --build /usr/local/google/home/marcrasi/swift-base-master/build/Ninja-ReleaseAssert/lldb-linux-x86_64 -- -j12 all
[1/924][ 0%][0.055s] Generating VCSVersion.inc
-- Found Git: /usr/bin/git (found version "2.25.0.225.g125e21ebc7-goog")
[2/924][ 0%][0.068s] Builds LLDB Python wrapper
FAILED: bindings/LLDBWrapPython.cpp bindings/lldb.py
cd /usr/local/google/home/marcrasi/swift-base-master/build/Ninja-ReleaseAssert/lldb-linux-x86_64/bindings && /usr/bin/python /usr/local/google/home/marcrasi/swift-base-master/llvm-project/lldb/bindings/prepare_bindings.py --srcRoot=/usr/local/google/home/marcrasi/swift-base-master/llvm-project/lldb --targetDir=/usr/local/google/home/marcrasi/swift-base-master/build/Ninja-ReleaseAssert/lldb-linux-x86_64/bindings --cfgBldDir=/usr/local/google/home/marcrasi/swift-base-master/build/Ninja-ReleaseAssert/lldb-linux-x86_64/bindings --prefix=/usr/local/google/home/marcrasi/swift-base-master/build/Ninja-ReleaseAssert/lldb-linux-x86_64 --swig-executable=/usr/bin/swig3.0
ERROR:root:swig failed with error code 1: stdout=, stderr=Unable to find file '/usr/local/google/home/marcrasi/swift-base-master/llvm-project/lldb/bindings/lldb.swig'.
ERROR:root:command line:
/usr/bin/swig3.0 -c++ -shadow -python -features autodoc -threads -I/usr/local/google/home/marcrasi/swift-base-master/llvm-project/lldb/include -I. -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -outdir /usr/local/google/home/marcrasi/swift-base-master/build/Ninja-ReleaseAssert/lldb-linux-x86_64/bindings -o /usr/local/google/home/marcrasi/swift-base-master/build/Ninja-ReleaseAssert/lldb-linux-x86_64/bindings/LLDBWrapPython.cpp /usr/local/google/home/marcrasi/swift-base-master/llvm-project/lldb/bindings/lldb.swig
[13/924][ 1%][4.147s] Building CXX object source/Breakpoint/CMakeFiles/lldbBreakpoint.dir/Breakpoint.cpp.o
ninja: build stopped: subcommand failed.
ERROR: command terminated with a non-zero exit status 1, aborting
I can fix it by copying llvm-project/lldb/bindings/python.swig
to llvm-project/lldb/bindings/lldb.swig
, but I guess this isn't the right thing to do.
Am I doing something wrong, or is there a bug in the build that needs to be fixed?
Perhaps a different version of swig would help? My current version is:
> swig3.0 -version
SWIG Version 3.0.12
Compiled with g++ [x86_64-pc-linux-gnu]
Configured options: +pcre
Please see http://www.swig.org for reporting bugs and further information