Bug 379142 - kdoctools fails when linking.
Summary: kdoctools fails when linking.
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kdoctools
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.33.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Documentation Editorial Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-24 00:48 UTC by R030t1
Modified: 2017-05-02 18:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
log-C_KDE.txt (17.93 KB, text/plain)
2017-04-24 00:48 UTC, R030t1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description R030t1 2017-04-24 00:48:28 UTC
Created attachment 105167 [details]
log-C_KDE.txt

`[28/28] Linking CXX executable bin\meinproc5.exe
FAILED: bin/meinproc5.exe
cmd.exe /C "cd . && R:\mingw64\bin\c++.exe  -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -W
char-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror
=return-type -Wvla -Wdate-time -fdiagnostics-color=always -pedantic -Wsuggest-override -O2 -g -DNDEBUG   src/CMakeFiles/
meinproc5.dir/meinproc.cpp.obj src/CMakeFiles/meinproc5.dir/meinproc_common.cpp.obj src/CMakeFiles/meinproc5.dir/xslt.cp
p.obj src/CMakeFiles/meinproc5.dir/xslt_kde.cpp.obj src/CMakeFiles/meinproc5.dir/loggingcategory.cpp.obj src/CMakeFiles/
meinproc5.dir/meinproc5_automoc.cpp.obj  -o bin\meinproc5.exe -Wl,--out-implib,lib\libmeinproc5.dll.a -Wl,--major-image-
version,0,--minor-image-version,0  R:/lib/libxml2.dll.a R:/lib/libxslt.dll.a R:/lib/libexslt.dll.a R://lib/libKF5Archive
.dll.a R://lib/libQt5Core.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladva
pi32 && cd ."
src/CMakeFiles/meinproc5.dir/meinproc.cpp.obj: In function `main':

Q:/kdoctools/src/meinproc.cpp:134: undefined reference to `__imp__ZN9KDocTools17setupStandardDirsERK7QString'

Q:/kdoctools/src/meinproc.cpp:198: undefined reference to `__imp__ZN9KDocTools23locateFileInDtdResourceERK7QString6QFlag
sIN14QStandardPaths12LocateOptionEE'

Q:/kdoctools/src/meinproc.cpp:213: undefined reference to `__imp__ZN9KDocTools9transformERK7QStringS2_RK7QVectorIPKcE'

Q:/kdoctools/src/meinproc.cpp:220: undefined reference to `__imp__ZN9KDocTools11saveToCacheERK7QStringS2_'

collect2.exe: error: ld returned 1 exit status

ninja: build stopped: subcommand failed.
Craft encountered an error: make cmd: ninja
Action: compile for frameworks/tier2/kdoctools FAILED
*** Craft all failed: all of frameworks/kdoctools failed after 0:00:14 ***
fatal error: package frameworks/kdoctools all failed`
Comment 1 Kevin Funk 2017-04-24 13:25:59 UTC
Looks like a valid issue in kdoctools.
Comment 2 Luigi Toscano 2017-04-24 13:32:47 UTC
Is it the last snapshot of KDocTools? I though that I fixed it with 
https://commits.kde.org/kdoctools/d2186e6786b3f717080a7b4b2264787a40f8d4a0

(also, even if meinproc5 does not work in new under-construction KDE CI, it compiles there at least).
Comment 3 R030t1 2017-04-24 21:03:57 UTC
I'm not sure how to check. Is this the first report of being unable to compile it? If it is I suppose it needs updated if Craft is pulling in an older version.
Comment 4 Luigi Toscano 2017-04-30 21:38:11 UTC
Nevermind, it's a legitimate issue (only on mingw, not on MSVC or plain gcc).
Thanks Hannah for the hints; I may have a patch here:
https://phabricator.kde.org/D5674
Comment 5 Luigi Toscano 2017-05-02 18:14:19 UTC
Git commit 86c5dd3baa3c4483fed1cea8fc140c18a9c27d0d by Luigi Toscano.
Committed on 02/05/2017 at 18:14.
Pushed by ltoscano into branch 'master'.

Solve a visibility conflict for meinproc5

Summary:
This seems to affect only mingw, which can't link meinproc5 as
the symbol exported affects in the sources shared with the
library affects the build (but not on gcc on *nix and with MSVC).

The other (probably better) solution would have been to split the
source code so that the sources of the libraries are separate, but
that would require more changes. As this seems to work, I'd prefer
to move the more complicated changes to "later".

Thanks to Hannah Von Reth for the hint.

Test Plan: Compiles with gcc 6.3 (Debian Testing), as before), with mingw (as deployed on current Craft) and with MSVC (2017) (the latter with less linking warnings so it was an issue there). All on x86_64.

Reviewers: vonreth

Reviewed By: vonreth

Subscribers: #frameworks, #documentation

Tags: #frameworks, #documentation, #windows

Differential Revision: https://phabricator.kde.org/D5674

M  +1    -0    src/CMakeLists.txt

https://commits.kde.org/kdoctools/86c5dd3baa3c4483fed1cea8fc140c18a9c27d0d