-
Notifications
You must be signed in to change notification settings - Fork 45
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
OpenSSL issue when compiling on NetBSD #143
Comments
This has been the case for me as well. I could only ever get Comtrya built on FreeBSD by first editing Cargo.toml and removing the "vendored" feature from the openssl crate. Doing so resulted in a Comtrya binary that worked for me, however I have no idea what side effects it may cause (e.g. I have only ever used local manifests). Would be interesting to know the rationale for defining it this way in the first place and what a proper solution might be. |
I don't remember entirely why this was set to vendored, but I seem to recall it was when I added remote manifest support with Git. Sadly, comtrya#143 does seem to indicate this causes issues on BSD systems. Let's try without and see what breaks
Let's see what happens if I remove it 😮 #144 |
OK. Looks like this was a problem because Windows doesn't have a system level OpenSSL to build with. I've told Cargo to only vendor on Windows. I hope this helps. Should be merged when the tests pass. |
I don't remember entirely why this was set to vendored, but I seem to recall it was when I added remote manifest support with Git. Sadly, #143 does seem to indicate this causes issues on BSD systems. Let's try without and see what breaks
This fix has been merged to main. Going to close this issue, but please feel free to reopen if there are any further problems. |
Sounds good, thanks! Kraileth had mentioned this to me over email and it worked. I hit another issue, but I don't think it is comtrya specific but mostly how NetBSD handled the shared object library for libssl. |
Earlier versions of Comtrya tried to avoid OpenSSL altogether by using ring, but it was rather unstable. I'll try again on Monday. |
If you just want a reference from NetBSD, here is the terminal output. It compiles with not using the vendored version of openssl. But it hits a runtime issue. The warning is for an import I have not started using yet that I will be using in the pkgin package provider to set everything up for the boostrap. |
What does I may need to try and get a NetBSD VM running to test this myself, but one of the goals of Comtrya is to run everywhere; so I'm happy to help get this working |
@martintc This is interesting. Are you building with Cargo.toml as is after the recent fix or did you modify anything? At least for me on FreeBSD this does not work for some reason. I need to comment out the line Now FreeBSD certainly isn't Windows and I'm not sure what's going on with cargo there. Would be interesting to know if it works as intended on NetBSD. |
Damn, that's frustrating @kraileth. I'm going to need to dig in to this further. I am really surprised Cargo didn't respect that import definition |
@rawkode I can offer you SSH access to a FreeBSD jail and a NetBSD VM with Rust and Git installed if it helps. Just drop me a mail with a public key if you want me to provide the two dev systems. |
This is with the adjustment to What is look like is the linker is finding Email from NetBSD mailing list To see any changes to my fork for working on NetBSD |
Huh, interesting. I pulled the recent change from main into my NetBSD branch and yea, Cargo doesn't seem to be respecting the Have removed those lines from my NetBSD branch. So now that branch compiles without error on NetBSD. |
@kraileth I've dropped it to you via Discord. |
@rawkode PR#145 builds successfully on NetBSD 9.2. Now, we just need to solve the missing libssl.so.1.1 issue. |
Ah. So it still won't run? Ok. I'll keep reading |
Something I will test when I get a chance. Looks like I have the library, it is just a matter of finding it during runtime. Looking at the cargo book (still newish to Rust), we may be able to link that library in during compile time like so:
Only issue I see here is that since it is located in Or something like this:
With the appropriate paths needed. |
In the FreeBSD jail and the netbsd machine, I can successfully run:
from the build of PR #145 |
Mhmm, wonder if it is because I wasn't providing options. Just Awesome! I'll get to work on a package provider for pkgin then! |
Best of luck. Feel free to jump on the Discord if you need any help or advice. There's a Comtrya channel 😀 |
@rawkode Sounds good, I have joined the discord. |
Pulled in the most recent changes in main into my development test and have been trying to run the
Well, it is slightly different now. Instead of complaining of |
Hmm. I wonder what's different about your netbsd box vs the VM @kraileth provided? |
Are you using doas or sudo when when running? |
For, in a new macOS, run the binary:
|
I am working on trying to port comtrya over to NetBSD and ran into an initial issue in the build process. Look like it has an issue with the vendored version of openssl.
Here is the output:
OS: NetBSD 9.2
Arch: Amd64
I have also opened an issue on OpenSSL's github.
The text was updated successfully, but these errors were encountered: