ocaml-multicore / eio

Effects-based direct-style IO for multicore OCaml
Other
540 stars 66 forks source link

Compilation failure #636

Closed mohanr closed 5 months ago

mohanr commented 10 months ago

I tried to install eio for the first time.

The following actions will be performed:
  - install eio_posix 0.12 [required by eio_main]
  - install eio_main  0.12
===== 2 to install =====
Do you want to continue? [Y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved eio_main.0.12  (cached)
-> retrieved eio_posix.0.12  (cached)
[ERROR] The compilation of eio_posix.0.12 failed at "dune build -p eio_posix -j
        15 @install".

#=== ERROR while compiling eio_posix.0.12 =====================================#
# context     2.1.5 | macos/x86_64 | ocaml-base-compiler.5.0.0 | https://opam.ocaml.org#316bd0cc
# path        ~/Documents/vsr/_opam/.opam-switch/build/eio_posix.0.12
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p eio_posix -j 15 @install
# exit-code   1
# env-file    ~/.opam/log/eio_posix-1984-530377.env
# output-file ~/.opam/log/eio_posix-1984-530377.out
### output ###
# File "lib_eio_posix/dune", line 9, characters 9-24:
# 9 |   (names eio_posix_stubs))
#              ^^^^^^^^^^^^^^^
# (cd _build/default/lib_eio_posix && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -pthread -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -g -I /Users/anu/Documents/vsr/_opam/lib/ocaml -I /Users/anu/Documents/vsr/_opam/lib/bigstringaf -I /Users/anu/Documents/vsr/_opam/lib/cstruct -I /Users/anu/Documents/vsr/_opam/lib/domain-local-await -I /Users/anu/Documents/vsr/_opam/lib/eio -I /Users/anu/Docu[...]
# eio_posix_stubs.c:113:7: error: implicit declaration of function 'preadv' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
#   r = preadv(Int_val(v_fd), iov, n_bufs, Int63_val(v_offset));
#       ^
# eio_posix_stubs.c:127:7: error: implicit declaration of function 'pwritev' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
#   r = pwritev(Int_val(v_fd), iov, n_bufs, Int63_val(v_offset));
#       ^
# 2 errors generated.
talex5 commented 10 months ago

What platform are you building on? preadv should be present on most systems (Linux, BSD, macos).

mohanr commented 10 months ago

It is Mac.

Mohan

On Wednesday, November 1, 2023, Thomas Leonard @.***> wrote:

What platform are you building on? preadv should be present on most systems (Linux, BSD, macos).

— Reply to this email directly, view it on GitHub https://github.com/ocaml-multicore/eio/issues/636#issuecomment-1788957500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACZVGQJIIOXGA7WL64UTUTYCJE6XAVCNFSM6AAAAAA6X5SFTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBYHE2TONJQGA . You are receiving this because you authored the thread.Message ID: @.***>

talex5 commented 10 months ago

What version of macos? The CI is passing on macos 12.7.

https://postgrespro.com/list/thread-id/2526417 says:

'pwritev' has been marked as being introduced in macOS 11.0

https://keith.github.io/xcode-man-pages/read.2.html includes it for "Mac OS X 12".

mohanr commented 10 months ago

It is Catalina 10.15.7

mohanr commented 10 months ago

There is a merged branch now with a fix ? Can I use and check ?

talex5 commented 10 months ago

Sorry, I just tagged the wrong issue briefly.

https://en.wikipedia.org/wiki/MacOS_Catalina says it is "Unsupported as of November 30, 2022", so I guess there's not much point adding support for it now.

yawaramin commented 5 months ago

This can be closed I guess?