[compiling] fatal error: 'linux/dma-buf.h' file not found
Reported by
xftroxgpx@gmail.com,
Apr 3 2017
|
||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3046.0 Safari/537.36
Steps to reproduce the problem:
1. during compilation via
LC_ALL=C ninja -C "/tmp//out/Default" -v chrome
2.
3.
What is the expected behavior?
does not complain that
'linux/dma-buf.h' file not found
What went wrong?
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:39:10: fatal error: 'linux/dma-buf.h' file not found
#include <linux/dma-buf.h>
^~~~~~~~~~~~~~~~~
1 error generated.
Did this work before? Yes Chromium 59.0.3046.0 (Developer Build) (64-bit) Revision 7f38e48ab4ee07afa49a7d415296b7db3fc14e06-refs/heads/master@{#457961} OS Linux JavaScript V8 5.9.57 Flash User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3046.0 Safari/537.36
Chrome version: 59.0.3046.0 Channel: n/a
OS Version:
Flash Version:
[10799/25223] ccache ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o.d -DGFX_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"298539-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src -Igen -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include/drm -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -D_FORTIFY_SOURCE=2 -fomit-frame-pointer -fno-omit-frame-pointer -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Ofast -fno-fast-math -fno-ident -fdata-sections -ffunction-sections -g1 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-enum-conversion -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc -o obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o
FAILED: obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o
ccache ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o.d -DGFX_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"298539-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src -Igen -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include/drm -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -D_FORTIFY_SOURCE=2 -fomit-frame-pointer -fno-omit-frame-pointer -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Ofast -fno-fast-math -fno-ident -fdata-sections -ffunction-sections -g1 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-enum-conversion -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc -o obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:39:10: fatal error: 'linux/dma-buf.h' file not found
#include <linux/dma-buf.h>
^~~~~~~~~~~~~~~~~
1 error generated.
,
Apr 3 2017
I'm sorry, what? :)
,
Apr 3 2017
OP do you have the linux kernel headers installed?
,
Apr 3 2017
,
Apr 3 2017
Yes, I believe so, dma-buf.h is in: /usr/lib/modules/4.10.0-gc470abd4fde4/build/include/linux/dma-buf.h /usr/lib/modules/4.10.0-gc470abd4fde4/build/include/uapi/linux/dma-buf.h I'm on Arch Linux, package is: linux-git-headers 4.10.r0.gc470abd4fde4-1 Note, this worked before. But, shouldn't there be an -Ipath in the compile command? where path is where linux headers are? I can only see -I/usr/lib/glib-2.0/include
,
Apr 3 2017
Oh, this seems relevant: https://bugs.chromium.org/p/chromium/issues/detail?id=475633#c82
,
Apr 3 2017
Ok maybe that is not relevant (chromiumos). On another note: what is curious is that there's an unconditional #include <linux/version.h> at line 8 in the same file that errors for <linux/dma-buh.h>, ui/gfx/linux/client_native_pixmap_dmabuf.cc which is way before the line 39 #include <linux/dma-buf.h> and I'm wondering why doesn't it err on the linux/version.h instead? And, maybe your bots aren't hitting this issue because their linux fits this condition: #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) #include <linux/types.h> ... #else #include <linux/dma-buf.h> #endif Thoughs? Hmm, there are a bunch of version.h in chromium src dir, which leads me to guess that use_sysroot = false is perhaps ignored? if compilation is using any of those linux/version.h dirs, given that according to above doesn't err on version.h not being found and those chromium dirs having version.h don't have dma-buf.h src $ find . -name version.h|grep linux ./build/linux/debian_wheezy_amd64-sysroot/usr/include/linux/version.h ./build/linux/debian_wheezy_amd64-sysroot/usr/include/linux/dvb/version.h ./build/linux/debian_wheezy_amd64-sysroot/usr/include/pulse/version.h ./build/linux/debian_wheezy_amd64-sysroot/usr/include/elfutils/version.h ./build/linux/debian_wheezy_amd64-sysroot/usr/include/alsa/version.h ./build/linux/debian_wheezy_i386-sysroot/usr/include/linux/version.h ./build/linux/debian_wheezy_i386-sysroot/usr/include/linux/dvb/version.h ./build/linux/debian_wheezy_i386-sysroot/usr/include/pulse/version.h ./build/linux/debian_wheezy_i386-sysroot/usr/include/elfutils/version.h ./build/linux/debian_wheezy_i386-sysroot/usr/include/alsa/version.h ./build/linux/ubuntu_precise_amd64-sysroot/usr/include/linux/version.h ./build/linux/ubuntu_precise_amd64-sysroot/usr/include/linux/dvb/version.h ./build/linux/ubuntu_precise_amd64-sysroot/usr/include/pulse/version.h ./build/linux/ubuntu_precise_amd64-sysroot/usr/include/elfutils/version.h ./build/linux/ubuntu_precise_amd64-sysroot/usr/include/alsa/version.h ./build/linux/debian_jessie_amd64-sysroot/usr/include/linux/version.h ./build/linux/debian_jessie_amd64-sysroot/usr/include/linux/dvb/version.h ./build/linux/debian_jessie_amd64-sysroot/usr/include/pulse/version.h ./build/linux/debian_jessie_amd64-sysroot/usr/include/elfutils/version.h ./build/linux/debian_jessie_amd64-sysroot/usr/include/alsa/version.h ./build/linux/debian_jessie_i386-sysroot/usr/include/linux/version.h ./build/linux/debian_jessie_i386-sysroot/usr/include/linux/dvb/version.h ./build/linux/debian_jessie_i386-sysroot/usr/include/pulse/version.h ./build/linux/debian_jessie_i386-sysroot/usr/include/elfutils/version.h ./build/linux/debian_jessie_i386-sysroot/usr/include/alsa/version.h ./native_client/toolchain/linux_x86/nacl_arm_glibc/lib/gcc/arm-nacl/4.9.2/plugin/include/version.h ./native_client/toolchain/linux_x86/nacl_x86_glibc/x86_64-nacl/include/linux/version.h
,
Apr 3 2017
To summarize: 1. The situation when use_sysroot = false doesn't seem to be handled and it seems that compilation is perhaps using sysroot dir(s) for kernel headers, in this case (when false) too. 2. The following chromium dirs have version.h and types.h but none have dma-buf.h build/linux/debian_wheezy_amd64-sysroot/usr/include/linux build/linux/debian_wheezy_i386-sysroot/usr/include/linux build/linux/ubuntu_precise_amd64-sysroot/usr/include/linux build/linux/debian_jessie_amd64-sysroot/usr/include/linux build/linux/debian_jessie_i386-sysroot/usr/include/linux native_client/toolchain/linux_x86/nacl_x86_glibc/x86_64-nacl/include/linux (this would explain my previous comment, on why the error of file not found doesn't happen on an earlier include of linux/version.h instead of the latter linux/dma-buf.h) 3. dma-buf.h is required only when LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) else, linux/types.h is used instead.
,
Apr 3 2017
tl;dr: /usr/include is used for linux/version.h and linux/dma-buf.h doesn't exist there!
/usr/include/linux/version.h is owned by linux-api-headers 4.10.1-1
hmm
-------
I put a dma-buf.h in each of those directories, and I still get File Not Found.
So this means that use_sysroot thing I mentioned above is not an issue.
But then how is it not err-ing for linux/version.h especially since I've put a dma-buf.h in every linux/ subdir in the chromium tree that has version.h yet it still says file not found for dma-buf.h but the version.h include happens earlier in client_native_pixmap_dmabuf.cc!
Alright, I figured it out, version.h works because /usr/include/linux/version.h is used! and there is no dma-buf.h there!
Repro:
pushd /tmp/out/Default/ && ccache ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o.d -DGFX_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"298539-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src -Igen -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include/drm -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -D_FORTIFY_SOURCE=2 -fomit-frame-pointer -fno-omit-frame-pointer -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Ofast -fno-fast-math -fno-ident -fdata-sections -ffunction-sections -g1 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-enum-conversion -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -E -x c++ -v -c ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc -o obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o ; popd
Output:
/tmp/out/Default /tmp/out/Default
clang version 5.0.0 (trunk 298539)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /tmp/out/Default/../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.1
Selected GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
"/home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/bin/clang" -cc1 -triple x86_64-unknown-linux-gnu -E -disable-free -main-file-name client_native_pixmap_dmabuf.cc -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -v -dwarf-column-info -debug-info-kind=line-tables-only -dwarf-version=4 -debugger-tuning=gdb -ffunction-sections -fdata-sections -coverage-notes-file /tmp/out/Default/obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.gcno -resource-dir /home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/lib/clang/5.0.0 -dependency-file obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o.d -MT obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o -D GFX_IMPLEMENTATION -D V8_DEPRECATION_WARNINGS -D USE_AURA=1 -D USE_PANGO=1 -D USE_CAIRO=1 -D USE_GLIB=1 -D USE_NSS_CERTS=1 -D USE_X11=1 -D DISABLE_NACL -D FULL_SAFE_BROWSING -D SAFE_BROWSING_CSD -D SAFE_BROWSING_DB_LOCAL -D CHROMIUM_BUILD -D ENABLE_MEDIA_ROUTER=1 -D FIELDTRIAL_TESTING_ENABLED -D "CR_CLANG_REVISION=\"298539-1\"" -D _FILE_OFFSET_BITS=64 -D _LARGEFILE_SOURCE -D _LARGEFILE64_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D NDEBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -D GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -D GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src -I gen -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -I ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src -I ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include -I ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include/drm -D __DATE__= -D __TIME__= -D __TIMESTAMP__= -D _FORTIFY_SOURCE=2 -internal-isystem /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1 -internal-isystem /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/x86_64-pc-linux-gnu -internal-isystem /usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/backward -internal-isystem /usr/local/include -internal-isystem /home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/lib/clang/5.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -Ofast -Wno-builtin-macro-redefined -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-enum-conversion -std=gnu++11 -fdeprecated-macro -fdebug-compilation-dir /tmp/out/Default -ferror-limit 19 -fmessage-length 135 -fvisibility hidden -fvisibility-inlines-hidden -pthread -fno-rtti -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o -x c++ ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc
clang -cc1 version 5.0.0 based upon LLVM 5.0.0svn default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src
gen
/usr/include/glib-2.0
/usr/lib/glib-2.0/include
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include/drm
/usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1
/usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/x86_64-pc-linux-gnu
/usr/lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/backward
/usr/local/include
/home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/lib/clang/5.0.0/include
/usr/include
End of search list.
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:39:10: fatal error:
'linux/dma-buf.h' file not found
#include <linux/dma-buf.h>
^~~~~~~~~~~~~~~~~
1 error generated.
/tmp/out/Default
/usr/include/linux/version.h is owned by linux-api-headers 4.10.1-1
hmm
$ ls /usr/include/linux/dm*
/usr/include/linux/dm-ioctl.h /usr/include/linux/dm-log-userspace.h
$ pacman -Qi linux-api-headers
Name : linux-api-headers
Version : 4.10.1-1
Description : Kernel headers sanitized for use in userspace
Architecture : x86_64
URL : http://www.gnu.org/software/libc
Licenses : GPL2
Groups : None
Provides : None
Depends On : None
Optional Deps : None
Required By : glibc
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 3.65 MiB
Packager : Allan McRae <allan@archlinux.org>
Build Date : Mon 06 Mar 2017 12:36:02 PM CET
Install Date : Sat 11 Mar 2017 07:54:45 AM CET
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
$ pacman -Qo /usr/lib/modules/4.10.0-gc470abd4fde4/build/include/linux/dma-buf.h
/usr/lib/modules/4.10.0-gc470abd4fde4/build/include/linux/dma-buf.h is owned by linux-git-headers 4.10.r0.gc470abd4fde4-1
Well, this one has dma-buf.h but it's in the "wrong" place.
This shows dma-buf.h was missing at some point:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b7bc0daa889e65db202f3222f5b69b5c80d4070f
but seems 26 feb is before 6 march, unless it only hit 4.11? but my git is 4.10 and has it.
Anyway, point is, I guess, that Comment 4 was right, dma-buf.h is missing from my kernel headers.
So it's not a chromium issue, may close this at will.
Cheers!
,
Apr 3 2017
thanks for the updates, glad you got this sorted out!
,
Apr 3 2017
Thanks Thomas. I appreciate it. You actually made me look more deeply into it!
,
Apr 3 2017
Can confirm kernel 4.10 tag did not have the commit that added dma-buf.h in kernel 4.11 which is this (merge) commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef96152e6a36e0510387cb174178b7982c1ae879 tested latest (4.11-rc5) to have it and chromium doesn't err like in OP anymore. Yey! :D
,
Apr 3 2017
btw, I meant
make INSTALL_HDR_PATH="${pkgdir}/usr" headers_install
did not install dma-buf.h in 4.10 even tho it did exist.
fix was as simple as this:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2220fc1ab363e6fab1f321430d69be17a8b92bd7
,
Apr 3 2017
New errors now.
[9462/25235] ccache ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o.d -DGFX_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"298539-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src -Igen -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include/drm -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -D_FORTIFY_SOURCE=2 -fomit-frame-pointer -fno-omit-frame-pointer -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Ofast -fno-fast-math -fno-ident -fdata-sections -ffunction-sections -g1 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-enum-conversion -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc -o obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o
FAILED: obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o
ccache ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o.d -DGFX_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"298539-1\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src -Igen -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include -I../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/third_party/libdrm/src/include/drm -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -D_FORTIFY_SOURCE=2 -fomit-frame-pointer -fno-omit-frame-pointer -fcolor-diagnostics -m64 -march=x86-64 -pthread -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Ofast -fno-fast-math -fno-ident -fdata-sections -ffunction-sections -g1 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-enum-conversion -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc -o obj/ui/gfx/memory_buffer_sources/client_native_pixmap_dmabuf.o
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:47:29: error: variable has incomplete type 'struct local_dma_buf_sync'
struct local_dma_buf_sync sync_start = {0};
^
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:47:10: note: forward declaration of 'local_dma_buf_sync'
struct local_dma_buf_sync sync_start = {0};
^
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:49:22: error: use of undeclared identifier 'LOCAL_DMA_BUF_SYNC_START'
sync_start.flags = LOCAL_DMA_BUF_SYNC_START | LOCAL_DMA_BUF_SYNC_RW;
^
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:49:49: error: use of undeclared identifier 'LOCAL_DMA_BUF_SYNC_RW'
sync_start.flags = LOCAL_DMA_BUF_SYNC_START | LOCAL_DMA_BUF_SYNC_RW;
^
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:53:27: error: use of undeclared identifier 'LOCAL_DMA_BUF_IOCTL_SYNC'
drmIoctl(dmabuf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync_start);
^
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:58:29: error: variable has incomplete type 'struct local_dma_buf_sync'
struct local_dma_buf_sync sync_end = {0};
^
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:58:10: note: forward declaration of 'local_dma_buf_sync'
struct local_dma_buf_sync sync_end = {0};
^
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:60:20: error: use of undeclared identifier 'LOCAL_DMA_BUF_SYNC_END'
sync_end.flags = LOCAL_DMA_BUF_SYNC_END | LOCAL_DMA_BUF_SYNC_RW;
^
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:60:45: error: use of undeclared identifier 'LOCAL_DMA_BUF_SYNC_RW'
sync_end.flags = LOCAL_DMA_BUF_SYNC_END | LOCAL_DMA_BUF_SYNC_RW;
^
../../../home/xftroxgpx/build/1packages/chro/4_chromium-dev-git/fetch_gclient_base/checkout_root/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc:64:27: error: use of undeclared identifier 'LOCAL_DMA_BUF_IOCTL_SYNC'
drmIoctl(dmabuf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync_end);
^
8 errors generated.
I'll comment when I find the fix.
But they seem just a side effect of linux kernel being over 4.6.0, according to that code:
#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
,
Apr 3 2017
I feel dumb for making this, for some reason
,
Apr 3 2017
c#15, c#16 That looks like a real bug +some folks who last touched that code
,
Apr 4 2017
,
Apr 4 2017
So this is the change I did: https://codereview.chromium.org/2488673003/ At that time, the file seemed only to be built for Ozone. Also, as I commented there this did not build for use_sysroot = false on my Debian machine. I'd suggest to increase the minimal version number to 3.11.0 since per comment 13 it seems the initial comment about version 3.6 was wrong.
,
Apr 4 2017
I also uploaded https://codereview.chromium.org/2794183002/ to fix the problem in c#15.
,
Apr 4 2017
Manually applied patch from Comment 20, namely this: https://codereview.chromium.org/download/issue2794183002_1_10001.diff on latest master chromium and compiles without errors. Thanks! Comment 19 's suggestion: this line: #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) becomes: #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) Tested to compile ok with both above patches, with arch package installed: local/linux-api-headers 4.11.rc5.r0.ga71c9a1c779f-1 although(but this shouldn't matter) still running 4.10.0-gc470abd4fde4(until next reboot, that is) whilst compiling.
,
Apr 27 2017
Comment 19's suggestion is still not in. I'm applying it manually on latest git.
,
Apr 27 2017
This should hopefully be fixed after https://codereview.chromium.org/2805503003/ Please let me know if it's not so I can reopen
,
Apr 27 2017
,
Apr 28 2017
It was fixed, except the Comment 22 part, which is ok for me, I'm applying it manually anyway:) Thanks everyone!
,
Apr 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/63901da067e069e298595618e01c4758c7896ff5 commit 63901da067e069e298595618e01c4758c7896ff5 Author: thomasanderson <thomasanderson@google.com> Date: Fri Apr 28 18:56:12 2017 Fix kernel version condition for including dma-buf.h Kernel 4.11 merges the commit that added linux/dma-buf.h https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef96152e6a36e0510387cb174178b7982c1ae879 This CL increases the required kernel to include this file to 4.11. BUG= 707604 R=danakj@chromium.org Review-Url: https://codereview.chromium.org/2851803002 Cr-Commit-Position: refs/heads/master@{#468078} [modify] https://crrev.com/63901da067e069e298595618e01c4758c7896ff5/ui/gfx/linux/client_native_pixmap_dmabuf.cc
,
Apr 28 2017
lol that got auto-deleted right after I pressed 'Save changes'. Seen this before, once :) Here it is anyway (screenshot) - unless this gets auto-deleted too, after I press "Save changes' button. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 Deleted