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
BUG: fix building outside source directory #209
Conversation
Hi @andreas-schwab, the
... can you describe the problem you were seeing which required this patch? |
configure time is build time. |
/me rolls eyes As I asked previously, can you describe the problem you are seeing which required this patch? |
There is no seccomp.h in ${top_srcdir}/include. |
One more time: please explain your build system so we can understand how/why this is happening. I would like to try to reproduce this. |
There is nothing that creates the file in there. |
Seriously @andreas-schwab please explain what build system you are using and how we can reproduce the build failure you are seeing. The code has been this way for almost seven years and this is the first we have heard of a failure due to this; I just want to understand what your build system is doing that is so unique. If you are not able to share the information on your build system, or supply a reproducer, I am not inclined to merge this PR. |
There is nothing special, just a normal build: Making all in tools |
Can you show us your entire build process, starting from doing a git clone? This may seem a bit extreme, but as I said previously, this doesn't seem to be broken for most people so I'm trying to figure out what is happening in your case that is unique. As an example, here is what I see with the current master branch:
|
$ make |
Please do the following and show us the output from all of the commands:
|
configure: loading site script /usr/share/site/riscv64-suse-linux-gnu make --quiet --no-print-directory all-recursive |
You did not show the git clone or the autogen.sh, please follow the instructions exactly in my earlier comment. I don't understand why you keep withholding the requested information, but it is making it very difficult for us to properly review this PR. Also, it looks like this is a RISC-V build target, yes? Are you building natively or cross-compiling? |
Note to self: it is also odd that the build works for everything in "src/", but fails in "tools/". There are plenty of source files in "src/" which include "seccomp.h" so I would have expected the build to fail there as well, but it doesn't. Something is very odd here. |
src/Makefile.am already contains -I${top_builddir}/include. |
|
@andreas-schwab I'd really like to understand this problem more, could you answer the questions please?
I'm guessing this is all due to cross-compiling, but I can't be certain due to the lack of information. I also have some concerns about the resulting binary, it would be nice to have a conversation about cross-compiling (does the resulting library work properly?) if you are able to answer the questions above. |
@pcmoore I am also hitting a similar issue when building from a VPATH. The issue is solved by this patch. To reproduce the issue I've seen, you can use these steps:
|
Move -I${top_builddir}/include to toplevel so that it is available in all subdirs. This is needed to find <seccomp.h> in the build directory, since it is now a generated file. Signed-off-by: Andreas Schwab <schwab@suse.de>
Thanks, the reproducer helps a lot. This patch looks good to me, are you okay with this @drakenclimber? |
Since this is a trivial fix and it has been five days I'm going to go ahead and merge this with 26b483b, thanks everyone! |
Move -I${top_builddir}/include to toplevel so that it is available in all
subdirs. This is needed to find <seccomp.h> in the build directory, since
it is now a generated file.
Signed-off-by: Andreas Schwab schwab@suse.de