Bug 89364 - c99_alloca.h:40:22: fatal error: alloca.h: No such file or directory
Summary: c99_alloca.h:40:22: fatal error: alloca.h: No such file or directory
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: mesa-dev
QA Contact: mesa-dev
Keywords: regression
Depends on:
Reported: 2015-02-27 18:48 UTC by Vinson Lee
Modified: 2015-03-04 23:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Proposed fix for FreeBSD (646 bytes, patch)
2015-02-28 15:23 UTC, Brian Paul
Details | Splinter Review

Description Vinson Lee 2015-02-27 18:48:27 UTC
mesa: da85ab4b655a28cec33a81dae78ebe375fef9aa1 (master 10.6.0-devel)

MinGW build error

In file included from nir/nir_live_variables.c:29:0:
../../include/c99_alloca.h:40:22: fatal error: alloca.h: No such file or directory
 #  include <alloca.h>
Comment 1 Brian Paul 2015-02-27 19:42:16 UTC
The _MSC_VER check fails on MinGW.  I'll post a patch...
Comment 2 Brian Paul 2015-02-27 22:27:54 UTC
Fixed by 098e5bf3b37431af2a9156789cbc9534f0b70235
Comment 3 Vinson Lee 2015-02-28 02:17:11 UTC
mesa: 76cd0f00f44c0935dc7d6a0e14e0515f08a8e1dc (master 10.6.0-devel)

Same build error with FreeBSD.

  CC       nir/nir_from_ssa.lo
In file included from nir/nir_from_ssa.c:29:
../../include/c99_alloca.h:44:12: fatal error: 'alloca.h' file not found
#  include <alloca.h>
Comment 4 Brian Paul 2015-02-28 15:23:32 UTC
Created attachment 113888 [details] [review]
Proposed fix for FreeBSD

Vinson, can you try this patch?
Comment 5 Jonathan Gray 2015-03-01 02:39:46 UTC
OpenBSD (and likely other BSDs/Mac OS X) also needs to include stdlib.h for alloca().
Comment 6 Vinson Lee 2015-03-01 07:06:07 UTC
DragonFly BSD also has this same build error.

Mac OS X does not have this build error.
Comment 7 Brian Paul 2015-03-03 15:41:14 UTC
Vinson, can you retest with the latest code and close this bug if things check out?  Thanks.
Comment 8 Vinson Lee 2015-03-04 23:37:45 UTC
I no longer see this specific build error.

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.