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

Not compiling on FreeBSD #1214

Open
trapexit opened this issue Jul 15, 2023 · 2 comments
Open

Not compiling on FreeBSD #1214

trapexit opened this issue Jul 15, 2023 · 2 comments

Comments

@trapexit
Copy link
Owner

trapexit commented Jul 15, 2023

gmake INTERNAL_FUSE=0
(...)
c++   -std=c++11 -Wall -pipe -MMD -Iinclude -Ibuild -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DPACKAGE_VERSION=\"2.9.7-mergerfs_2.30.0\" -DFUSERMOUNT_DIR=\"/usr/local/bin\" -c lib/cpu.cpp -o build/cpu.o
lib/cpu.cpp:19:10: error: no matching function for call to 'sched_getaffinity'
  return sched_getaffinity(thread_id_,
         ^~~~~~~~~~~~~~~~~
/usr/include/sched.h:43:5: note: candidate function not viable: cannot convert argument of incomplete type 'const pthread_t' (aka 'pthread *const') to 'pid_t' (aka 'int') for 1st argument
int sched_getaffinity(pid_t pid, size_t cpusetsz, cpuset_t *cpuset);
    ^
lib/cpu.cpp:28:10: error: use of undeclared identifier 'pthread_setaffinity_np'; did you mean 'sched_setaffinity'?
  return pthread_setaffinity_np(thread_id_,
         ^~~~~~~~~~~~~~~~~~~~~~
         sched_setaffinity                                                                       
/usr/include/sched.h:44:5: note: 'sched_setaffinity' declared here                               
int sched_setaffinity(pid_t pid, size_t cpusetsz, const cpuset_t *cpuset);
    ^
lib/cpu.cpp:28:33: error: cannot initialize a parameter of type 'pid_t' (aka 'int') with an lvalue of type 'const pthread_t' (aka 'pthread *const')
  return pthread_setaffinity_np(thread_id_,
                                ^~~~~~~~~~
/usr/include/sched.h:44:29: note: passing argument to parameter 'pid' here                       
int sched_setaffinity(pid_t pid, size_t cpusetsz, const cpuset_t *cpuset);
                            ^
3 errors generated. 

Originally posted by @probonopd in #562 (comment)

@probonopd
Copy link

Should have mentioned, I tried to compile on FreeBSD 13.1-RELEASE-p3.

@trapexit
Copy link
Owner Author

I defacto stopped supporting FreeBSD some time ago as the Linux version of FUSE and other misc features were not supported on FreeBSD. I'm not opposed to supporting it again but it just hasn't been a priority and was always best effort from the start given I don't use the platform. Happy to keep this ticket open but I don't know when I'll get around to looking at it.

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

No branches or pull requests

2 participants