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

            Bug ID: 410237
           Summary: [dolphin] : link failure with the LLVM 5 toolchain
           Product: dolphin
           Version: 19.04.3
          Platform: Compiled Sources
                OS: Linux
            Status: REPORTED
          Severity: critical
          Priority: NOR
         Component: general
          Assignee: dolphin-bugs-n...@kde.org
          Reporter: rjvber...@gmail.com
                CC: elvis.angelac...@kde.org
  Target Milestone: ---

Created attachment 121744
  --> https://bugs.kde.org/attachment.cgi?id=121744&action=edit
CMake incantation and execution environment

SUMMARY
I configured dolphin 19.04.3 for building with the LLVM 5 toolchain (clang++-5
but also llvm-ar-5 and llvm-nm-5 as far as that's relevant).

For some reason this led to a link failure:
```
[100%] Linking CXX executable ../bin/dolphin
cd
/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-dolphin/kf5-dolphin/work/build/src
&& /opt/local/bin/cmake -E cmake_link_script CMakeFiles/dolphin.dir/link.txt
--verbose=ON
:info:build /opt/local/bin/clang++-mp-5.0  -O3 -g -DNDEBUG
-isystem/opt/local/include -std=c++11 -m64 -std=c++0x -fno-operator-names
-fno-exceptions -DQT_NO_EXCEPTIONS -Wno-gnu-zero-variadic-macro-arguments -Wall
-Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long
-Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual
-Werror=return-type -Wvla -Wdate-time -pedantic 
-Wzero-as-null-pointer-constant  -Wl,--enable-new-dtags -Wl,--enable-new-dtags
-Wl,-rpath,/opt/local/lib -Wl,-rpath,/opt/local/libexec/qt5/lib -rdynamic
CMakeFiles/dolphin.dir/dolphin_autogen/mocs_compilation.cpp.o
CMakeFiles/dolphin.dir/dolphin_dummy.cpp.o  -o ../bin/dolphin
-Wl,-rpath,/opt/local/lib/x86_64-linux-gnu ../bin/libkdeinit5_dolphin.so
make[2]: Leaving directory
`/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-dolphin/kf5-dolphin/work/build'
[100%] Built target dolphinsearchboxtest
../bin/libkdeinit5_dolphin.so: undefined reference to
`DolphinViewActionHandler::createDirectoryTriggered()'
../bin/libkdeinit5_dolphin.so: undefined reference to
`DolphinView::tabRequested(QUrl const&, DolphinTabWidget::TabPlacement)'
../bin/libkdeinit5_dolphin.so: undefined reference to
`KItemModelBase::onSortRoleChanged(QByteArray const&, QByteArray const&, bool)'
../bin/libkdeinit5_dolphin.so: undefined reference to
`KItemListController::indexCloseToMousePressedPosition() const'
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
make[2]: *** [bin/dolphin] Error 1
make[2]: Leaving directory
`/opt/local/var/lnxports/build/_opt_local_site-ports_kf5_kf5-dolphin/kf5-dolphin/work/build'
make[1]: *** [src/CMakeFiles/dolphin.dir/all] Error 2
m
```


STEPS TO REPRODUCE
1. Configure as outlined in the attachments
2. invoke make

OBSERVED RESULT
The error above.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kernel 4.14.
KDE Frameworks Version: 5.60.0
Qt Version: 5.9.8

ADDITIONAL INFORMATION
Explicitly linking in libdolphinprivate solves the issue, in src/CMakeLists.txt
:

target_link_libraries(dolphin
    dolphinprivate
)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to