ocaml-arrow icon indicating copy to clipboard operation
ocaml-arrow copied to clipboard

maybe you should vendor the version of arrow which is supported

Open UnixJunkie opened this issue 3 years ago • 3 comments

Hence, the opam package can install everything required, even if the system doesn't have the package installed. Since the arrow package is not included in many distros, that would be interesting.

UnixJunkie avatar Jun 28 '21 02:06 UnixJunkie

I don't know which version of arrow you support, by the way.

# opam depext -i arrow
# Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=ubuntu, os-family=debian
# The following system packages are needed:
libffi-dev
pkg-config
# All required OS packages found.
# Now letting OPAM install the packages

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[arrow.dev] no changes from git+https://github.com/LaurentMazare/ocaml-arrow.git

The following actions will be performed:
  - install arrow dev*

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of arrow failed at "/home/berenger/.opam/opam-init/hooks/sandbox.sh build dune build -p arrow -j 12".

#=== ERROR while compiling arrow.dev ==========================================#
# context     2.0.5 | linux/x86_64 | ocaml-base-compiler.4.12.0 | pinned(git+https://github.com/LaurentMazare/ocaml-arrow.git#b1563b55)
# path        ~/.opam/4.12.0/.opam-switch/build/arrow.dev
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p arrow -j 12
# exit-code   1
# env-file    ~/.opam/log/arrow-1041404-d8a4ae.env
# output-file ~/.opam/log/arrow-1041404-d8a4ae.out
### output ###
# [...]
# /usr/include/arrow-glib/array-builder.h:220:10: note: declared here
#   220 | gboolean garrow_uint_array_builder_append_null(GArrowUIntArrayBuilder *builder,
#       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# arrow_stubs.c: In function 'caml__553_garrow_uint_array_builder_append_nulls':
# arrow_stubs.c:4352:4: warning: 'garrow_uint_array_builder_append_nulls' is deprecated: Use 'garrow_array_builder_append_nulls' instead [-Wdeprecated-declarations]
#  4352 |    int x3167 = garrow_uint_array_builder_append_nulls(x3162, x3163, x3166);
#       |    ^~~
# In file included from /usr/include/arrow-glib/arrow-glib.h:26,
#                  from arrow_stubs.c:1:
# /usr/include/arrow-glib/array-builder.h:223:10: note: declared here
#   223 | gboolean garrow_uint_array_builder_append_nulls(GArrowUIntArrayBuilder *builder,
#       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build arrow dev
+- 
- No changes have been performed
# Run eval $(opam env) to update the current shell environment

UnixJunkie avatar Jun 28 '21 02:06 UnixJunkie

The old glib bit is deprecated, I'll clean that up. The currently active part is under c_api (plus the ppx) and should work with arrow 4.0.0 and 4.0.1 (the currently active version). Vendoring the library itself would probably be the easiest from a user perspective though there have been a bit of pushback on putting binary dependencies in opam rather than rebuilding them from scratch (and rebuilding is probably tricky).

LaurentMazare avatar Jun 28 '21 03:06 LaurentMazare

I did not see a INSTALL file in arrow, so building from sources looks kind of problematic indeed (I suspect there are many dependencies too). Apparently, the pip package pyarrow also provides pre-compiled binaries so that might indicate one path that can be followed.

UnixJunkie avatar Jun 28 '21 04:06 UnixJunkie