Compilation error in CI when building Konqueror for KF6 on linux
Stefano Crocco
stefano.crocco at alice.it
Sun Oct 8 17:20:00 BST 2023
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:
/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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_log
Type: application/octet-stream
Size: 151633 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20231008/860ed8e0/attachment-0001.obj>
More information about the kde-devel
mailing list