Bug 361275 - Compile time error: undefined reference while linking renamecustomizertest
Summary: Compile time error: undefined reference while linking renamecustomizertest
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-01 13:05 UTC by Lukáš Karas
Modified: 2017-08-19 20:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.0.0


Attachments
cmake log (11.31 KB, text/x-log)
2016-04-01 13:05 UTC, Lukáš Karas
Details
make log (328.43 KB, text/x-log)
2016-04-01 13:06 UTC, Lukáš Karas
Details
CMakeLists.txt patch that fixes build (1.54 KB, patch)
2016-04-01 13:07 UTC, Lukáš Karas
Details
Docker image based on ubuntu:xenial that help to reproduce compile problem (1.87 KB, text/plain)
2016-04-04 06:19 UTC, Lukáš Karas
Details
make log with docker image (570.11 KB, text/x-log)
2016-04-04 06:20 UTC, Lukáš Karas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukáš Karas 2016-04-01 13:05:09 UTC
When I try to compile digikam from git, it fails on linking renamecustomizertest:

[ 88%] Linking CXX executable renamecustomizertest
../../utilities/importui/libimportui.a(renamecustomizer.cpp.o): In function `Digikam::RenameCustomizer::RenameCustomizer(QWidget*, QString const&)':
/media/karry/data/src/digikam/utilities/importui/widgets/renamecustomizer.cpp:143: undefined reference to `Digikam::AdvancedRenameWidget::AdvancedRenameWidget(QWidget*)'

...and many more. See attached logs for more details

My current head is:
d3a20a0cd682dddcc6f9ff8f5990028232d845b5

Attached patch solves this problem. But I don't know if my fix is correct...

Reproducible: Always

Steps to Reproduce:
1. cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr .. 
2. make
Comment 1 Lukáš Karas 2016-04-01 13:05:57 UTC
Created attachment 98185 [details]
cmake log
Comment 2 Lukáš Karas 2016-04-01 13:06:19 UTC
Created attachment 98186 [details]
make log
Comment 3 Lukáš Karas 2016-04-01 13:07:42 UTC
Created attachment 98187 [details]
CMakeLists.txt patch that fixes build
Comment 4 Maik Qualmann 2016-04-01 20:00:55 UTC
Have you digiKam after this instructions compiled?

https://www.digikam.org/download?q=download/GIT

Maik
Comment 5 Lukáš Karas 2016-04-02 16:34:18 UTC
No. When I compile it by these instructions, it fails too. On linking renamecustomizertest...

Are you able to reproduce? I can try to prepare Docker image if you will have problems to reproduce this bug...
Comment 6 Maik Qualmann 2016-04-02 20:18:10 UTC
With your CMakeLists patch crashes now the renamecustomizertest at end. Compile or linking problems do not exist here.

Maik
Comment 7 Lukáš Karas 2016-04-04 06:19:30 UTC
Created attachment 98232 [details]
Docker image based on ubuntu:xenial that help to reproduce compile problem
Comment 8 Lukáš Karas 2016-04-04 06:20:12 UTC
Created attachment 98233 [details]
make log with docker image
Comment 9 Lukáš Karas 2016-04-04 06:27:20 UTC
Linker problem exists on latest Ubuntu Xenial (unreleased yet). You can reproduce it when you install Docker on your machine, download attached Dockerfile to directory "dk-build-ubuntu-test" and try to compile digikam in container based on this image...

# build docker image:
docker build --tag dk-build-ubuntu-test:latest dk-build-ubuntu-test

# try to compile digikam in container:
docker run --rm=true -it dk-build-ubuntu-test /usr/bin/make
Comment 10 Maik Qualmann 2016-04-05 06:02:19 UTC
The compiler error is to reproduce in the docker Image.  I look for the cause tonight.

Maik
Comment 11 Maik Qualmann 2016-04-05 17:41:02 UTC
Git commit ff5d2c0ea8fda5e7c11838fa0650cc13355939b1 by Maik Qualmann.
Committed on 05/04/2016 at 17:37.
Pushed by mqualmann into branch 'master'.

fix crash from advancedrenametest and compile error from renamecustomizertest
FIXED-IN: 5.0.0

M  +2    -1    NEWS
M  +7    -9    tests/advancedrename/CMakeLists.txt
M  +5    -1    utilities/importui/widgets/renamecustomizer.h

http://commits.kde.org/digikam/ff5d2c0ea8fda5e7c11838fa0650cc13355939b1
Comment 12 Lukáš Karas 2016-04-06 11:25:35 UTC
Thank Maik, good job.