Mir

cross-compile-chroot.sh (to zesty) fails to build [cannot find -ludev] due to libudev.so being in a different directory to where libudev.pc searches for it

Bug #1674201 reported by Daniel van Vugt on 2017-03-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Won't Fix
High
Daniel van Vugt
mir (Ubuntu)
Undecided
Unassigned
systemd (Ubuntu)
High
Dimitri John Ledkov

Bug Description

Mir fails to build on arm64 cross-compiled:

[ 11%] Linking CXX shared library ../../lib/libmirplatform.so
/usr/lib/gcc-cross/aarch64-linux-gnu/6/../../../../aarch64-linux-gnu/bin/ld: cannot find -ludev
/usr/lib/gcc-cross/aarch64-linux-gnu/6/../../../../aarch64-linux-gnu/bin/ld: cannot find -ludev
collect2: error: ld returned 1 exit status

Related branches

Changed in mir:
assignee: nobody → Daniel van Vugt (vanvugt)
Daniel van Vugt (vanvugt) wrote :

Looks like a udev bug. Mir is doing everything right to find libudev.so, but the pc file says the library path is:
   libdir=/usr/lib/aarch64-linux-gnu

while libudev-dev actually installs it to:
   /lib/<arch>/...

Both of these conflicting facts are from the same package `libudev-dev'.

Just you wouldn't notice the bug unless you were unlucky enough to be building in an environment without searching /lib/<arch>/...

Changed in udev (Ubuntu):
importance: Undecided → Medium
Changed in mir:
importance: Undecided → Low
Changed in udev (Ubuntu):
importance: Medium → High
Changed in mir:
status: New → In Progress
milestone: none → 1.0.0

Same bug occurs with armhf

summary: - Mir fails to build on arm64 cross-compiled [cannot find -ludev]
+ cross-compile-chroot.sh fails to build [cannot find -ludev]
tags: added: regression
Changed in mir:
importance: Low → High
tags: added: xcompile
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 1.0.0

Changed in mir:
status: In Progress → Fix Committed
summary: - cross-compile-chroot.sh fails to build [cannot find -ludev]
+ cross-compile-chroot.sh (to zesty) fails to build [cannot find -ludev]
Changed in mir:
status: Fix Committed → In Progress
affects: udev (Ubuntu) → systemd (Ubuntu)
summary: cross-compile-chroot.sh (to zesty) fails to build [cannot find -ludev]
+ due to libudev.so being in a different directory to where libudev.so
+ searches for it
summary: cross-compile-chroot.sh (to zesty) fails to build [cannot find -ludev]
- due to libudev.so being in a different directory to where libudev.so
+ due to libudev.so being in a different directory to where libudev.pc
searches for it
Changed in mir:
status: In Progress → Fix Committed
Dimitri John Ledkov (xnox) wrote :

Is there anything to fix in src:systemd? as far as I can see everything is correct:

$ dpkg -L libudev-dev | grep -e '\.pc' -e '\.so'
/usr/lib/x86_64-linux-gnu/pkgconfig/libudev.pc
/usr/lib/x86_64-linux-gnu/libudev.so

And yes the .so is symlink to a file in /lib location:

$ ls -latr /usr/lib/x86_64-linux-gnu/libudev.so
lrwxrwxrwx 1 root root 38 Feb 15 15:10 /usr/lib/x86_64-linux-gnu/libudev.so -> /lib/x86_64-linux-gnu/libudev.so.1.6.4

Which is all correct and the path mentioned in .pc matches the location of the .so file.

Daniel van Vugt (vanvugt) wrote :

In zesty at least it is still broken:

$ grep libdir /usr/lib/x86_64-linux-gnu/pkgconfig/libudev.pc
libdir=/usr/lib/x86_64-linux-gnu
Libs: -L${libdir} -ludev

$ find /usr /lib -name libudev.so
/lib/x86_64-linux-gnu/libudev.so

^^^ Not in /usr

Daniel van Vugt (vanvugt) wrote :

$ dpkg -L libudev-dev | grep -e '\.pc' -e '\.so'
/usr/lib/x86_64-linux-gnu/pkgconfig/libudev.pc
/lib/x86_64-linux-gnu/libudev.so

Changed in systemd (Ubuntu):
status: New → Confirmed
assignee: nobody → Dimitri John Ledkov (xnox)
milestone: none → ubuntu-17.03
Changed in systemd (Ubuntu):
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 232-21ubuntu2

---------------
systemd (232-21ubuntu2) zesty; urgency=medium

  * pkgconfig: Cherrypick upstream fix to libdir locations in .pc files
    (LP: #1674201)

 -- Dimitri John Ledkov <email address hidden> Tue, 28 Mar 2017 16:59:14 +0100

Changed in systemd (Ubuntu):
status: Fix Committed → Fix Released
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.28.0

Dimitri John Ledkov (xnox) wrote :

It seems like workarounds for this bug are being merged into mir, even though on all ubuntu releases libudev.pc has been corrected to point at the right location for the libudev.so.

E.g.:

cat /usr/lib/x86_64-linux-gnu/pkgconfig/libudev.pc
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

prefix=/usr
exec_prefix=/usr
libdir=/lib/x86_64-linux-gnu
includedir=/usr/include

Name: libudev
Description: Library to access udev device information
Version: 232
Libs: -L${libdir} -ludev
Cflags: -I${includedir}

(zesty-amd64)root@sochi:/tmp# dpkg -S libudev.so
libudev1:amd64: /lib/x86_64-linux-gnu/libudev.so.1.6.5
libudev-dev:amd64: /lib/x86_64-linux-gnu/libudev.so
libudev1:amd64: /lib/x86_64-linux-gnu/libudev.so.1

This is results for zesty.

Thus no workarounds should be needed at all in the mir scripts.

Daniel van Vugt (vanvugt) wrote :

Already done :)

------------------------------------------------------------
revno: 4151 [merge]
author: Daniel van Vugt <email address hidden>
committer: Tarmac
branch nick: development-branch
timestamp: Tue 2017-04-11 14:04:58 +0000
message:
  Remove the workaround for LP: #1674201, now that the fix for
  libudev.pc is in zesty.
  . Fixes: https://bugs.launchpad.net/bugs/1674201.

  Approved by Alberto Aguirre, mir-ci-bot.
------------------------------------------------------------

Changed in mir:
status: Fix Committed → Won't Fix
milestone: 0.27.0 → none
Changed in mir (Ubuntu):
status: New → Won't Fix

Excellent! I am sorry, I got confused about linked branches from
ci-train-bot. Thanks a lot! =)

On 26 June 2017 at 02:56, Daniel van Vugt <email address hidden>
wrote:

> Already done :)
>
> ------------------------------------------------------------
> revno: 4151 [merge]
> author: Daniel van Vugt <email address hidden>
> committer: Tarmac
> branch nick: development-branch
> timestamp: Tue 2017-04-11 14:04:58 +0000
> message:
> Remove the workaround for LP: #1674201, now that the fix for
> libudev.pc is in zesty.
> . Fixes: https://bugs.launchpad.net/bugs/1674201.
>
> Approved by Alberto Aguirre, mir-ci-bot.
> ------------------------------------------------------------
>
>
> ** Changed in: mir
> Status: Fix Committed => Won't Fix
>
> ** Changed in: mir
> Milestone: 0.27.0 => None
>
> ** Changed in: mir (Ubuntu)
> Status: New => Won't Fix
>
> --
> You received this bug notification because you are a bug assignee.
> Matching subscriptions: systemd
> https://bugs.launchpad.net/bugs/1674201
>
> Title:
> cross-compile-chroot.sh (to zesty) fails to build [cannot find -ludev]
> due to libudev.so being in a different directory to where libudev.pc
> searches for it
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mir/+bug/1674201/+subscriptions
>

--
Regards,

Dimitri.

Launchpad Janitor (janitor) wrote :
Download full text (8.3 KiB)

This bug was fixed in the package mir - 0.27.0+17.10.20170630-0ubuntu1

---------------
mir (0.27.0+17.10.20170630-0ubuntu1) artful; urgency=medium

  [ Daniel van Vugt ]
  * New upstream release 0.27.0 (https://launchpad.net/mir/+milestone/0.27.0)
    - ABI summary:
      . mirclient ABI unchanged at 9
      . mirserver ABI bumped to 44
      . mircommon ABI unchanged at 7
      . mirplatform ABI bumped to 61
      . mirprotobuf ABI unchanged at 3
      . mirplatformgraphics ABI bumped to 13
      . mirclientplatform ABI unchanged at 5
      . mirinputplatform ABI bumped to 7
      . mircore ABI unchanged at 1
    - Enhancements:
      . Mostly groundwork required to support major enhancements coming in
        future Mir versions.
      . Removed android-input and eliminated the entire "3rd_party/" subtree.
        Now the Mir source tree contains original code only.
      . Added mir_prompt_session_new_fds_for_prompt_providers_sync API.
      . mirout: Added load and save options for keeping display configs
        on disk.
      . mirout: Added "--" support for applying configuration changes under
        Unity8.
      . Fixed failure of DRM hardware cursor {hide(); show(image);}
      . Added server option: "--cursor software" (MIR_SERVER_CURSOR=software)
      . Added letterboxing/black bars support to the GL renderer in preparation
        for generic output cloning.
      . Added client API for getting the logical size of an output.
      . Migrated MirCookie to use SHA-256.
      . Ensure RealKMSOutputConfiguration stays in sync with actual hardware
        state.
      . Added support for drag-and-drop.
      . Lots of other client API enhancements.
      . Minor clean-ups, optimizations and dead code removal.
      . Added support for building on Ubuntu 17.10 artful.
      . Update example code to use undeprecated API.
      . mesa-kms: Support hardware cursors in hybrid setups.
      . Rework and publish the graphics platform APIs
    - Bugs fixed:
      . [enhancement] Make able to get version information from client /
        server APIs (LP: #1195540)
      . Touch screen coordinates don't rotate with the screen (LP: #1349660)
      . Subpixel order not included in Mir display information (LP: #1393578)
      . [enhancement] Missing client API for relative surface movement (e.g.
        dragging client-decorated windows) (LP: #1420334) . Mir does not reset
        key states when paused or resumed (modifiers get stuck after VT
        switching) (LP: #1536279)
      . NBS never uses mc::MultiMonitorMode::single_monitor_fast, even when
        only a single monitor is plugged in (LP: #1561418)
      . Inconsistent behaviour of Num Lock (LP: #1588237)
      . A scaled (not panned or clipped) mirror/clone mode is desired
        (LP: #1639226)
      . Rotating an output left or right without restarting the
        compositor distorts the image (LP: #1643488)
      . support display scaling slider in unity8 (LP: #1645372)
      . [ FAILED ] NestedInputWithMouse.mouse_pointer_coordinates_in_nested_
        server_are_accumulated (LP: #1646375)
      . [ FAILED ] NestedInputWithMouse.mouse_pointer_position_is_in_sync_with_
        ho...

Read more...

Changed in mir (Ubuntu):
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers