-
Notifications
You must be signed in to change notification settings - Fork 61
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
[ENHANCEMENT] xtd - FreeBSD support #241
Comments
To the switch case on OSTYPE to see required packages, this seems to cover everything
Now looking into changing the makefile to use freebsd headers instead for the next part. EDIT: added libsysinfo |
sys/statfs can be replaced with sys/statvfs, I think I will be able to get it to compile soon as there aren't too many other errors. One worrying thing is that console.cpp uses linux specific headers, there are crossplatform alternatives available which I might have to use. |
One last error to fix and I think it should be portable, getting a few such errors when casting pthread to int:
from bool thread::cancel(intmax_t handle) {
if (static_cast<pthread_t>(handle) == PTHREAD_FAILED) return false;
return pthread_cancel(static_cast<pthread_t>(handle)) == 0;
} |
Hi, First off all, thank you for your interest to xtd. 😀 I can't install FreeBSD on my system because it doesn't work on Apple silicon M1.
If seems to be correct.
and
It seems that previous errors are due to native.core.unix is designed to linux and not to linux. I am the source of this problem, sorry. The best way to solve this problem would be to create a new xtd.core.native.linux for linux and associate xtd.core.native.unix with FreeBSD. I can take care of modifying the CMakeLists.txt file and creating and calling the right native libraries. However, I won't be able to validate the xtd.core.native.unix library for FreeBSD until I have a working system. |
Thanks for the quick reply, another issue seems to be that the __slong__ workaround is unnecessary on BSD and thus the only solution I thought of so far is to #ifdef it out of convert.h and so on. I'm referring to
except this breaks on FreeBSDas it works as other platforms. I tried to ifdef it out on the basis |
Here is my diff so far, I don't want to consolidate this all into a PR because I don't understand the codebase at all at the moment, perhaps some of this is useful though I suspect there will be other ways to rectify some issues. |
I have just made the following changes:
For the last point, I updated files without having a Unix operating system. Could you please check if this build works for you and if there is a problem, please let me know. Thanks you in advance. |
I hadn't seen your last message. |
|
I updated the xtd.core.native.unix library and applied your patch. However, I still don't have a working FreeBSD version. Could you (@MCCLXXXVII) tell me if it works for you. Thanks for your help. |
Here is the output of the build process (failed) |
Thanks for your comments.
@MCCLXXXVII, do you have any idea what's going on ? |
xtd - FreeBSD support
Library
xtd
Enhancement
Add support for FreeBSD
Description
Great library, was looking forward to use it. Been patching the install script bit by bit seeing what's missing to get FreeBSD support and it seems to be a bit beyond my ability. I'll be working on this myself but if there is another person who is more capable please, the demand is there - even if it's just one person 😛
The text was updated successfully, but these errors were encountered: