Created attachment 1913293 [details] Fixes for swig-4.1.0 macro definition correction I am testing rebuild of SWIG dependencies against upcoming version 4.1.0 in Fedora rawhide/38. The test of lldb-15.0.0 is failing with this version. There are 2 things which need to be fixed: 1) cd /builddir/build/BUILD/lldb-15.0.0.src/redhat-linux-build/bindings/python && /usr/bin/swig -c++ -features autodoc -I/builddir/build/BUILD/lldb-15.0.0.src/include -I/builddir/build/BUILD/lldb-15.0.0.src/bindings -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/builddir/build/BUILD/lldb-15.0.0.src/bindings/python -c++ -shadow -python -py3 -threads -outdir /builddir/build/BUILD/lldb-15.0.0.src/redhat-linux-build/bindings/python -o /builddir/build/BUILD/lldb-15.0.0.src/redhat-linux-build/bindings/python/LLDBWrapPython.cpp /builddir/build/BUILD/lldb-15.0.0.src/bindings/python/python.swig Deprecated command line option: -py3. Ignored, this option is no longer supported. /builddir/build/BUILD/lldb-15.0.0.src/bindings/interfaces.swig:5: Error: Macro '__STDC_LIMIT_MACROS' redefined, :1: Error: previous definition of '__STDC_LIMIT_MACROS'. For more information see https://github.com/swig/swig/issues/2193 This patch is backwards compatible with older versions of SWIG.
Created attachment 1913295 [details] Fix 'error: non-const lvalue...' caused by SWIG 4.1.0 2) /builddir/build/BUILD/lldb-15.0.0.src/redhat-linux-build/bindings/python/LLDBWrapPython.cpp:22100:19: error: non-const lvalue reference to type 'lldb::FileSP' (aka 'shared_ptr<lldb_private::File>') cannot bind to a value of unrelated type 'SwigValueWrapper<std::shared_ptr<lldb_private::File>>' lldb::FileSP &sp = result; ^ ~~~~~~ /builddir/build/BUILD/lldb-15.0.0.src/redhat-linux-build/bindings/python/LLDBWrapPython.cpp:22140:19: error: non-const lvalue reference to type 'lldb::FileSP' (aka 'shared_ptr<lldb_private::File>') cannot bind to a value of unrelated type 'SwigValueWrapper<std::shared_ptr<lldb_private::File>>' lldb::FileSP &sp = result; ^ ~~~~~~ /builddir/build/BUILD/lldb-15.0.0.src/redhat-linux-build/bindings/python/LLDBWrapPython.cpp:22180:19: error: non-const lvalue reference to type 'lldb::FileSP' (aka 'shared_ptr<lldb_private::File>') cannot bind to a value of unrelated type 'SwigValueWrapper<std::shared_ptr<lldb_private::File>>' lldb::FileSP &sp = result; ^ ~~~~~~ /builddir/build/BUILD/lldb-15.0.0.src/redhat-linux-build/bindings/python/LLDBWrapPython.cpp:30742:19: error: non-const lvalue reference to type 'lldb::FileSP' (aka 'shared_ptr<lldb_private::File>') cannot bind to a value of unrelated type 'SwigValueWrapper<std::shared_ptr<lldb_private::File>>' lldb::FileSP &sp = result; ^ ~~~~~~ 4 errors generated. More information about source of the issue: https://github.com/swig/swig/issues/2377#issuecomment-1252878976 This patch is backwards compatible with older versions of SWIG.
https://github.com/llvm/llvm-project/issues/58018#issuecomment-1260702467 Tom, could you please submit patches to upstream?
Patch submitted for review upstream https://reviews.llvm.org/D134877
Could you please submit also the second patch `Fix 'error: non-const lvalue...' caused by SWIG 4.1.0`?
Both patch landed upstream. @jplesnik do you need these patches to land in rawhide?
For future reference, patches landed as https://github.com/llvm/llvm-project/commit/f0a25fe0b746f56295d5c02116ba28d2f965c175 and https://github.com/llvm/llvm-project/commit/81fc5f7909a4ef5a8d4b5da2a10f77f7cb01ba63 .
The patches will be needed for rebuild of lldb when SWIG 4.1.0 appears in Fedora rawhide. It will be probably in October.
https://src.fedoraproject.org/rpms/lldb/pull-request/55
FEDORA-2022-a3b896c199 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-a3b896c199
FEDORA-2022-a3b896c199 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
Built as lldb-15.0.0-2.fc38, should be in rawhide anytime soon.