Fails to build in zesty (missing linux/dma-buf.h)

Bug #1678119 reported by Chris Coulson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Oxide
Triaged
Critical
Unassigned
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

FAILED: obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o
/usr/bin/c++ -MMD -MF obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o.d -DGFX_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DOXIDE_BUILD -I../.. -Igen -I../../third_party/libdrm/src -I../../third_party/libdrm/src/include -I../../third_party/libdrm/src/include/drm -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -m64 -march=x86-64 -pthread -Wall -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -g2 -fvisibility=hidden -fvisibility-inlines-hidden -fno-delete-null-pointer-checks -std=gnu++11 -Wno-narrowing -fno-rtti -fno-exceptions -c ../../ui/gfx/linux/client_native_pixmap_dmabuf.cc -o obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o
../../ui/gfx/linux/client_native_pixmap_dmabuf.cc:39:27: fatal error: linux/dma-buf.h: No such file or directory
 #include <linux/dma-buf.h>
                           ^
compilation terminated.

Changed in oxide:
importance: Undecided → Critical
status: New → Triaged
Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1678119

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Olivier Tilloy (osomon) wrote :

apport-collect won’t let me share more info because I’m not the one who filed the bug.
But in that case the version signature should be enough information:

$ cat /proc/version_signature
Ubuntu 4.10.0-19.21-generic 4.10.8

This is just a missing header in the linux-headers package, presumably fixed in version 4.11 of the kernel.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

Even after copying the missing header to /usr/include/linux/ on my system, I’m getting build failures:

../../ui/gfx/linux/client_native_pixmap_dmabuf.cc: In function ‘void gfx::{anonymous}::PrimeSyncStart(int)’:
../../ui/gfx/linux/client_native_pixmap_dmabuf.cc:47:29: error: variable ‘gfx::{anonymous}::PrimeSyncStart(int)::local_dma_buf_sync sync_start’ has initializer but incomplete type
   struct local_dma_buf_sync sync_start = {0};
                             ^~~~~~~~~~
../../ui/gfx/linux/client_native_pixmap_dmabuf.cc:49:22: error: ‘LOCAL_DMA_BUF_SYNC_START’ was not declared in this scope
   sync_start.flags = LOCAL_DMA_BUF_SYNC_START | LOCAL_DMA_BUF_SYNC_RW;
                      ^~~~~~~~~~~~~~~~~~~~~~~~

It appears LOCAL_DMA_BUF_SYNC_* are not defined in that header.

I’m temporarily working around the issue with the following patch to chromium:

diff --git a/ui/gfx/linux/client_native_pixmap_dmabuf.cc b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
index d656c338f0a6..57de7fa683a0 100644
--- a/ui/gfx/linux/client_native_pixmap_dmabuf.cc
+++ b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
@@ -17,7 +17,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/trace_event/trace_event.h"

-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
 #include <linux/types.h>

 struct local_dma_buf_sync {

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.