Merge lp:~aacid/unity8/buildWithNinja into lp:unity8

Proposed by Albert Astals Cid on 2015-01-19
Status: Merged
Approved by: Michael Zanetti on 2015-01-19
Approved revision: 1561
Merged at revision: 1564
Proposed branch: lp:~aacid/unity8/buildWithNinja
Merge into: lp:unity8
Diff against target: 28 lines (+2/-6)
2 files modified
tests/mocks/LightDM/CMakeLists.txt (+1/-2)
tests/plugins/LightDM/CMakeLists.txt (+1/-4)
To merge this branch: bzr merge lp:~aacid/unity8/buildWithNinja
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve on 2015-01-19
Antti Kaijanmäki (community) 2015-01-19 Approve on 2015-01-19
Review via email: mp+246883@code.launchpad.net

Commit Message

Build with ninja

Description of the Change

* Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
No, Buildsystem only changes

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Antti Kaijanmäki (kaijanmaki) wrote :

Yep. incomplete dependency declarations in the CMakeLists.txt file.

[467/787] Linking CXX executable tests/plugins/LightDM/GreeterDBusTestExec
FAILED: : && /usr/bin/ccache g++ -fvisibility=hidden -std=c++11 -fno-permissive -pedantic -Wall -Wextra -g tests/plugins/LightDM/CMakeFiles/GreeterDBusTestExec.dir/dbus.cpp.o tests/plugins/LightDM/CMakeFiles/GreeterDBusTestExec.dir/__/__/__/plugins/LightDM/Greeter.cpp.o tests/plugins/LightDM/CMakeFiles/GreeterDBusTestExec.dir/GreeterDBusTestExec_automoc.cpp.o -o tests/plugins/LightDM/GreeterDBusTestExec -rdynamic /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5Test.so.5.3.2 -L/home/antti/branches/unity8/unity8/builddir/tests/mocks/LightDM/full -llightdm-qt5-2 /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5Network.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.2 && :
/usr/bin/ld.bfd.real: cannot find -llightdm-qt5-2
collect2: error: ld returned 1 exit status

There was a target dependency missing. Plain cmake just happens to build the targets in an order that the .so files just happened to be available but ninja reordered the build because it didn't (and couldn't) know about the dependency.

This MP fixes the ninja build, and the CMakeLists.txt causing the failure.

review: Approve
Michael Zanetti (mzanetti) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?

yes, builds fine with ninja now, still builds fine with plain make

 * Did CI run pass? If not, please explain why.

waiting....

 * Did you make sure that the branch does not contain spurious tags?

yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/mocks/LightDM/CMakeLists.txt'
2--- tests/mocks/LightDM/CMakeLists.txt 2014-12-19 14:51:35 +0000
3+++ tests/mocks/LightDM/CMakeLists.txt 2015-01-19 12:06:13 +0000
4@@ -37,8 +37,7 @@
5 # LD_LIBRARY_PATH.
6 add_dependencies(MockLightDM-qml MockLightDM-full MockUserMetrics)
7 target_link_libraries(MockLightDM-qml
8- -L${CMAKE_CURRENT_BINARY_DIR}/full
9- -llightdm-qt5-2
10+ MockLightDM-full
11 -L${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics
12 -lusermetricsoutput
13 unity8-private
14
15=== modified file 'tests/plugins/LightDM/CMakeLists.txt'
16--- tests/plugins/LightDM/CMakeLists.txt 2014-12-11 15:48:35 +0000
17+++ tests/plugins/LightDM/CMakeLists.txt 2015-01-19 12:06:13 +0000
18@@ -11,10 +11,7 @@
19 ${LIBLIGHTDM_INCLUDE_DIRS}
20 )
21
22-target_link_libraries(GreeterDBusTestExec
23- -L${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full
24- -llightdm-qt5-2
25- )
26+target_link_libraries(GreeterDBusTestExec MockLightDM-full)
27
28 add_definitions(-DCURRENT_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
29

Subscribers

People subscribed via source and target branches