1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
From b607091c3982f6b84732fcf0c23c1c3f0054f203 Mon Sep 17 00:00:00 2001
From: Alexander Miller <alex.miller@gmx.de>
Date: Fri, 18 May 2018 22:43:25 +0200
Subject: [PATCH 1/2] Remove main.cpp from dolphinstatic_SRCS
Summary:
The file main.cpp is already in dolphin_SRCS and doesn't
belong in dolphinstatic_SRCS.
Normally the duplicate object is simply ignored, but with
link time optimization (LTO), linking dolphin can fail.
Apparently, the compiler tries to inline inline kdemain()
in this case. That is undesirable anyway and it ultimately
fails because the DBusInterface definition is not available:
.../ccHEv6cl.ltrans0.ltrans.o: In function `DBusInterface::~DBusInterface()':
<artificial>:(.text+0x2583): undefined reference to `vtable for DBusInterface'
.../ccHEv6cl.ltrans0.ltrans.o: In function `DBusInterface::~DBusInterface()':
<artificial>:(.text+0x5aa3): undefined reference to `vtable for DBusInterface'
.../ccHEv6cl.ltrans0.ltrans.o: In function `kdemain':
<artificial>:(.text+0x7686): undefined reference to `DBusInterface::DBusInterface()'
<artificial>:(.text+0x7b64): undefined reference to `vtable for DBusInterface'
collect2: error: ld returned 1 exit status
See also <https://bugs.gentoo.org/655710>.
Reviewers: #dolphin, elvisangelaccio
Reviewed By: elvisangelaccio
Subscribers: elvisangelaccio, asturmlechner, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D12929
---
src/CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 263b3ff0c..e8fe719a4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -207,7 +207,6 @@ set(dolphinstatic_SRCS
dolphintabwidget.cpp
trash/dolphintrash.cpp
filterbar/filterbar.cpp
- main.cpp
panels/information/filemetadataconfigurationdialog.cpp
panels/information/informationpanel.cpp
panels/information/informationpanelcontent.cpp
--
2.17.0
From 8e6f4eecd318041d2e4e6386d1660742dd4ddd89 Mon Sep 17 00:00:00 2001
From: Alexander Miller <alex.miller@gmx.de>
Date: Fri, 18 May 2018 22:44:52 +0200
Subject: [PATCH 2/2] Make target_link_libraries for kdeinit_dolphin PRIVATE
Summary:
There is no need to add all of kdeinit_dolphin's
dependencies (including the static archive) when
linking dolphin; kdemain is the only needed symbol.
Mark the link libraries PRIVATE to simplify the
link command for dolphin.
Reviewers: #dolphin, elvisangelaccio
Reviewed By: elvisangelaccio
Subscribers: asturmlechner, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D12931
---
src/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e8fe719a4..beaa0ec50 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -299,7 +299,7 @@ ecm_add_app_icon(dolphin_SRCS ICONS ${ICONS_SRCS})
kf5_add_kdeinit_executable(dolphin ${dolphin_SRCS})
-target_link_libraries(kdeinit_dolphin
+target_link_libraries(kdeinit_dolphin PRIVATE
dolphinstatic
dolphinprivate
)
--
2.17.0
|