Bug 84428 - libdrm build failure on i386: error: size of unnamed array is negative
Summary: libdrm build failure on i386: error: size of unnamed array is negative
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL: https://launchpad.net/~oibaf/+archive...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-28 17:13 UTC by Fabio Pedretti
Modified: 2014-09-28 19:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
compilation with V=1 (48.08 KB, text/plain)
2014-09-28 17:52 UTC, Tobias Klausmann
Details
fix 32bit builds (863 bytes, patch)
2014-09-28 18:25 UTC, Emil Velikov
Details | Splinter Review

Description Fabio Pedretti 2014-09-28 17:13:27 UTC
After latest changes libdrm fails to build on i386, ok on amd64:
In file included from ../../nouveau/private.h:4:0,
                 from ../../nouveau/abi16.c:29:
../../libdrm.h: In function 'drm_munmap':
../../libdrm.h:81:4: error: size of unnamed array is negative
    STATIC_ASSERT(LARGE_OFF_T % 2147483629 == 721 &&
    ^
Makefile:475: recipe for target 'abi16.lo' failed

Build log:
https://launchpadlibrarian.net/185985753/buildlog_ubuntu-utopic-i386.libdrm_2.4.56%2Bgit1409281830.537b1c~gd~u_FAILEDTOBUILD.txt.gz
Comment 1 Emil Velikov 2014-09-28 17:41:41 UTC
Sounds like AC_SYS_LARGEFILE is not doing it's job properly.
Can you attach the output of $ make V=1 ?
Comment 2 Tobias Klausmann 2014-09-28 17:43:23 UTC
Yeah i see that here, too.

https://build.opensuse.org/build/home:tobijk:X11:XOrg/openSUSE_Factory/i586/libdrm/_log
Comment 3 Tobias Klausmann 2014-09-28 17:52:40 UTC
Created attachment 107016 [details]
compilation with V=1
Comment 4 Emil Velikov 2014-09-28 18:25:35 UTC
Created attachment 107018 [details] [review]
fix 32bit builds

Seems like one of the files was missing the config.h inclusion.
Can you guys give the patch a try ? Bit short on 32bit setup atm.
Comment 5 Emil Velikov 2014-09-28 18:42:07 UTC
Comment on attachment 107018 [details] [review]
fix 32bit builds

Scratch that. I've missed out that one normally includes the system headers prior to the driver specific ones, so this won't help. Additionally adding the include in here and not in the C files is setting up a trap.

Rob has pushed a patch to the repo which handles most/all of the cases. Can you guys give it a test.
Comment 6 Tobias Klausmann 2014-09-28 19:28:24 UTC
Fixed with:
c09dcbc736afb2e6a05d4cfc5c3d878ace43e2ba + 	0599f2fd6aea0421a91d9297dcd454aa416dfbaa


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.