Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt6: don't treat absolute paths without known suffix as library #367206

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkgs/development/libraries/qt-6/modules/qtbase/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ stdenv.mkDerivation rec {
./qmlimportscanner-import-path.patch
# don't pass qtbase's QML directory to qmlimportscanner if it's empty
./skip-missing-qml-directory.patch

# Qt treats linker flags without known suffix as libraries since 6.7.2 (see qt/qtbase commit ea0f00d).
# Don't do this for absolute paths (like `/nix/store/…/QtMultimedia.framework/Versions/A/QtMultimedia`).
# Upcoming upstream fix: https://codereview.qt-project.org/c/qt/qtbase/+/613683.
./dont-treat-abspaths-without-suffix-as-libraries.patch
];

postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/cmake/QtGenerateLibHelpers.cmake b/cmake/QtGenerateLibHelpers.cmake
index 96675267d2..c9d4a69497 100644
--- a/cmake/QtGenerateLibHelpers.cmake
+++ b/cmake/QtGenerateLibHelpers.cmake
@@ -10,7 +10,7 @@ function(qt_get_library_name_without_prefix_and_suffix out_var file_path)
if(NOT file_path MATCHES "^-") # not a linker flag
get_filename_component(basename "${file_path}" NAME_WE)
get_filename_component(ext "${file_path}" EXT)
- if(NOT ext) # seems like a library name without prefix and suffix
+ if(NOT ext AND NOT IS_ABSOLUTE "${file_path}")
# seems like a library name without prefix and suffix
set(${out_var} "${file_path}" PARENT_SCOPE)
return()
endif()
Loading