two version of llvm (3.8 and 4.0) give dependencies problem with Kdevelop

Asked by Jacopo Schiavon

I have Neon KDE OS (user LTS version, which is built upon Ubuntu 16.04 and Plasma 5.8.1).

I cannot use Kdevelop anymore, and discussing with the guys of Kde bugs I have understood that the problem is in the llvm package: apparently, I have both the 4.0 and 3.8 version installed, and then conflicts arises.

Are there some possibilities that the problem is related to the packaging?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

lsb_release -a; uname -a; apt-cache policy llvm

Thanks

Revision history for this message
Jacopo Schiavon (smitey21) said :
#2

Sorry, it is my wok pc and I had not access until now!
anyway:

:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

:~$ uname -a
Linux smitey-lenovo 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

:~$ apt-cache policy llvm
llvm:
  Installato: (nessuno)
  Candidato: 1:3.8-33ubuntu3.1
  Tabella versione:
     1:3.8-33ubuntu3.1 500
        500 http://it.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
     1:3.8-33ubuntu3 500
        500 http://it.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

I speak a little Italian but it appears it's not installed (nessun).

Parlo un po' d'italiano. vengo dall inghileterra :-)

How did you install version 4.0?

Thanks

Revision history for this message
Jacopo Schiavon (smitey21) said :
#4

I haven't!

I just apt update && apt upgrade, yesterday... And then it was like this! When I try to remove llvm 4.0 it gives me a lot of:

Broken phonon-backend-gstreamer:amd64 Dipende on libqt4-opengl [ amd64 ] < 4:4.8.7+dfsg-5ubuntu2 > ( libs ) (>= 4:4.8.1)
  Considering libqt4-opengl:amd64 9 as a solution to phonon-backend-gstreamer:amd64 1
  Holding Back phonon-backend-gstreamer:amd64 rather than change libqt4-opengl:amd64

and the process terminate without removing it.

PS: I don't have problems with english, don't worry! Sure I'm not as fluent as I'd like, but I might understand fairly! :D

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

What is the output of:

apt-cache policy libqt4-opengl phonon-backend-gstreamer:amd64 libqt4-opengl:amd64

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Just an additional explanation:

There are packages in Ubuntu xenial with name llvm and llvm-runtime which are version 3.8, They depend on packages with names like llvm-3.8 and libllvm3.8. The all give the 3.8 version.

Additionally there are packages with names like llvm-4.0 and libllvm4.0 giving the 4.0 versions.

As far as I know both families should be installable at the same time.

Please provide the output of the command
dpkg -l | grep llvm

Revision history for this message
Jacopo Schiavon (smitey21) said :
#7

Thank you all for your help!
In the end, I probably will reinstall the OS, because of other reasons, but I'm interested in this question anyway:

:~$ apt-cache policy libqt4-opengl phonon-backend-gstreamer:amd64 libqt4-opengl:amd64
libqt4-opengl:
  Installato: 4:4.8.7+dfsg-5ubuntu2
  Candidato: 4:4.8.7+dfsg-5ubuntu2
  Tabella versione:
 *** 4:4.8.7+dfsg-5ubuntu2 500
        500 http://it.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
phonon-backend-gstreamer:
  Installato: (nessuno)
  Candidato: 4:4.9.0+p16.04+git20161128.1627-0
  Tabella versione:
     4:4.9.0+p16.04+git20161128.1627-0 500
        500 http://archive.neon.kde.org/user/lts xenial/main amd64 Packages
     4:4.8.2-0ubuntu2 500
        500 http://it.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
libqt4-opengl:
  Installato: 4:4.8.7+dfsg-5ubuntu2
  Candidato: 4:4.8.7+dfsg-5ubuntu2
  Tabella versione:
 *** 4:4.8.7+dfsg-5ubuntu2 500
        500 http://it.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

:~$ dpkg -l | grep llvm
ii libllvm3.8:amd64 1:3.8-2ubuntu4 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm4.0:amd64 1:4.0-1ubuntu1~16.04.2 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm4.0:i386 1:4.0-1ubuntu1~16.04.2 i386 Modular compiler and toolchain technologies, runtime library
ii libllvm4.0-dbg:amd64 1:4.0-1ubuntu1~16.04.2 amd64 Modular compiler and toolchain technologies, debugging libraries

I'm not sure of what your answer (Manfred) means: why both families should be installed at the same time? Don't they are the "same" thing, just an upgraded version? (please note that I'm by no mean critical to you all's work, I'm just curious)

Revision history for this message
Jacopo Schiavon (smitey21) said :
#8

Ok, I have reinstalled the OS and the problem appears identical!

Infact, I made sure that LLVM 3.8 was *not* installed, but only 4.0 existed. Then, I tried to install Kdevelop and it comes with 3.8 packaged, which makes him crash.

I'm sorry for not being much useful, I'm not really pro with this problems...

BTW, I'm linking this question to the guys of KDE bugs, so that they can follow the developments.

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

In my previous message I wanted to tell that accoring to my experience the llvm libraries in versions 3.8 and 4.0 can be installed at the same time, and they should not interfere.

And yes, they are "similar things in different versions" but special in the way that you can have both at the same time.

If kdevelop crashes, is there any useful error message with that?

Revision history for this message
Jacopo Schiavon (smitey21) said :
#10

IDK if it is useful, I can paste here the backtrace of the error:

Application: kdevelop (5.1.1)

Qt Version: 5.7.1
Frameworks Version: 5.36.0
Operating System: Linux 4.10.0-28-generic x86_64
Distribution: Ubuntu 16.04.3 LTS

#6 0x00007fa2ad00a51e in llvm::SmallVectorTemplateBase<llvm::cl::parser<llvm::ScheduleDAGInstrs* (*)(llvm::MachineSchedContext*)>::OptionInfo, false>::grow(unsigned long) () at /build/llvm-toolchain-4.0-kQlgQb/llvm-toolchain-4.0-4.0/include/llvm/Support/CommandLine.h:729
#7 0x00007fa2ad00a60e in llvm::RegisterPassParser<llvm::MachineSchedRegistry>::NotifyAdd(llvm::StringRef, void* (*)(), llvm::StringRef) () at /build/llvm-toolchain-4.0-kQlgQb/llvm-toolchain-4.0-4.0/include/llvm/ADT/SmallVector.h:213
#8 0x00007fa295afcb0a in llvm::MachineSchedRegistry::MachineSchedRegistry (C=0x7fa295e70df0 <useDefaultMachineSched(llvm::MachineSchedContext*)>, D=0x7fa29711e090 "Use the target's default scheduler choice.", N=0x7fa29716fc5f "default", this=0x7fa297fda4e0 <DefaultSchedRegistry>) at /build/llvm-toolchain-3.8-_PD09B/llvm-toolchain-3.8-3.8/include/llvm/CodeGen/MachineScheduler.h:128
#9 __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /build/llvm-toolchain-3.8-_PD09B/llvm-toolchain-3.8-3.8/lib/CodeGen/MachineScheduler.cpp:214
#10 _GLOBAL__sub_I_MachineScheduler.cpp(void) () at /build/llvm-toolchain-3.8-_PD09B/llvm-toolchain-3.8-3.8/lib/CodeGen/MachineScheduler.cpp:3413
#11 0x00007fa2e13116ba in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fff00182688, env=env@entry=0x7fff00182698) at dl-init.c:72
#12 0x00007fa2e13117cb in call_init (env=0x7fff00182698, argv=0x7fff00182688, argc=1, l=<optimized out>) at dl-init.c:30
#13 _dl_init (main_map=main_map@entry=0x2ba8230, argc=1, argv=0x7fff00182688, env=0x7fff00182698) at dl-init.c:120
#14 0x00007fa2e13168e2 in dl_open_worker (a=a@entry=0x7fff00180ec0) at dl-open.c:575
#15 0x00007fa2e1311564 in _dl_catch_error (objname=objname@entry=0x7fff00180eb0, errstring=errstring@entry=0x7fff00180eb8, mallocedp=mallocedp@entry=0x7fff00180eaf, operate=operate@entry=0x7fa2e13164d0 <dl_open_worker>, args=args@entry=0x7fff00180ec0) at dl-error.c:187
#16 0x00007fa2e1315da9 in _dl_open (file=0x2d5c7c8 "/usr/lib/x86_64-linux-gnu/qt5/plugins/kdevplatform/27/kdevclangsupport.so", mode=-2147483647, caller_dlopen=0x7fa2df37f260 <QLibraryPrivate::load_sys()+1760>, nsid=-2, argc=<optimized out>, argv=<optimized out>, env=0x7fff00182698) at dl-open.c:660
#17 0x00007fa2d6935f09 in dlopen_doit (a=a@entry=0x7fff001810f0) at dlopen.c:66
#18 0x00007fa2e1311564 in _dl_catch_error (objname=0x18e4a90, errstring=0x18e4a98, mallocedp=0x18e4a88, operate=0x7fa2d6935eb0 <dlopen_doit>, args=0x7fff001810f0) at dl-error.c:187
#19 0x00007fa2d6936571 in _dlerror_run (operate=operate@entry=0x7fa2d6935eb0 <dlopen_doit>, args=args@entry=0x7fff001810f0) at dlerror.c:163
#20 0x00007fa2d6935fa1 in __dlopen (file=<optimized out>, mode=mode@entry=1) at dlopen.c:87
#21 0x00007fa2df37f260 in QLibraryPrivate::load_sys (this=0x2801cb0) at plugin/qlibrary_unix.cpp:233
#22 0x00007fa2df378695 in QLibraryPrivate::load (this=0x2801cb0) at plugin/qlibrary.cpp:538
#23 QLibraryPrivate::loadPlugin (this=0x2801cb0) at plugin/qlibrary.cpp:591
#24 0x00007fa2df36ba96 in QPluginLoader::load (this=<optimized out>) at plugin/qpluginloader.cpp:238
#25 0x00007fa2e01ae28a in KPluginLoader::load (this=0x7fff00181580) at /workspace/build/src/lib/plugin/kpluginloader.cpp:184
#26 0x00007fa2e01ae3ba in KPluginLoader::instance (this=<optimized out>) at /workspace/build/src/lib/plugin/kpluginloader.cpp:166
#27 0x00007fa2e01ae40c in KPluginLoader::factory (this=<optimized out>) at /workspace/build/src/lib/plugin/kpluginloader.cpp:111
#28 0x00007fa2e0fd6bde in KDevelop::PluginController::loadPluginInternal(QString const&) () from /usr/lib/x86_64-linux-gnu/libKDevPlatformShell.so.10
#29 0x00007fa2e0fd89ab in KDevelop::PluginController::allPluginsForExtension(QString const&, QMap<QString, QVariant> const&) () from /usr/lib/x86_64-linux-gnu/libKDevPlatformShell.so.10
#30 0x00007fa2e1018ab9 in KDevelop::LanguageController::languagesForMimetype(QString const&) () from /usr/lib/x86_64-linux-gnu/libKDevPlatformShell.so.10
#31 0x00007fa2e1019522 in KDevelop::LanguageController::languagesForUrl(QUrl const&) () from /usr/lib/x86_64-linux-gnu/libKDevPlatformShell.so.10
#32 0x00007fa2dcbc2ce3 in ?? () from /usr/lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.10
#33 0x00007fa2dcbc5c81 in ?? () from /usr/lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.10
#34 0x00007fa2dcbbfa04 in KDevelop::BackgroundParser::parseDocuments() () from /usr/lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.10
#35 0x00007fa2df3ae1f6 in QtPrivate::QSlotObjectBase::call (a=0x7fff00181cd0, r=0x1c8c700, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#36 QMetaObject::activate (sender=sender@entry=0x1c8c800, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3723
#37 0x00007fa2df3ae837 in QMetaObject::activate (sender=sender@entry=0x1c8c800, m=m@entry=0x7fa2df5c8700 <QTimer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#38 0x00007fa2df426b50 in QTimer::timeout (this=this@entry=0x1c8c800) at .moc/moc_qtimer.cpp:198
#39 0x00007fa2df3ba7a8 in QTimer::timerEvent (this=0x1c8c800, e=<optimized out>) at kernel/qtimer.cpp:254
#40 0x00007fa2df3aed53 in QObject::event (this=0x1c8c800, e=<optimized out>) at kernel/qobject.cpp:1285
#41 0x00007fa2dfc61ecc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1c8c800, e=0x7fff00181ff0) at kernel/qapplication.cpp:3799
#42 0x00007fa2dfc698c6 in QApplication::notify (this=0x7fff00182430, receiver=0x1c8c800, e=0x7fff00181ff0) at kernel/qapplication.cpp:3556
#43 0x00007fa2df3830c8 in QCoreApplication::notifyInternal2 (receiver=0x1c8c800, event=event@entry=0x7fff00181ff0) at kernel/qcoreapplication.cpp:988
#44 0x00007fa2df3d568e in QCoreApplication::sendEvent (event=0x7fff00181ff0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#45 QTimerInfoList::activateTimers (this=0x193d7c0) at kernel/qtimerinfo_unix.cpp:644
#46 0x00007fa2df3d5bf9 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:182
#47 idleTimerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:229
#48 0x00007fa2d666e197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007fa2d666e3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#50 0x00007fa2d666e49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#51 0x00007fa2df3d673f in QEventDispatcherGlib::processEvents (this=0x1941b80, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#52 0x00007fa2df3810ba in QEventLoop::exec (this=this@entry=0x7fff00182240, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#53 0x00007fa2df3896cc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#54 0x000000000040bb96 in main (argc=1, argv=<optimized out>) at /workspace/build/app/main.cpp:763

Revision history for this message
Sven (mail-sw) said :
#11

To clarify, the above trace shows that both llvm-3.8 and llvm-4.0 are loaded, which leads to the crash, and must never happen in a correct setup. We have had more than one user show up with this issue on Ubuntu recently.

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

As an additional piece of information for diagnostic purposes, what is the output of

apt-cache policy kdevelop

Revision history for this message
Jacopo Schiavon (smitey21) said :
#13

kdevelop:
  Installato: 4:5.1.1-0neon+16.04+xenial+build18
  Candidato: 4:5.1.1-0neon+16.04+xenial+build18
  Tabella versione:
 *** 4:5.1.1-0neon+16.04+xenial+build18 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     4:5.1.0-0neon+16.04+build17 500
        500 http://archive.neon.kde.org/user xenial/main amd64 Packages
     4:4.7.3-0ubuntu1 500
        500 http://it.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

This is a repository managed by KDE, and not the Ubuntu-provided one.
Please ask at the KDE pages (maybe https://forum.kde.org/ )

This is the right address only if the Ubuntu-provided version exhibits the same problem.

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#15

Rephrasing my last message to make it more clear:

You are using a repository managed by KDE, and not the Ubuntu-provided one.
Please ask at the KDE pages (maybe https://forum.kde.org/ )

This Launchpad question page is the right address only if the Ubuntu-provided version exhibits the same problem.

Revision history for this message
Jacopo Schiavon (smitey21) said :
#16

Well, thank you!

In reality I was coming from there!

I think I will simply change toward another IDE :)

Revision history for this message
Jacopo Schiavon (smitey21) said :
#17

Thanks Manfred Hampl, that solved my question.

Revision history for this message
Manfred Hampl (m-hampl) said :
#18

Other workarounds that eventually might help:

1. upgrade to Ubuntu 17.04
2. install kdevelop 5.1.1 from an Ubuntu PPA
3. install the llvm packages from an Ubuntu PPA that provides a version with llvm and llvm-dev defaulting to version 4.0 e.g. ppa:jonathonf/llvm-defaults-4.0

Revision history for this message
Sven (mail-sw) said :
#19

Well, your report on bugs.kde.org said "Ubuntu packages" as the source :/
If it's packaged by Neon, then bugs.kde.org is the right place, but didn't reach the right people. I've updated your report there.

Revision history for this message
Manfred Hampl (m-hampl) said :
#20

For completeness' sake the reference to the KDE bug

https://bugs.kde.org/show_bug.cgi?id=383086