Bug 50604 - [compile error] ../../../../../src/mesa/libdricore/../main/api_arrayelt.c:45:27: fatal error: main/dispatch.h: No such file or directory
Summary: [compile error] ../../../../../src/mesa/libdricore/../main/api_arrayelt.c:45:...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All Linux (All)
: high critical
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-02 00:20 UTC by Fabio Pedretti
Modified: 2014-08-05 20:35 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Fabio Pedretti 2012-06-02 00:20:14 UTC
Since recent mesa git changes I am getting this compile error:
  CC     api_arrayelt.lo
../../../../../src/mesa/libdricore/../main/api_arrayelt.c:45:27: fatal error: main/dispatch.h: No such file or directory
compilation terminated.
make[4]: *** [api_arrayelt.lo] Error 1
make[4]: Leaving directory `/build/buildd/mesa-8.1~git1206020839.775ba1~gd~p/build/dri/src/mesa/libdricore'

Full log here:
https://launchpadlibrarian.net/106661991/buildlog_ubuntu-precise-i386.mesa_8.1~git1206020839.775ba1~gd~p_FAILEDTOBUILD.txt.gz
Comment 1 Tapani Pälli 2012-06-04 06:10:27 UTC
It seems dependencies for parallel build in makefiles may not be set correctly, one can see that dispatch.h gets generated only a bit after build of libdricore needing it fails.
Comment 2 Fabio Pedretti 2012-06-05 07:21:43 UTC
I tried doing a non parallel build but I get the same error:
https://launchpadlibrarian.net/106916928/buildlog_ubuntu-precise-i386.mesa_8.1~git1206051530.555e00~gd~p_FAILEDTOBUILD.txt.gz
Comment 3 Darren Salt 2012-06-14 12:00:36 UTC
The problem looks like include path brokenness. Generated source is put in the build tree, but it's looked for in the source tree.

I managed to get a build done by copying the following from build to source:

src/glsl/builtin_function.cpp
src/mapi/glapi/glapitable.h
src/mesa/main/api_exec_es1_dispatc.h
src/mesa/main/api_exec_es1_dispatch.h
src/mesa/main/api_exec_es1_remap_helper.h
src/mesa/main/api_exec_es2_dispatch.h
src/mesa/main/api_exec_es2_remap_helper.h
src/mesa/main/dispatch.h
src/mesa/main/enums.c
src/mesa/main/remap_helper.h
src/mesa/x86-64/matypes.h
src/mesa/x86/matypes.h
Comment 4 Christopher James Halse Rogers 2012-06-14 16:35:26 UTC
(In reply to comment #3)
> The problem looks like include path brokenness. Generated source is put in the
> build tree, but it's looked for in the source tree.

Correct; this is an out-of-tree build issue.

Sadly, the naive solution of changing those references to be relative to $(top_builddir) rather than $(srcdir) runs into problems in src/mesa/Makefile; possibly the best way to fix this is to continue the automakification to src/mesa.
Comment 5 nobled 2012-06-15 10:25:12 UTC
(In reply to comment #4)
> Sadly, the naive solution of changing those references to be relative to
> $(top_builddir) rather than $(srcdir) runs into problems in src/mesa/Makefile;
> possibly the best way to fix this is to continue the automakification to
> src/mesa.
Is having both a problem? Or just using $(builddir) [not top]?
Comment 6 Matt Turner 2012-08-24 18:08:18 UTC
I don't think this is still relevant. Please reopen if it is.


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.