Bug 2185625 - qt-creator drop explicit dependency on clang-libs
Summary: qt-creator drop explicit dependency on clang-libs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qt-creator
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedFreezeException
Depends On:
Blocks: F38FinalFreezeException
TreeView+ depends on / blocked
 
Reported: 2023-04-10 15:50 UTC by Tom Stellard
Modified: 2023-04-20 19:15 UTC (History)
9 users (show)

Fixed In Version: qt-creator-9.0.1-7.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-11 23:36:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
undefined symbols in the clang format plugin (24.88 KB, text/plain)
2023-04-20 17:16 UTC, Marco Bubke
no flags Details

Description Tom Stellard 2023-04-10 15:50:01 UTC
qt-creator has a false dependency on clang-libs = 15.0.7 that should be removed.  It is no longer needed since qt-creator bundles its own version of clang.

Comment 1 Tom Stellard 2023-04-10 15:50:13 UTC
Fixed in update https://bodhi.fedoraproject.org/updates/FEDORA-2023-07c0c553a1.

Comment 2 Fedora Blocker Bugs Application 2023-04-10 15:51:30 UTC
Proposed as a Freeze Exception for 38-final by Fedora user tstellar using the blocker tracking app because:

 qt-creator has a false dependency on clang-libs =15.0.7, so it will fail to install once clang is updated to 16.0.0 in https://bodhi.fedoraproject.org/updates/FEDORA-2023-3a602914f6

Comment 3 Geoffrey Marr 2023-04-10 16:44:05 UTC
Discussed during the 2023-04-10 blocker review meeting: [0]

The decision to classify this bug as an "AcceptedFreezeException (Final)" was made to fix the fails-to-install problem in the frozen release repository.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2023-04-10/f38-blocker-review.2023-04-10-16.00.txt

Comment 4 Fedora Update System 2023-04-11 23:15:18 UTC
FEDORA-2023-07c0c553a1 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-07c0c553a1

Comment 5 Fedora Update System 2023-04-11 23:36:44 UTC
FEDORA-2023-07c0c553a1 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Marco Bubke 2023-04-20 17:16:30 UTC
Created attachment 1958631 [details]
undefined symbols in the clang format plugin

Comment 7 Marco Bubke 2023-04-20 17:17:44 UTC
Can it be that this bug fix broke the QtCreator ClangFormat plugin?

Comment 8 Tom Stellard 2023-04-20 17:33:55 UTC
Can you reproduce this if you have llvm-libs installed?

Comment 9 Marco Bubke 2023-04-20 17:45:04 UTC
llvm-libs are already installed. I tried the QtCreator version of F37 and got similar output. But there the plugin loader has no linking error. So maybe some other lib was providing the symbol.

/usr/lib64/qtcreator/plugins/libClangFormat.so: Cannot load library /usr/lib64/qtcreator/plugins/libClangFormat.so: (/usr/lib64/qtcreator/plugins/libClangFormat.so: undefined symbol: _ZN4llvm15SmallVectorBaseIjE13mallocForGrowEmmRm)

Comment 10 Marco Bubke 2023-04-20 17:49:23 UTC
I found this in the cmake files of QtCreator:

find_package(Clang CONFIG)

option(CLANGTOOLING_LINK_CLANG_DYLIB "Force linking of Clang tooling against clang-cpp" NO)

set(CLANG_FORMAT_LIB clangFormat)
if (TARGET clang-cpp AND CLANGTOOLING_LINK_CLANG_DYLIB)
  set(CLANG_FORMAT_LIB clang-cpp)
endif()

Comment 11 Marco Bubke 2023-04-20 17:59:56 UTC
The symbol is in: 
nm -D /usr/lib64/libLLVM-15.0.7.so |grep _ZN4llvm15SmallVectorBaseIjE13mallocForGrowEmmRm
0000000000bd3540 W _ZN4llvm15SmallVectorBaseIjE13mallocForGrowEmmRm@@LLVM_15

Comment 12 Marco Bubke 2023-04-20 18:12:26 UTC
Seems the symbol is also defined in:

/usr/lib64/libLLVMSupport.a:SmallVector.cpp.o:0000000000000000 W _ZN4llvm15SmallVectorBaseIjE13mallocForGrowEmmRm

I don't know if LLVM is linked dynamically or statically. I hope this help.

Comment 13 Tom Stellard 2023-04-20 18:49:51 UTC
I don't think the dependency changed caused this.  It's likely due to some kind of version mismatch between the plugin bundled with qt-creator, and whatever tools is trying to load it, maybe clang-format?  I'm not sure how these plugins work.

Comment 14 Marco Bubke 2023-04-20 19:15:36 UTC
The ClangFormat plugin of QtCreator is part of QtCreator. So a version mismatch is very unlikely. Very is very few functionality in QtCreator which is not a plugin. It is not using the clang-format binary but the libclangFormat.a from Clang. libclangFormat.a has other dependencies which can be statically or dynamically linked. Depends on the LLVM configuration. 

I looked into your build patches and ...

-DBUILD_PLUGIN_CLANGREFACTORING=ON 
-DBUILD_PLUGIN_CLANGPCHMANAGER=ON

This were very experimental plugins which should have been never be activated. Anyway they do no exists anymore.

Your qt-creator-clangformat.patch is missing clangSupport. Maybe more.

So you are right, there should be not anymore a dependency because it is statically linked.

Maybe you can push some of the patches upstream?


Note You need to log in before you can comment on or make changes to this bug.