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

10 exploratory build on openbsd 75 #869

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

donpellegrino
Copy link

Fix for #868.

Copy link
Collaborator

@Tpt Tpt left a 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"
Copy link
Collaborator

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.

Copy link
Author

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.

Copy link
Collaborator

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:
Copy link
Collaborator

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?

Copy link
Author

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.

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

Successfully merging this pull request may close these issues.

None yet

2 participants