Mir

mir fails to find drm.h

Bug #1722147 reported by Nerdopolis on 2017-10-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Medium
Alan Griffiths

Bug Description

Hi

It seems that for some reason, mir cannot find drm.h

I get this output
-- Detecting CXX compile features
[ 1%] Building CXX object src/cookie/CMakeFiles/mircookie.dir/const_memcmp.cpp.o
[ 1%] Built target mirudev
[ 1%] Compiling Cap'n Proto schema mir_input_config.capnp
[ 1%] Building CXX object src/cookie/CMakeFiles/mircookie.dir/hmac_cookie.cpp.o
[ 1%] Compiling Cap'n Proto schema mir_event.capnp
[ 1%] Building CXX object src/core/CMakeFiles/mircore.dir/fd.cpp.o
Scanning dependencies of target mircapnproto
[ 1%] Building CXX object src/capnproto/CMakeFiles/mircapnproto.dir/mir_event.capnp.c++.o
/srcbuild/mir/src/platforms/mesa/server/kms/cursor.cpp:28:21: fatal error: drm/drm.h: No such file or directory
 #include <drm/drm.h>
                     ^
compilation terminated.
src/platforms/mesa/server/kms/CMakeFiles/mirplatformgraphicsmesakmsobjects.dir/build.make:86: recipe for target 'src/platforms/mesa/server/kms/CMakeFiles/mirplatformgraphicsmesakmsobjects.dir/cursor.cpp.o' failed
make[2]: *** [src/platforms/mesa/server/kms/CMakeFiles/mirplatformgraphicsmesakmsobjects.dir/cursor.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....

This is the cmake output of
cmake -Wno-dev . -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_PREFIX_PATH=$INSTALLDIR -DCMAKE_BUILD_TYPE=Release -DLIB_INSTALL_DIR=$INSTALLDIR/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)

-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Lcov (missing: LCOV_EXECUTABLE GENHTML_EXECUTABLE)
-- Could NOT find gcovr (missing: GCOVR_EXECUTABLE)
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.13")
-- doxygen 1.8.13 (>= 1.8.0) available - enabling make target doc
-- Performing Test HAS_W_MISMATCHED_TAGS
-- Performing Test HAS_W_MISMATCHED_TAGS - Failed
-- Performing Test HAS_W_PSABI
-- Performing Test HAS_W_PSABI - Success
-- Boost version: 1.62.0
-- Found the following Boost libraries:
-- date_time
-- system
-- program_options
-- filesystem
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Found EGL: /opt/lib/i386-linux-gnu/libEGL.so
-- Found GLESv2: /opt/lib/i386-linux-gnu/libGLESv2.so
-- Found GLM: /usr/include
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Warning at /opt/share/cmake-3.8/Modules/FindProtobuf.cmake:387 (message):
  Protobuf compiler version doesn't match library version 3.0.0
Call Stack (most recent call first):
  CMakeLists.txt:211 (find_package)

-- Found Protobuf: /usr/lib/i386-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0")
-- Found GLog: /usr/lib/i386-linux-gnu/libglog.so
-- Found GFlags: /usr/lib/i386-linux-gnu/libgflags.so
-- Found LTTNG_UST: /usr/lib/i386-linux-gnu/liblttng-ust.so
-- Checking for module 'libudev'
-- Found libudev, version 232
-- Checking for module 'glib-2.0'
-- Found glib-2.0, version 2.55.0
-- Checking for module 'wayland-server'
-- Found wayland-server, version 1.14.90
-- Checking for module 'wayland-client'
-- Found wayland-client, version 1.14.90
-- Checking for module 'glesv2'
-- Found glesv2, version 17.3.0-devel
-- Checking for module 'gbm>=9.0.0'
-- Found gbm, version 17.3.0-devel
-- Checking for module 'libdrm'
-- Found libdrm, version 2.4.83
-- Checking for module 'epoxy'
-- Found epoxy, version 1.3.1
-- Checking for module 'nettle'
-- Found nettle, version 3.3
-- Checking for module 'libinput'
-- Found libinput, version 1.8.901
-- Checking for module 'libxml++-2.6'
-- Found libxml++-2.6, version 2.40.1
-- Checking for module 'uuid'
-- Found uuid, version 2.29.2
-- Found XKBCOMMON: /opt/lib/i386-linux-gnu/libxkbcommon.so
valgrind not found, disabling cpu benchmarks
valgrind not found, disabling memory benchmarks
-- Checking for module 'freetype2'
-- Found freetype2, version 18.3.12
-- Installing: //srcbuild/mir/mir_gtest/fail_on_success.sh
-- Found GTest: /opt/include
-- Checking for module 'libevdev'
-- Found libevdev, version 1.5.7
-- Checking for module 'umockdev-1.0>=0.6'
-- Found umockdev-1.0, version 0.9.3
-- Performing Test HAS_W_NULL_DEREFERENCE
-- Performing Test HAS_W_NULL_DEREFERENCE - Success
-- Performing Test HAS_W_OVERLOADED_VIRTUAL
-- Performing Test HAS_W_OVERLOADED_VIRTUAL - Success
-- Performing Test HAS_W_INCONSISTENT_MISSING_OVERRIDE
-- Performing Test HAS_W_INCONSISTENT_MISSING_OVERRIDE - Failed
-- Performing Test HAS_W_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS
-- Performing Test HAS_W_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS - Failed
-- Performing Test MIRAL_COMPILE_WITH_W_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS
-- Performing Test MIRAL_COMPILE_WITH_W_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS - Success
-- Performing Test MIRAL_COMPILE_WITH_W_NO_PEDANTIC
-- Performing Test MIRAL_COMPILE_WITH_W_NO_PEDANTIC - Success
-- Cannot enable coverage targets because neither lcov nor gcovr are found.
CMake Warning at cmake/ABICheck.cmake:5 (message):
  no ABI checks possible: abi-compliance-checker was not found
Call Stack (most recent call first):
  CMakeLists.txt:316 (include)

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    LIB_INSTALL_DIR

-- Build files have been written to: /srcbuild/mir

Related branches

Nerdopolis (bluescreen-avenger) wrote :

I forgot to add, this is http://bazaar.launchpad.net/~mir-team/mir/development-branch ...and I will try it with last:1 ...I just realized that the revision string I was trying to check out was 'master'

Daniel van Vugt (vanvugt) wrote :

The file you're missing can be found by installing package 'linux-libc-dev'.

Seems this was already fixed recently in the source code instructions for required packages to install:

revno: 4269 [merge]
author: Christopher James Halse Rogers <email address hidden>
committer: Alan Griffiths <email address hidden>
branch nick: mir-trunk
timestamp: Tue 2017-09-26 12:00:49 -0400

Changed in mir:
importance: Undecided → Medium
assignee: nobody → Chris Halse Rogers (raof)
status: New → Fix Committed
milestone: none → 1.0.0
Nerdopolis (bluescreen-avenger) wrote :

linux-libc-dev is already installed... ...I also forgot to mention that this is on Debian... I do know though that Weston, and other things that use it are able to find drm/drm.h

Changed in mir:
status: Fix Committed → New
Alan Griffiths (alan-griffiths) wrote :

Yes, there is something wrong.

On Ubuntu Mir is using /usr/include/drm/drm.h, (installed by linux-libc-dev).

Mir's CMakeLists.txt picks up /usr/include/libdrm/ (which contains an identical drm.h installed by libdrm-dev)

It looks as though we should be using <drm.h> from libdrm-dev, not <drm/drm.h>

Changed in mir:
status: New → Triaged
assignee: Chris Halse Rogers (raof) → nobody
milestone: 1.0.0 → none
Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
status: Triaged → In Progress
Mir CI Bot (mir-ci-bot) wrote :

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

Changed in mir:
status: In Progress → Fix Committed
Nerdopolis (bluescreen-avenger) wrote :

That moves it further, but it's still trying to find other drm related headers
mir: [ 3%] Linking CXX static library libkms_utils.a
mir: [ 3%] Built target kms_utils
mir: /srcbuild/mir/src/platforms/mesa/server/kms/display_buffer.cpp:35:28: fatal error: drm/drm_fourcc.h: No such file or directory
mir: #include <drm/drm_fourcc.h>
mir: ^
mir: compilation terminated.

Changed in mir:
status: Fix Committed → Won't Fix
status: Won't Fix → In Progress
milestone: none → 0.28.1
Mir CI Bot (mir-ci-bot) wrote :

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

Changed in mir:
status: In Progress → Fix Committed
Nerdopolis (bluescreen-avenger) wrote :

It builds now!

Changed in mir:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers