Bug 89530 - FTBFS in loader: missing fstat
Summary: FTBFS in loader: missing fstat
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-11 10:48 UTC by Vadim Rutkovsky
Modified: 2015-03-16 21:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Always include stat header in loader (729 bytes, text/plain)
2015-03-11 10:48 UTC, Vadim Rutkovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Rutkovsky 2015-03-11 10:48:57 UTC
Created attachment 114216 [details]
Always include stat header in loader

FTBFS on customized yocto 1.7 (Gnome Continuous):

libtool: compile:  gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.6.0-devel\" "-DPACKAGE_STRING=\"Mesa 10.6.0-devel\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.6.0-devel\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1 -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1 -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1 -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -DHAVE_SHA1_IN_LIBNETTLE=1 -I. -I../../../src/loader -DUSE_EXTERNAL_DXTN_LIB=1 -D_GNU_SOURCE -DUSE_SSE41 -DNDEBUG -DHAVE_XLOCALE_H -DHAVE_STRTOF -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DGLX_USE_DRM -DHAVE_LIBUDEV -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DHAVE_DRI3 -DHAVE_MINCORE -DHAVE_LLVM=0x0306 -DLLVM_VERSION_PATCH=0 -I../../../include -I../../../src -fvisibility=hidden -Werror=vla -Werror=pointer-arith -I../../../src/mesa/drivers/dri/common/ -I../../src/mesa/drivers/dri/common/ -I../../../src/mesa/ -I../../../src/mapi/ -DUSE_DRICONF -I/usr/include/libdrm -O2 -g -m64 -mtune=generic -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -MT libloader_la-xmlconfig.lo -MD -MP -MF .deps/libloader_la-xmlconfig.Tpo -c ../../../src/mesa/drivers/dri/common/xmlconfig.c  -fPIC -DPIC -o .libs/libloader_la-xmlconfig.o
mv -f .deps/libloader_la-pci_id_driver_map.Tpo .deps/libloader_la-pci_id_driver_map.Plo
../../../src/loader/loader.c: In function 'udev_device_new_from_fd':
../../../src/loader/loader.c:163:4: error: implicit declaration of function 'fstat' [-Werror=implicit-function-declaration]
    if (fstat(fd, &buf) < 0) {
    ^
cc1: some warnings being treated as errors
Makefile:602: recipe for target 'libloader_la-loader.lo' failed
make[2]: *** [libloader_la-loader.lo] Error 1
Comment 1 Emil Velikov 2015-03-11 19:17:14 UTC
Sigh... you again with the fstat() implicit declaration :P
But seriously that code has been there for 3+ months and no-one has reported a thing, despite the missing include. There must be something really special in your setup.

Anywho this patch should address the error. Can you give it a try ?
http://patchwork.freedesktop.org/patch/44455/

Thanks
Emil
Comment 2 Emil Velikov 2015-03-11 19:35:57 UTC
And just in case there was some misunderstanding - your system is reporting the correct thing. I'm wondering why we haven't seen this before.
Comment 3 Vadim Rutkovsky 2015-03-11 20:17:12 UTC
(In reply to Emil Velikov from comment #1)
> Sigh... you again with the fstat() implicit declaration :P
> But seriously that code has been there for 3+ months and no-one has reported
> a thing, despite the missing include. There must be something really special
> in your setup.

Its Continuous being extremely pedantic during build - this will most likely not affect distributions, but might uncover some bugs.

> Anywho this patch should address the error. Can you give it a try ?
> http://patchwork.freedesktop.org/patch/44455/

Rebuild mesa from master with this patch, so +1 from me
Comment 4 Emil Velikov 2015-03-16 21:01:20 UTC
> Rebuild mesa from master with this patch, so +1 from me
What is G+ doing to us :P

Pushed to master

commit 771cd266b9d00bdcf2cf7acaa3c8363c358d7478
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Wed Mar 11 19:12:35 2015 +0000

    loader: include <sys/stat.h> for non-sysfs builds


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.