Skip to content

Conversation

mgorny
Copy link
Member

@mgorny mgorny commented Aug 29, 2024

Install scan-build-py modules into the plain lib directory, without LLVM_LIBDIR_SUFFIX appended, to match the path expected by intercept-build executable. This fixes the program being unable to find its modules. Using unsuffixed path makes sense here, since Python modules are not subject to multilib.

This change effectively reverts 1334e12. The commit in question changed the path without a clear justification ("does not respect the given prefix") and the Python code was never modified to actually work with the change.

Install scan-build-py modules into the plain `lib` directory,
without LLVM_LIBDIR_SUFFIX appended, to match the path expected
by `intercept-build` executable.  This fixes the program being unable
to find its modules.  Using unsuffixed path makes sense here, since
Python modules are not subject to multilib.

This change effectively reverts 1334e12.
The commit in question changed the path without a clear justification
("does not respect the given prefix") and the Python code was never
modified to actually work with the change.
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Aug 29, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 29, 2024

@llvm/pr-subscribers-clang

Author: Michał Górny (mgorny)

Changes

Install scan-build-py modules into the plain lib directory, without LLVM_LIBDIR_SUFFIX appended, to match the path expected by intercept-build executable. This fixes the program being unable to find its modules. Using unsuffixed path makes sense here, since Python modules are not subject to multilib.

This change effectively reverts 1334e12. The commit in question changed the path without a clear justification ("does not respect the given prefix") and the Python code was never modified to actually work with the change.


Full diff: https://github.com/llvm/llvm-project/pull/106612.diff

1 Files Affected:

  • (modified) clang/tools/scan-build-py/CMakeLists.txt (+3-3)
diff --git a/clang/tools/scan-build-py/CMakeLists.txt b/clang/tools/scan-build-py/CMakeLists.txt
index 3aca22c0b0a8d3..9273eb5ed977e4 100644
--- a/clang/tools/scan-build-py/CMakeLists.txt
+++ b/clang/tools/scan-build-py/CMakeLists.txt
@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
   install(FILES lib/libscanbuild/${lib}
-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
+          DESTINATION lib/libscanbuild
           COMPONENT scan-build-py)
 endforeach()
 
@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
   install(FILES lib/libscanbuild/resources/${resource}
-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources
+          DESTINATION lib/libscanbuild/resources
           COMPONENT scan-build-py)
 endforeach()
 
@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
                      DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
   list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
   install(FILES lib/libear/${lib}
-          DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear
+          DESTINATION lib/libear
           COMPONENT scan-build-py)
 endforeach()
 

list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
install(FILES lib/libscanbuild/${lib}
DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
DESTINATION lib/libscanbuild
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mgorny added a commit that referenced this pull request Aug 30, 2024
Install scan-build-py modules into the plain `lib` directory,
without LLVM_LIBDIR_SUFFIX appended, to match the path expected
by `intercept-build` executable.  This fixes the program being unable
to find its modules.  Using unsuffixed path makes sense here, since
Python modules are not subject to multilib.

This change effectively reverts 1334e12.
The commit in question changed the path without a clear justification
("does not respect the given prefix") and the Python code was never
modified to actually work with the change.

Fixes #106608
@mgorny mgorny closed this Aug 30, 2024
llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 31, 2024
Install scan-build-py modules into the plain `lib` directory,
without LLVM_LIBDIR_SUFFIX appended, to match the path expected
by `intercept-build` executable.  This fixes the program being unable
to find its modules.  Using unsuffixed path makes sense here, since
Python modules are not subject to multilib.

This change effectively reverts 1334e12.
The commit in question changed the path without a clear justification
("does not respect the given prefix") and the Python code was never
modified to actually work with the change.

Fixes llvm#106608

(cherry picked from commit 0c4cf79)
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Sep 1, 2024
Install scan-build-py modules into the plain `lib` directory,
without LLVM_LIBDIR_SUFFIX appended, to match the path expected
by `intercept-build` executable.  This fixes the program being unable
to find its modules.  Using unsuffixed path makes sense here, since
Python modules are not subject to multilib.

This change effectively reverts 1334e12.
The commit in question changed the path without a clear justification
("does not respect the given prefix") and the Python code was never
modified to actually work with the change.

Fixes llvm#106608

(cherry picked from commit 0c4cf79)
milkice233 pushed a commit to fedora-riscv/llvm that referenced this pull request Jan 22, 2025
llvm/llvm-project#106612 moved these
from lib64 to lib, so look for them there.
justinkb pushed a commit to justinkb/llvm-project that referenced this pull request Apr 14, 2025
Install scan-build-py modules into the plain `lib` directory,
without LLVM_LIBDIR_SUFFIX appended, to match the path expected
by `intercept-build` executable.  This fixes the program being unable
to find its modules.  Using unsuffixed path makes sense here, since
Python modules are not subject to multilib.

This change effectively reverts 1334e12.
The commit in question changed the path without a clear justification
("does not respect the given prefix") and the Python code was never
modified to actually work with the change.

Fixes llvm#106608

(cherry picked from commit 0c4cf79)
justinkb pushed a commit to justinkb/llvm-project that referenced this pull request Jun 18, 2025
Install scan-build-py modules into the plain `lib` directory,
without LLVM_LIBDIR_SUFFIX appended, to match the path expected
by `intercept-build` executable.  This fixes the program being unable
to find its modules.  Using unsuffixed path makes sense here, since
Python modules are not subject to multilib.

This change effectively reverts 1334e12.
The commit in question changed the path without a clear justification
("does not respect the given prefix") and the Python code was never
modified to actually work with the change.

Fixes llvm#106608

(cherry picked from commit 0c4cf79)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants