Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile in nested directory #104

Closed
sergey-suloev opened this issue Jun 3, 2018 · 6 comments
Closed

Can't compile in nested directory #104

sergey-suloev opened this issue Jun 3, 2018 · 6 comments

Comments

@sergey-suloev
Copy link

When I create a nested build directory and then invoke configure & make from it I always get compilation errors, like:

In file included from /home/sergey/Projects/orpaltech/mesa-anholt/src/broadcom/compiler/v3d_compiler.h:36:0,
from /home/sergey/Projects/orpaltech/mesa-anholt/src/broadcom/compiler/vir_live_variables.c:29:
/home/sergey/Projects/orpaltech/mesa-anholt/src/compiler/nir/nir.h:48:25: fatal error: nir_opcodes.h: No such file or directory
#include "nir_opcodes.h"
^
compilation terminated.

anholt added a commit that referenced this issue Jun 5, 2018
You'd need src/broadcom/cle/ in the -I previously, for srcdir != builddir.
nir was fine at that, but automake didn't have it.

Bugzilla: #104
anholt added a commit that referenced this issue Jun 5, 2018
You'd need src/broadcom/cle/ in the -I previously, for srcdir != builddir.
nir was fine at that, but automake didn't have it.

Bugzilla: #104
@anholt
Copy link
Owner

anholt commented Jun 6, 2018

commit 2b1b2cbf619f9b3d578dabb0956bd5a248b6a89c (origin/master)
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Jun 5 08:50:55 2018 -0700

    v3d: Be more explicit about include directory from our generated code.
    
    You'd need src/broadcom/cle/ in the -I previously, for srcdir != builddir.
    nir was fine at that, but automake didn't have it.
    
    Bugzilla: https://github.com/anholt/mesa/issues/104

@anholt anholt closed this as completed Jun 6, 2018
@sergey-suloev
Copy link
Author

sergey-suloev commented Jun 6, 2018

Why close? It is not fixed by the change above.

@anholt
Copy link
Owner

anholt commented Jun 6, 2018

Is it not? It passed on travis for me, with a srcdir != builddir test added.

@anholt
Copy link
Owner

anholt commented Jun 6, 2018

src/broadcom/Makefile.am has "-I$(top_builddir)/src/compiler/nir ", which is where your built nir_opcodes.h should be. are you maybe trying to just build from a subdirectory of your builddir, instead of the whole thing?

@sergey-suloev
Copy link
Author

sergey-suloev commented Jun 6, 2018

Yes, I am creating a build directory inside mesa directory. This is a typical approach I have used for many libraries, and it all worked fine. This is how you can preserve initial source tree from modifications.

@sergey-suloev
Copy link
Author

sergey-suloev commented Jun 6, 2018

Oh, my bad, excuse me.
I did a full cleanup & rebuild again - it works!
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants