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

Unable to build on MacOs due to undeclared inclusions even with clang version specified #525

Open
melodicht opened this issue Sep 27, 2023 · 6 comments

Comments

@melodicht
Copy link

The following is what I have typed into my terminal, and I have included my clang --version output.
https://pastebin.com/2Skf2PVa

The key error message is this:

ERROR: /Users/usr/Documents/jetting/vere/pkg/urcrypt/BUILD.bazel:7:13: Compiling pkg/urcrypt/argon.c failed: undeclared inclusion(s) in rule '//pkg/urcrypt:urcrypt':
this rule is missing dependency declarations for the following files included by 'pkg/urcrypt/argon.c':
  '/usr/local/include/blake2.h'

I have tried building on both the develop and release branches, but the error messages are the same. Any help is appreciated. Thank you.

@joemfb
Copy link
Member

joemfb commented Sep 28, 2023

@melodicht sorry for the delay. the bazel build is quite difficult to debug, but it looks to me like bazel is finding blake2.h in /usr/local/ instead of vendor'd in pkg/urcrypt/argon2, and then erroring out due to the missing dependency declaration?

I'd try moving/removing /usr/local/include/blake2.h and rebuilding. Failing that, I'd try bazel clean and the bazel build again, and see if you get a different error.

@matthew-levan any other ideas?

@melodicht
Copy link
Author

melodicht commented Sep 28, 2023

Thank you for the response. I tried finding blake2.h, but I can't seem to find it at all, even after searching my entire computer. I do not have a usr directory, only a pkg directory. I have included the full content of the vere directory in this pastebin: https://pastebin.com/KWmid3RW

@matthew-levan
Copy link
Contributor

matthew-levan commented Sep 28, 2023 via email

@melodicht
Copy link
Author

Thanks. By output, do you mean what's in it? Here's the pastebin: https://pastebin.com/QZ2Ty1qk

I added .bak to the back of all of the files that had the undeclared inclusion error, and now it builds completely. I have yet to test it out. The following are the list of files that I had to add .bak to:

  • blake2.h
  • gmp.h
  • uv.h
  • All of the .h files in the uv directory

@matthew-levan
Copy link
Contributor

matthew-levan commented Sep 29, 2023 via email

@matthew-levan
Copy link
Contributor

I found a way to force Bazel to specifically look for these headers in our local build directories instead of the system directories: instead of #include "blake2.h" it would be #include "blake2/blake2.h".

It's not too pretty but I'm open to the change since it'd ease my pain as I run into the same issue you described in the original post, but with urcrypt.

cc @joemfb

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

3 participants