Compilation error in CI when building Konqueror for KF6 on linux

Stefano Crocco stefano.crocco at alice.it
Sun Oct 8 21:51:49 BST 2023


On domenica 8 ottobre 2023 21:49:30 CEST Albert Astals Cid wrote:
> El diumenge, 8 d’octubre de 2023, a les 18:20:00 (CEST), Stefano Crocco va
> 
> escriure:
> > Hello to everyone,
> > I successfully ported Konqueror to KF6, at least to the point that, on my
> > system, it compiles correctly. However, when the CI tries to build it on
> 
> > linux, it fails with the following error:
> Which branch is that?
> 
> Cheers,
>   Albert

It's MR 237 for the kf6 branch: https://invent.kde.org/network/konqueror/-/
merge_requests/237

Stefano

> 
> > /usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld:
> > ../../lib/libkcm_konqhtml_static.a(mocs_compilation.cpp.o): relocation
> > R_X86_64_32S against `.rodata' can not be used when making a shared
> > object;
> > recompile with -fPIC
> > 
> > The full build log is in the attachment; the error is on line 1674.
> > 
> > This error doesn't happen when I try to compile Konqueror on my system,
> > which seems to have the same gcc version as the CI and doesn't happen on
> > the CI with freebsd and with the KF5 version, despite the fact that the,
> > as
> > far as I can tell, involved code hasn't changed.
> > 
> > It seems that the error comes from the attempt to link several plugins
> > (actually KCMs) to a static library (kcm_konqhtml_static).
> > 
> > Searching on Google, I found that the suggested solution for this kind of
> > error is to add the -fPIC compilation flag when building the static
> > library. I tried to do so and it worked but I'd like to understand
> > whether this actually is the correct solution and why the issue only
> > happens on the CI linux build for KF6 and not on the CI builds for KF5,
> > on the CI freebsd build for KF6 and on my system. Can anyone give me some
> > hints about this?
> > 
> > Thanks in advance
> > 
> > Stefano






More information about the kde-devel mailing list