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
10 exploratory build on openbsd 75 #869
base: main
Are you sure you want to change the base?
10 exploratory build on openbsd 75 #869
Conversation
…test. Test was run with environment variable set for llvm instead of the define in build.rs. Additional clean room testing is needed to ensure the changes are self-contained and complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for working on it. This is very welcome!
@@ -31,6 +31,7 @@ digest.workspace = true | |||
hex.workspace = true | |||
json-event-parser.workspace = true | |||
md-5.workspace = true | |||
openssl-sys = "0.9.102" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will try compile openssl-sys for all plateforms, includings ones where we use the host native SSL implementation if the http-client-native-tls
feature is enabled (macOS, Windows) and WASM where openssl can't be compiled. I would tend to think it would be better to dynamically link to libressl on OpenBSD, it seems to work or, if not, only add this dependency if the target is openbsd and the http-client-native-tls
feature is enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes perfect sense. I will investigate the dynamic linking approach on OpenBSD and try that instead.
I have to research this a bit further, but it seemed that an older version of openssl-sys was being used in the build. I have to track down how that happened without it being listed in Cargo.toml or Cargo.lock files. I could have misinterpreted the build errors at the time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This is weird, I see openssl-sys
in the lock file. It is a dependency of native-tls
that is itself a dependency of oxhttp
if the native-tls
feature is enabled (this feature is enabled by the http-client-native-tls
feature of oxigraph
)
When cloning this codebase, don't forget to clone the submodules using | ||
`git clone --recursive https://github.com/oxigraph/oxigraph.git` to clone the repository including submodules or | ||
`git submodule update --init` to add the submodules to the already cloned repository. | ||
|
||
When building on OpenBSD, libclang must be available for | ||
RocksDB. Setting the LIBCLANG_PATH environment variable will ensure it | ||
is found. For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can maybe just link from there to bindgen installation requirement that covers this topic in more details. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linking to that documentation is clearly the better way to go. Thanks! I just need to check that the documented export LIBCLANG_PATH=/usr/local/lib
actually works since with OpenBSD 7.5 and the llvm package I tested against, the libclang.so.0.0 is under /usr/local/llvm16/lib
. If it fails then the fix would be to file a separate issue with the bindgen project for a documentation update over there.
Fix for #868.