Skip to content

[clang] intercept-build can't find its Python modules on a lib64 system #106608

Closed
@mgorny

Description

@mgorny
$ intercept-build 
Traceback (most recent call last):
  File "/usr/lib/llvm/20/bin/intercept-build", line 13, in <module>
    from libscanbuild.intercept import intercept_build
ModuleNotFoundError: No module named 'libscanbuild'

As the OP pointed out, the code appends a hardcoded lib directory:

this_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(os.path.dirname(this_dir), 'lib'))

However, the files are installed in suffixed lib directory:

install(FILES lib/libscanbuild/${lib}
DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
COMPONENT scan-build-py)

I'm going to submit a pull request changing the install directory to lib to match. Since these are just Python modules, they don't need multilib.

Original bug report: https://bugs.gentoo.org/938665

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions