Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 730620 - dev-qt/qt-creator-4.8.2 fails to build, cannot find clang libs
Summary: dev-qt/qt-creator-4.8.2 fails to build, cannot find clang libs
Status: RESOLVED DUPLICATE of bug 711788
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Davide Pesavento
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-03 18:26 UTC by Blake Leverett
Modified: 2020-07-04 20:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Output of emerge --info (einfo,5.79 KB, text/plain)
2020-07-03 18:26 UTC, Blake Leverett
Details
The patch from bug#711788, adapted it to the 4.8.2 codebase (qt-creator-4.8.0-dylib-fix.patch,1.66 KB, patch)
2020-07-04 20:47 UTC, Marco Leogrande
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Blake Leverett 2020-07-03 18:26:14 UTC
Created attachment 647496 [details]
Output of emerge --info

Build fails, log shows these failures when linking:

x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -Wl,-z,origin '-Wl,-rpath,$ORIGIN:$ORIGIN/..:$ORIGIN/../lib64/qtcreator' -Wl,--no-undefined -Wl,-z,origin -Wl,-rpath,/usr/lib/llvm/10/lib64 -Wl,--exclude-libs,ALL -shared -Wl,-soname,libClangFormat.so -o libClangFormat.so .obj/release-shared/clangformatconfigwidget.o .obj/release-shared/clangformatindenter.o .obj/release-shared/clangformatplugin.o .obj/release-shared/clangformatutils.o .obj/release-shared/moc_clangformatconfigwidget.o .obj/release-shared/moc_clangformatplugin.o  -L/mnt/spinner/tmp/portage/dev-qt/qt-creator-4.8.2/work/qt-creator-opensource-src-4.8.2/lib64/qtcreator -L/mnt/spinner/tmp/portage/dev-qt/qt-creator-4.8.2/work/qt-creator-opensource-src-4.8.2/lib64/qtcreator/plugins -lCppTools -lProjectExplorer -lTextEditor -lCore -lCPlusPlus -lQtcSsh -lAggregation -lExtensionSystem -lUtils -L/usr/lib/llvm/10/lib64 -lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic -lLLVM-10 /usr/lib64/libQt5Widgets.so /usr/lib64/libQt5Gui.so /usr/lib64/libQt5Concurrent.so /usr/lib64/libQt5Network.so /usr/lib64/libQt5Core.so -lGL -lpthread    
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lclangFormat
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lclangToolingInclusions
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lclangToolingCore
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lclangRewrite
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lclangLex
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lclangBasic
collect2: error: ld returned 1 exit status
Comment 1 Blake Leverett 2020-07-03 20:35:03 UTC
qt-creator build cannot find 
/usr/lib/llvm/10/lib64/libclangFormat.so

The just-installed version of sys-devel/clang-10.0.0 installed these files:
/usr/lib/llvm/9/lib64/libclangFormat.so
/usr/lib/llvm/9/lib64/libclangFormat.so.9

So maybe this is a problem with sys-devel/clang, not qt-creator.
Comment 2 Blake Leverett 2020-07-03 21:16:12 UTC
I added symlinks to the missing files in /usr/lib/llvm/10/lib64 to the versions present in /usr/lib/llvm/9/lib64.  Then qt-creator will emerge successfully. It seems to run OK.
After finishing the emerge of qt-creator, emerge --depclean  removed sys-devel/llvm-9.0.1, so now the missing library files are once again gone.

In any case, I got it to emerge, so problem solved for now.

I found this mention of the problem at
https://bugs.archlinux.org/task/66283

upgpkg: clang 10.0.0-1: new upstream release; switch to libclang-cpp

We no longer build with BUILD_SHARED_LIBS=ON; programs linking to clang
are required to link to libclang-cpp.so instead of individual libraries.

Gentoo and Fedora have moved in this direction as well, with the latter
being documented at https://bugzilla.redhat.com/show_bug.cgi?id=1787375.
Comment 3 hagar-dunor 2020-07-03 21:39:17 UTC
Joining the "me too" bandwagon
Comment 4 Marco Leogrande 2020-07-04 20:46:19 UTC
I borrowed the patch from bug#711788 and adapted it to the 4.8.2 codebase. It builds fine and it seems to work.
Comment 5 Marco Leogrande 2020-07-04 20:47:43 UTC
Created attachment 647606 [details, diff]
The patch from bug#711788, adapted it to the 4.8.2 codebase
Comment 6 Andreas Sturmlechner gentoo-dev 2020-07-04 20:57:41 UTC

*** This bug has been marked as a duplicate of bug 711788 ***