ocamlfuse icon indicating copy to clipboard operation
ocamlfuse copied to clipboard

ocamlfuse 2.7.1-cvs7 doesnt compile on OSX Big Sur

Open hubrix opened this issue 4 years ago • 4 comments

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
[ERROR] The compilation of ocamlfuse failed at "/Users/mark/.opam/opam-init/hooks/sandbox.sh build dune build -p ocamlfuse -j 11".

#=== ERROR while compiling ocamlfuse.2.7.1-cvs7 ===============================#
# context     2.0.8 | macos/x86_64 | ocaml-system.4.10.2 | https://opam.ocaml.org#64c8abec
# path        ~/.opam/ocaml-system.4.10.2/.opam-switch/build/ocamlfuse.2.7.1-cvs7
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ocamlfuse -j 11
# exit-code   1
# env-file    ~/.opam/log/ocamlfuse-63936-d2d111.env
# output-file ~/.opam/log/ocamlfuse-63936-d2d111.out
### output ###
# Unix_util_stubs.c:85:9: error: implicit declaration of function 'write' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
# [...]
# Unix_util_stubs.c:85:9: note: did you mean 'fwrite'?
# /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:165:9: note: 'fwrite' declared here
# size_t   fwrite(const void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream) __DARWIN_ALIAS(fwrite);
#          ^
# Unix_util_stubs.c:115:3: error: implicit declaration of function 'fchdir' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
#   fchdir(Int_val(fd));
#   ^
# Unix_util_stubs.c:143:3: warning: expression result unused [-Wunused-value]
#   bufv;
#   ^~~~
# 1 warning and 3 errors generated.

hubrix avatar Feb 28 '21 18:02 hubrix

I'm sorry, but I don't have a Mac so I cannot reproduce the error. From a quick search on Google (https://github.com/grpc/grpc/issues/25060), it looks like the problem is caused by a change in default flags for the C compilers on newer macos versions. A workaround you can try, is to run export CFLAGS="$CFLAGS -DHAVE_UNISTD_H" before retrying to compile.

astrada avatar Feb 28 '21 21:02 astrada

Getting this same error. Did you find any solution yet @hubrix?

vtantia avatar Jun 18 '21 09:06 vtantia

is not fixed with https://github.com/astrada/ocamlfuse/commit/53304fa550209aa10a7284e676248e0d8b2a6d36 ?

sergiomb2 avatar Sep 09 '21 21:09 sergiomb2

Any updates?

YeArie avatar Apr 11 '22 21:04 YeArie