-
-
Notifications
You must be signed in to change notification settings - Fork 869
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: build on OpenBSD 7.6 fails 'Error: static assert: "Websocket server not implemented...' #2977
Comments
@lfzamora81 Please note that FreeBSD does not encounter such issue, given those packages, so I wonder what the difference is here. @adamdruppe |
I don't think you use the websocket server here so you will want to disable it. These lines right here enable optional features: https://github.com/abraunegg/onedrive/blob/master/src/arsd/cgi.d#L579 Compile it with |
Please can you test PR #2978 to resolve your issue. To clone the PR to potentially resolve your issue, you can use a script like the following:
When running the PR, your version should be: onedrive v2.5.3-1-gaeb0a0e or greater. If you can report back regarding this fix that would be greatly appreciated. Thanks for the suggestion. I took a slightly different route (not deleting those lines), to use the OS version itself in a similar manner to FreeBSD as not to potentially impact Linux use. |
So @adamdruppe @abraunegg both your fixes work to get past the initial issue but then a compiler (DMD) bug seems to crop up. I may try to use LDC or file a bug with DMD (as the output suggests, lol) I did have to modify the script slightly to account for ksh and gmake but other than that it appears to have run as expected with the error coming from DMD. Of course it is odd that there are 'out of memory' errors on a system with 8GB of ram and not much else running. Here is the full output:
|
How do I compile with Even so, would it be possible to not have to compile a minimal version? Is there a way to leave in or allow |
I just provided the library file, I don't know how it is built here. (and since it is a generic library, it includes a lot more features than any one individual project tends to use) But that linked PR achieves the same goal anyway, opting out of the websocket class for the openbsd OS. So it'd have the same result anyway. The compiler out of memory thing has some other cause. It isn't uncommon for the D compiler to use several gigabytes of ram though, it might be legitimately running out. (and odds are most its allocations are huge blocks of zeroes... on linux when dmd runs out of memory, i enable this zram feature that compresses pages and cuts memory use down to like 1/10th. If openbsd has similar you might try that and see what happens) |
To compile the application manually you must comply with the requirements as per https://github.com/abraunegg/onedrive/blob/master/docs/install.md#building-from-source---high-level-requirements
Do you have any swap space allocated - I cant see this in your OpenBSD filesystem layout. |
@abraunegg
Unrelated to this issue, I did order a memory upgrade so should have 16GB of memory soon. If it works after the upgrade, there's definitely a need for more than 1GB of system and swap space =P Or something else weird going on. |
How do you enable this feature / capability in the DMD / LDC compiler - I dont see anything referred to that in the help / compiler options. |
It is a linux kernel module, not a compiler feature. I don't know if openbsd has something similar or not. reference https://wiki.archlinux.org/title/Improving_performance#zram_or_zswap |
Worth noting that the out of memory thing could also be a simple compiler bug; more often than not in user code, out of memory means you tried to do something like array.length = -1 (since -1 wraps around to the maximum 64 bit number...) and maybe something similar done here. I don't have enough info to say. |
zram is apparently not a feature in either FreeBSD or OpenBSD as far as my limited Google-fu is telling me. I did submit a bug to DMD with reference to this issue for further background: https://issues.dlang.org/show_bug.cgi?id=24863 Question: is there a way to choose between the DMD or LDC compiler using the |
Unfortunately I am out of suggestions for you then at this point in time. The 'out-of-memory' error always was being seen on ARM builds due to no swap space being available. |
Doesn't look like it. The I don't think it its OOM, just that the allocator is placing things differently and causing the |
The configure script will detect which compiler is installed / activated |
LDC will not exhibit this issue. The exception stack trace shows a dmd only issue (or at least I'm pretty sure ldc won't be calling into OutBuffer for object file creation). |
When attempting to install ldc-1.35.0p0 from ports:
sad trombone |
What about installing LDC this way:
|
sadder trombone |
Your path of resolution then looks like this:
I will leave this issue ticket open |
Related: ldc-developers/ldc#4435 |
@lfzamora81 |
Sounds good. I will continue to monitor progress on the LDC on OpenBSD issue as well as the bug submitted for DMD and whichever resolves first, move forward with it to test and see where we end up. |
So that's a bit embarrassing. I got a clue from a reply from the ports mailing list (in regard to DMD, LDC still broken with no comment about it) about increasing data size limits in https://marc.info/?l=openbsd-ports&m=173180799125734&w=2 After increasing
The ldl library is a Linux thing apparently and there is no OpenBSD equivalent (so far as I can tell...). So shot in the dark, I removed the reference in the Makefile (
|
I'm just about to shut down for bed, but it said inotify is from cgi.d but it doesn't use it - note the mangled name shows it comes from in here: https://github.com/abraunegg/onedrive/blob/master/src/monitor.d#L7 bsd's kqueue function can do similar to inotify but it isn't a drop in replacement. |
Thats correct - this comes from the inotify support which is required to monitor file changes on Linux. I wonder what/how the FreeBSD port is solving this .... |
Maybe devel/libinotify? It's listed on the FreeBSD port library dependencies and also is available on OpenBSD: https://www.freshports.org/net/onedrive/
|
@lfzamora81 |
@lfzamora81 |
I installed all the same dependencies listed for FreeBSD but still getting the same errors. Perhaps if I knew what to modify the What is the Free/OpenBSD library equivalent? Maybe if I can find the FreeBSD |
Success! After some digging around I found that the Compiled quickly and without error but then got a runtime error:
Hmmm. So I did some digging and found that the After that, it worked!
|
Congrats, well done! |
Well done on building on OpenBSD. Please let me know if any other issues arise. Would you be able to create a PR to document how you built so it could be added here: https://github.com/abraunegg/onedrive/blob/master/docs/install.md#building-from-source---high-level-requirements ? |
Ah, good call. Yeah, I will work on adding an OpenBSD section to that doc page soon. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
Trying to build from source for OpenBSD 7.6
Used
bash configure
since default OpenBSD ksh produces errors.Then use
gmake clean; gmake;
for the same reason.However, these then produce the following output including errors:
Operating System Details
OpenBSD obsd.***.com 7.6 GENERIC.MP#338 amd64
Client Installation Method
From Source
OneDrive Account Type
Personal
What is your OneDrive Application Version
N/A
What is your OneDrive Application Configuration
What is your 'curl' version
Where is your 'sync_dir' located
Local
What are all your system 'mount points'
What are all your local file system partition types
How do you use 'onedrive'
N/A
Steps to reproduce the behaviour
doas pkg_add bash
version 5.2.32. (this may have actually beendoas pkg_add gmake
version 4.4.1.bash configure
gmake clean; gmake
Complete Verbose Log Output
Screenshots
Other Log Information or Details
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: