Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 614290 - sys-kernel/linux-headers-4.10 doesn't install linux/dma-buf.h
Summary: sys-kernel/linux-headers-4.10 doesn't install linux/dma-buf.h
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-30 13:32 UTC by Paweł Hajdan, Jr. (RETIRED)
Modified: 2018-01-21 15:47 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2017-03-30 13:32:16 UTC
sys-kernel/linux-headers-4.10 doesn't install linux/dma-buf.h causing a compile issue with chromium (https://archives.gentoo.org/gentoo-dev/message/d3aa208c33a6d114e921874afbf74f68)

Please consider backporting upstream https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2220fc1ab363e6fab1f321430d69be17a8b92bd7 , or doing a version bump as applicable.

Pasting more details about the chromium issue:

../../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>

This is the workaround I applied:
<https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-dma-buf-r1.patch?id=f3d721fbb4127f17e836a1842cfdd2bf76f0d398>

This is part of the chromium code in question:

<https://cs.chromium.org/chromium/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc?q=dma-buf.h+package:%5Echromium$&l=39&dr=C>

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

struct local_dma_buf_sync {
  __u64 flags;
};

#define LOCAL_DMA_BUF_SYNC_READ (1 << 0)
#define LOCAL_DMA_BUF_SYNC_WRITE (2 << 0)
#define LOCAL_DMA_BUF_SYNC_RW \
  (LOCAL_DMA_BUF_SYNC_READ | LOCAL_DMA_BUF_SYNC_WRITE)
#define LOCAL_DMA_BUF_SYNC_START (0 << 2)
#define LOCAL_DMA_BUF_SYNC_END (1 << 2)

#define LOCAL_DMA_BUF_BASE 'b'
#define LOCAL_DMA_BUF_IOCTL_SYNC \
  _IOW(LOCAL_DMA_BUF_BASE, 0, struct local_dma_buf_sync)

#else
#include <linux/dma-buf.h>
#endif
Comment 1 Mike Gilbert gentoo-dev 2017-03-30 14:50:59 UTC
As you might infer from the "#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)", the header was added in linux-4.6.

If you intend to stabilize some newer version of linux-headers (maybe 4.9?), please backport to that version as well.
Comment 2 Joshua Kinard gentoo-dev 2017-07-30 18:38:52 UTC
I've added sys-kernel/linux-headers-4.11 to the tree, but with KEYWORDS all removed until this can be carefully tested.  Add a line to package.accept_keywords and test to see if that solves this particular issue, as my dev box runs headless, so I won't be making a test of chromium anytime soon.

Commit:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f72ababac9f177d374f3e8e27f1e3f06ce04c444

As far as backporting goes...patches accepted.  The patches for linux-headers are still tracked in CVS for the time being:

https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/

I'll look into asking -infra to move those to git.
Comment 3 Matt Turner gentoo-dev 2018-01-21 08:07:44 UTC
v4.13 is now stable. Do we care to keep this open?
Comment 4 SpanKY gentoo-dev 2018-01-21 15:47:06 UTC
i don't think we should backport