alavrik / piqi-binary

"piqi" binary executable pre-built for various platforms
https://github.com/alavrik/piqi
Apache License 2.0
1 stars 9 forks source link

Need a Darwin-arm64 build of piqi-binary #2

Closed motobob closed 2 years ago

motobob commented 2 years ago

cc @akontsevoy @kkuzmin issues with building a piqi-binary for Darwin-arm64 needed for latest Mac M1 chips laptops. https://github.com/alavrik/piqi-binary

Issue for tracking only @alavrik , PRs to come soon when a solution is found.


(alps) (21.3.8.21)AL-CAR-09855:piqi ebob$ brew install ocaml-findlib
==> Downloading https://ghcr.io/v2/homebrew/core/ocaml-findlib/manifests/1.9.1_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ocaml-findlib/blobs/sha256:b05f66339e91c8aa5d0dc67242a82dc8c39a254532d8017c5d35bfd31139039e
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:b05f66339e91c8aa5d0dc67242a82dc8c39a254532d8017c5d35bfd31139039e?se=2022-08-08T12%3A05%3A00Z&sig=3klcYbspoAAd52F1k%2BF%2FCqDTI9xpW70BV14XsoAk%2BbY%3D&sp=r&spr=https&sr=b&sv=2019-12-12
######################################################################## 100.0%
==> Pouring ocaml-findlib--1.9.1_1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/ocaml-findlib/1.9.1_1: 45 files, 2.7MB
==> Running `brew cleanup ocaml-findlib`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
(alps) (21.3.8.21)AL-CAR-09855:piqi ebob$ ./configure 
found ocamlfind: /opt/homebrew/bin/ocamlfind
detected macosx OCaml toolchain
checking whether necessary dependencies are already installed...
xmlm is not installed; it will be built during "make deps"
ulex is not installed; it will be built during "make deps"
easy-format is not installed; it will be built during "make deps"
optcomp is not installed; it will be built during "make deps"
base64 is not installed; it will be built during "make deps"
bytes is installed in /opt/homebrew/lib/ocaml/bytes
ocaml version: 4.12.0
configure OK
(alps) (21.3.8.21)AL-CAR-09855:piqi ebob$ make deps
mkdir -p build/lib/ocaml
/Library/Developer/CommandLineTools/usr/bin/make -C deps download
set -e; \
    for dir in ulex xmlm easy-format optcomp base64; do \
        /Library/Developer/CommandLineTools/usr/bin/make -C $dir download; \
    done
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
Makefile.download:23: warning: overriding commands for target `pa_ulex.ml'
Makefile.download:19: warning: ignoring old commands for target `pa_ulex.ml'
../../make/http-download http://www.cduce.org/download/ulex-1.1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20347  100 20347    0     0  37399      0 --:--:-- --:--:-- --:--:-- 37819
test ce49a013bc4a0e085977a9fe157017bf = `../../make/md5sum ulex-1.1.tar.gz`
mkdir -p upstream
tar -xzf ulex-1.1.tar.gz -C upstream --strip-components=1
cp upstream/cset.ml cset.ml
cp upstream/ulexing.ml ulexing.ml
cp upstream/ulexing.mli ulexing.mli
cp upstream/ulex.ml ulex.ml
cp upstream/ulex.mli ulex.mli
cp upstream/utf8.ml utf8.ml
cp upstream/utf8.mli utf8.mli
cp upstream/utf16.ml utf16.ml
cp upstream/utf16.mli utf16.mli
echo "(*pp camlp4orf *)" > pa_ulex.ml
cat upstream/pa_ulex.ml >> pa_ulex.ml
cp upstream/META META
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
../../make/http-download https://github.com/dbuenzli/xmlm/archive/v1.2.0.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 29765    0 29765    0     0  28099      0 --:--:--  0:00:01 --:--:-- 28099
test 8117ef968659713108be4f07b9252cd3 = `../../make/md5sum v1.2.0.tar.gz`
mkdir -p upstream
tar -xzf v1.2.0.tar.gz -C upstream --strip-components=1
cp upstream/src/xmlm.ml xmlm.ml
cp upstream/src/xmlm.mli xmlm.mli
sed -e 's/%%VERSION%%/1.2.0/' upstream/pkg/META > META
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
../../make/http-download https://github.com/mjambon/easy-format/archive/v1.0.2.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13679    0 13679    0     0  14510      0 --:--:-- --:--:-- --:--:--     0
test 82f6db85477831cab11e4cfe80321225 = `../../make/md5sum v1.0.2.tar.gz`
mkdir -p upstream
tar -xzf v1.0.2.tar.gz -C upstream --strip-components=1
cp upstream/easy_format.ml easy_format.ml
cp upstream/easy_format.mli easy_format.mli
echo 'version = "1.0.2"' > META
cat upstream/META.tpl >> META
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
Makefile.download:23: warning: overriding commands for target `pa_optcomp.ml'
Makefile.download:19: warning: ignoring old commands for target `pa_optcomp.ml'
../../make/http-download https://github.com/diml/optcomp/archive/1.6.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 56370    0 56370    0     0  56999      0 --:--:-- --:--:-- --:--:--  314k
test d3587244dba1b8b10f24d0b60a8c700d = `../../make/md5sum 1.6.tar.gz`
mkdir -p upstream
tar -xzf 1.6.tar.gz -C upstream --strip-components=1
cp upstream/src/optcomp.ml optcomp.ml
cp upstream/src/optcomp_o.ml optcomp_o.ml
echo "(*pp camlp4orf *)" > pa_optcomp.ml
cat upstream/src/pa_optcomp.ml >> pa_optcomp.ml
cp upstream/src/pa_optcomp.mli pa_optcomp.mli
cp upstream/src/META META
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
../../make/http-download https://github.com/mirage/ocaml-base64/archive/v2.0.0.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 46084    0 46084    0     0  50537      0 --:--:-- --:--:-- --:--:--  151k
test 52b9736839c83cf88a9fb1373cf2e35c = `../../make/md5sum v2.0.0.tar.gz`
mkdir -p upstream
tar -xzf v2.0.0.tar.gz -C upstream --strip-components=1
cp upstream/lib/b64.ml b64.ml
cp upstream/lib/b64.mli b64.mli
cp upstream/lib/META META
/Library/Developer/CommandLineTools/usr/bin/make -C deps
set -e; \
    for dir in ulex xmlm easy-format optcomp base64; do \
        /Library/Developer/CommandLineTools/usr/bin/make -C $dir ; \
    done
ocamlfind ocamldep ulex.ml > ._d/ulex.d
ocamlfind ocamldep utf16.ml > ._d/utf16.d
ocamlfind ocamldep ulexing.ml > ._d/ulexing.d
ocamlfind ocamldep utf8.ml > ._d/utf8.d
ocamlfind ocamldep cset.ml > ._d/cset.d
ocamlfind ocamlc -package , -c cset.ml
ocamlfind ocamlc -package , -c utf8.mli
ocamlfind ocamlc -package , -c utf8.ml
File "utf8.ml", line 92, characters 10-22:
92 |   let a = Array.create n 0 in
               ^^^^^^^^^^^^
Alert deprecated: Stdlib.Array.create
Use Array.make/ArrayLabels.make instead.
File "utf8.ml", line 113, characters 20-21:
113 |     if (p >= 0xd800 & p < 0xe000) then raise MalFormed;
                          ^
Alert deprecated: Stdlib.&
Use (&&) instead.
ocamlfind ocamlc -package , -c ulexing.mli
ocamlfind ocamlc -package , -c ulexing.ml
File "ulexing.ml", line 45, characters 10-22:
45 |     buf = Array.create chunk_size 0;
               ^^^^^^^^^^^^
Alert deprecated: Stdlib.Array.create
Use Array.make/ArrayLabels.make instead.
File "ulexing.ml", line 123, characters 19-31:
123 |       let newbuf = Array.create newlen 0 in
                         ^^^^^^^^^^^^
Alert deprecated: Stdlib.Array.create
Use Array.make/ArrayLabels.make instead.
File "ulexing.ml", line 190, characters 10-23:
190 |   let s = String.create len in
                ^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.create
Use Bytes.create/BytesLabels.create instead.
File "ulexing.ml", line 191, characters 26-80:
191 |   for i = 0 to len - 1 do s.[i] <- to_latin1 lexbuf.buf.(lexbuf.start + pos + i) done;
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.set
Use Bytes.set/BytesLabels.set instead.
File "ulexing.ml", line 1:
Error: The implementation ulexing.ml
       does not match the interface ulexing.cmi:
       Values do not match:
         val latin1_lexeme : lexbuf -> bytes
       is not included in
         val latin1_lexeme : lexbuf -> string
       File "ulexing.mli", line 145, characters 0-35: Expected declaration
       File "ulexing.ml", line 194, characters 4-17: Actual declaration
make[3]: *** [ulexing.cmo] Error 2
make[2]: *** [byte-code-library] Error 2
make[1]: *** [dirs] Error 2
make: *** [deps] Error 2
(alps) (21.3.8.21)AL-CAR-09855:piqi ebob$ make
set -e; \
    for dir in piqilib src; do \
        /Library/Developer/CommandLineTools/usr/bin/make -C $dir ; \
    done
echo "let version = \"`head -1 ../VERSION`\"" >piqi_version.ml
echo "version = \"`head -1 ../VERSION`\"" >META
cat META.in >>META
ocamllex  piqi_json_parser.mll
91 states, 1087 transitions, table size 4894 bytes
ocamlfind ocamldep -native piqi_xml_type.mli > ._ncdi/piqi_xml_type.di
ocamlfind ocamldep -native piqi_json_type.mli > ._ncdi/piqi_json_type.di
ocamlfind ocamldep -native piqi_c.mli > ._ncdi/piqi_c.di
ocamlfind ocamldep piqi_json_parser.ml > ._d/piqi_json_parser.d
ocamlfind ocamldep piqi_getopt.ml > ._d/piqi_getopt.d
ocamlfind ocamldep piqi_light.ml > ._d/piqi_light.d
ocamlfind ocamldep piqi_compile.ml > ._d/piqi_compile.d
ocamlfind ocamldep piqi_convert.ml > ._d/piqi_convert.d
ocamlfind ocamldep piqobj_of_xml.ml > ._d/piqobj_of_xml.d
ocamlfind ocamldep piqobj_to_xml.ml > ._d/piqobj_to_xml.d
ocamlfind ocamldep piqi_xml.ml > ._d/piqi_xml.d
ocamlfind ocamldep piqobj_of_json.ml > ._d/piqobj_of_json.d
ocamlfind ocamldep piqobj_to_json.ml > ._d/piqobj_to_json.d
ocamlfind ocamldep piqi_base64.ml > ._d/piqi_base64.d
ocamlfind ocamldep piqi_json.ml > ._d/piqi_json.d
ocamlfind ocamldep piqi_json_gen.ml > ._d/piqi_json_gen.d
ocamlfind ocamldep piqi_pp.ml > ._d/piqi_pp.d
ocamlfind ocamldep piqi.ml > ._d/piqi.d
ocamlfind ocamldep piq.ml > ._d/piq.d
ocamlfind ocamldep piqobj_of_piq.ml > ._d/piqobj_of_piq.d
ocamlfind ocamldep piqobj_to_piq.ml > ._d/piqobj_to_piq.d
ocamlfind ocamldep piqobj_of_protobuf.ml > ._d/piqobj_of_protobuf.d
ocamlfind ocamldep piqobj_to_protobuf.ml > ._d/piqobj_to_protobuf.d
ocamlfind ocamldep piqobj_common.ml > ._d/piqobj_common.d
ocamlfind ocamldep piqobj.ml > ._d/piqobj.d
ocamlfind ocamldep piqi_objstore.ml > ._d/piqi_objstore.d
ocamlfind ocamldep piq_gen.ml > ._d/piq_gen.d
ocamlfind ocamldep piq_parser.ml > ._d/piq_parser.d
ocamlfind: Package `ulex' not found
ocamlfind ocamldep -pp "camlp4o -I pa_ulex.cma " piq_lexer.ml > ._d/piq_lexer.d
sh: camlp4o: command not found
File "piq_lexer.ml", line 1:
Error: I/O error: camlp4o -I pa_ulex.cma  'piq_lexer.ml' > /var/folders/gj/1w1tsy617vn5w1wrpxvgcg5r0000gp/T/ocamlppc0e5d0
make[2]: *** Deleting file `._d/piq_lexer.d'
ocamlfind ocamldep piqi_db.ml > ._d/piqi_db.d
ocamlfind ocamldep piqi_protobuf.ml > ._d/piqi_protobuf.d
ocamlfind ocamldep piqi_command.ml > ._d/piqi_command.d
ocamlfind ocamldep piqi_file.ml > ._d/piqi_file.d
ocamlfind: Package `optcomp' not found
ocamlfind ocamldep -pp "camlp4o -I optcomp.cma " piqi_common.ml > ._d/piqi_common.d
sh: camlp4o: command not found
File "piqi_common.ml", line 1:
Error: I/O error: camlp4o -I optcomp.cma  'piqi_common.ml' > /var/folders/gj/1w1tsy617vn5w1wrpxvgcg5r0000gp/T/ocamlpp3333e9
make[2]: *** Deleting file `._d/piqi_common.d'
ocamlfind ocamldep piqi_name.ml > ._d/piqi_name.d
ocamlfind ocamldep piqi_iolist.ml > ._d/piqi_iolist.d
ocamlfind ocamldep piqi_config.ml > ._d/piqi_config.d
ocamlfind ocamldep piqi_c.ml > ._d/piqi_c.d
ocamlfind ocamldep piqi_boot.ml > ._d/piqi_boot.d
ocamlfind ocamldep piqi_impl_piqi.ml > ._d/piqi_impl_piqi.d
ocamlfind ocamldep piq_ast.ml > ._d/piq_ast.d
ocamlfind ocamldep piqloc.ml > ._d/piqloc.d
ocamlfind ocamldep piqi_util.ml > ._d/piqi_util.d
ocamlfind ocamldep piqi_piqi.ml > ._d/piqi_piqi.d
ocamlfind ocamldep piqi_piqirun.ml > ._d/piqi_piqirun.d
ocamlfind ocamldep piqi_version.ml > ._d/piqi_version.d
ocamlfind: Package `ulex' not found
ocamlfind ocamldep -pp "camlp4o -I pa_ulex.cma " piq_lexer.ml > ._d/piq_lexer.d
sh: camlp4o: command not found
File "piq_lexer.ml", line 1:
Error: I/O error: camlp4o -I pa_ulex.cma  'piq_lexer.ml' > /var/folders/gj/1w1tsy617vn5w1wrpxvgcg5r0000gp/T/ocamlpp55847a
make[2]: *** Deleting file `._d/piq_lexer.d'
ocamlfind: Package `optcomp' not found
ocamlfind ocamldep -pp "camlp4o -I optcomp.cma " piqi_common.ml > ._d/piqi_common.d
sh: camlp4o: command not found
File "piqi_common.ml", line 1:
Error: I/O error: camlp4o -I optcomp.cma  'piqi_common.ml' > /var/folders/gj/1w1tsy617vn5w1wrpxvgcg5r0000gp/T/ocamlpp6f2664
make[2]: *** Deleting file `._d/piqi_common.d'
ocamlfind ocamlc -c -ccopt "-fPIC -O3 -g -fno-stack-check -Wno-error=implicit-function-declaration \
                -DPIC -DNATIVE_CODE   \
                    -o piqi_c_impl.o " piqi_c_impl.c
piqi_c_impl.c:84:7: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  str = String_val(_v_str);
      ^ ~~~~~~~~~~~~~~~~~~
1 warning generated.
ar rcs libpiqilib_stubs.a  piqi_c_impl.o
ocamlfind ocamlopt -package ulex,easy-format,xmlm,base64,bytes -c piqi_version.ml
ocamlfind: Package `ulex' not found
make[2]: *** [piqi_version.cmi] Error 2
make[1]: *** [native-code-library] Error 2
make: *** [dirs] Error 2
(alps) (21.3.8.21)AL-CAR-09855:piqi ebob(alps) (21.3.8.21)AL-CAR-09855:piqi ebob$ brew install ocaml-findlib
==> Downloading https://ghcr.io/v2/homebrew/core/ocaml-findlib/manifests/1.9.1_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ocaml-findlib/blobs/sha256:b05f66339e91c8aa5d0dc67242a82dc8c39a254532d8017c5d35bfd31139039e
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:b05f66339e91c8aa5d0dc67242a82dc8c39a254532d8017c5d35bfd31139039e?se=2022-08-08T12%3A05%3A00Z&sig=3klcYbspoAAd52F1k%2BF%2FCqDTI9xpW70BV14XsoAk%2BbY%3D&sp=r&spr=https&sr=b&sv=2019-12-12
######################################################################## 100.0%
==> Pouring ocaml-findlib--1.9.1_1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/ocaml-findlib/1.9.1_1: 45 files, 2.7MB
==> Running `brew cleanup ocaml-findlib`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
(alps) (21.3.8.21)AL-CAR-09855:piqi ebob$ ./configure 
found ocamlfind: /opt/homebrew/bin/ocamlfind
detected macosx OCaml toolchain
checking whether necessary dependencies are already installed...
xmlm is not installed; it will be built during "make deps"
ulex is not installed; it will be built during "make deps"
easy-format is not installed; it will be built during "make deps"
optcomp is not installed; it will be built during "make deps"
base64 is not installed; it will be built during "make deps"
bytes is installed in /opt/homebrew/lib/ocaml/bytes
ocaml version: 4.12.0
configure OK
(alps) (21.3.8.21)AL-CAR-09855:piqi ebob$ make deps
mkdir -p build/lib/ocaml
/Library/Developer/CommandLineTools/usr/bin/make -C deps download
set -e; \
    for dir in ulex xmlm easy-format optcomp base64; do \
        /Library/Developer/CommandLineTools/usr/bin/make -C $dir download; \
    done
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
Makefile.download:23: warning: overriding commands for target `pa_ulex.ml'
Makefile.download:19: warning: ignoring old commands for target `pa_ulex.ml'
../../make/http-download http://www.cduce.org/download/ulex-1.1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20347  100 20347    0     0  37399      0 --:--:-- --:--:-- --:--:-- 37819
test ce49a013bc4a0e085977a9fe157017bf = `../../make/md5sum ulex-1.1.tar.gz`
mkdir -p upstream
tar -xzf ulex-1.1.tar.gz -C upstream --strip-components=1
cp upstream/cset.ml cset.ml
cp upstream/ulexing.ml ulexing.ml
cp upstream/ulexing.mli ulexing.mli
cp upstream/ulex.ml ulex.ml
cp upstream/ulex.mli ulex.mli
cp upstream/utf8.ml utf8.ml
cp upstream/utf8.mli utf8.mli
cp upstream/utf16.ml utf16.ml
cp upstream/utf16.mli utf16.mli
echo "(*pp camlp4orf *)" > pa_ulex.ml
cat upstream/pa_ulex.ml >> pa_ulex.ml
cp upstream/META META
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
../../make/http-download https://github.com/dbuenzli/xmlm/archive/v1.2.0.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 29765    0 29765    0     0  28099      0 --:--:--  0:00:01 --:--:-- 28099
test 8117ef968659713108be4f07b9252cd3 = `../../make/md5sum v1.2.0.tar.gz`
mkdir -p upstream
tar -xzf v1.2.0.tar.gz -C upstream --strip-components=1
cp upstream/src/xmlm.ml xmlm.ml
cp upstream/src/xmlm.mli xmlm.mli
sed -e 's/%%VERSION%%/1.2.0/' upstream/pkg/META > META
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
../../make/http-download https://github.com/mjambon/easy-format/archive/v1.0.2.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13679    0 13679    0     0  14510      0 --:--:-- --:--:-- --:--:--     0
test 82f6db85477831cab11e4cfe80321225 = `../../make/md5sum v1.0.2.tar.gz`
mkdir -p upstream
tar -xzf v1.0.2.tar.gz -C upstream --strip-components=1
cp upstream/easy_format.ml easy_format.ml
cp upstream/easy_format.mli easy_format.mli
echo 'version = "1.0.2"' > META
cat upstream/META.tpl >> META
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
Makefile.download:23: warning: overriding commands for target `pa_optcomp.ml'
Makefile.download:19: warning: ignoring old commands for target `pa_optcomp.ml'
../../make/http-download https://github.com/diml/optcomp/archive/1.6.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 56370    0 56370    0     0  56999      0 --:--:-- --:--:-- --:--:--  314k
test d3587244dba1b8b10f24d0b60a8c700d = `../../make/md5sum 1.6.tar.gz`
mkdir -p upstream
tar -xzf 1.6.tar.gz -C upstream --strip-components=1
cp upstream/src/optcomp.ml optcomp.ml
cp upstream/src/optcomp_o.ml optcomp_o.ml
echo "(*pp camlp4orf *)" > pa_optcomp.ml
cat upstream/src/pa_optcomp.ml >> pa_optcomp.ml
cp upstream/src/pa_optcomp.mli pa_optcomp.mli
cp upstream/src/META META
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.download
../../make/http-download https://github.com/mirage/ocaml-base64/archive/v2.0.0.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 46084    0 46084    0     0  50537      0 --:--:-- --:--:-- --:--:--  151k
test 52b9736839c83cf88a9fb1373cf2e35c = `../../make/md5sum v2.0.0.tar.gz`
mkdir -p upstream
tar -xzf v2.0.0.tar.gz -C upstream --strip-components=1
cp upstream/lib/b64.ml b64.ml
cp upstream/lib/b64.mli b64.mli
cp upstream/lib/META META
/Library/Developer/CommandLineTools/usr/bin/make -C deps
set -e; \
    for dir in ulex xmlm easy-format optcomp base64; do \
        /Library/Developer/CommandLineTools/usr/bin/make -C $dir ; \
    done
ocamlfind ocamldep ulex.ml > ._d/ulex.d
ocamlfind ocamldep utf16.ml > ._d/utf16.d
ocamlfind ocamldep ulexing.ml > ._d/ulexing.d
ocamlfind ocamldep utf8.ml > ._d/utf8.d
ocamlfind ocamldep cset.ml > ._d/cset.d
ocamlfind ocamlc -package , -c cset.ml
ocamlfind ocamlc -package , -c utf8.mli
ocamlfind ocamlc -package , -c utf8.ml
File "utf8.ml", line 92, characters 10-22:
92 |   let a = Array.create n 0 in
               ^^^^^^^^^^^^
Alert deprecated: Stdlib.Array.create
Use Array.make/ArrayLabels.make instead.
File "utf8.ml", line 113, characters 20-21:
113 |     if (p >= 0xd800 & p < 0xe000) then raise MalFormed;
                          ^
Alert deprecated: Stdlib.&
Use (&&) instead.
ocamlfind ocamlc -package , -c ulexing.mli
ocamlfind ocamlc -package , -c ulexing.ml
File "ulexing.ml", line 45, characters 10-22:
45 |     buf = Array.create chunk_size 0;
               ^^^^^^^^^^^^
Alert deprecated: Stdlib.Array.create
Use Array.make/ArrayLabels.make instead.
File "ulexing.ml", line 123, characters 19-31:
123 |       let newbuf = Array.create newlen 0 in
                         ^^^^^^^^^^^^
Alert deprecated: Stdlib.Array.create
Use Array.make/ArrayLabels.make instead.
File "ulexing.ml", line 190, characters 10-23:
190 |   let s = String.create len in
                ^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.create
Use Bytes.create/BytesLabels.create instead.
File "ulexing.ml", line 191, characters 26-80:
191 |   for i = 0 to len - 1 do s.[i] <- to_latin1 lexbuf.buf.(lexbuf.start + pos + i) done;
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.set
Use Bytes.set/BytesLabels.set instead.
File "ulexing.ml", line 1:
Error: The implementation ulexing.ml
       does not match the interface ulexing.cmi:
       Values do not match:
         val latin1_lexeme : lexbuf -> bytes
       is not included in
         val latin1_lexeme : lexbuf -> string
       File "ulexing.mli", line 145, characters 0-35: Expected declaration
       File "ulexing.ml", line 194, characters 4-17: Actual declaration
make[3]: *** [ulexing.cmo] Error 2
make[2]: *** [byte-code-library] Error 2
make[1]: *** [dirs] Error 2
make: *** [deps] Error 2
(alps) (21.3.8.21)AL-CAR-09855:piqi ebob$ make
set -e; \
    for dir in piqilib src; do \
        /Library/Developer/CommandLineTools/usr/bin/make -C $dir ; \
    done
echo "let version = \"`head -1 ../VERSION`\"" >piqi_version.ml
echo "version = \"`head -1 ../VERSION`\"" >META
cat META.in >>META
ocamllex  piqi_json_parser.mll
91 states, 1087 transitions, table size 4894 bytes
ocamlfind ocamldep -native piqi_xml_type.mli > ._ncdi/piqi_xml_type.di
ocamlfind ocamldep -native piqi_json_type.mli > ._ncdi/piqi_json_type.di
ocamlfind ocamldep -native piqi_c.mli > ._ncdi/piqi_c.di
ocamlfind ocamldep piqi_json_parser.ml > ._d/piqi_json_parser.d
ocamlfind ocamldep piqi_getopt.ml > ._d/piqi_getopt.d
ocamlfind ocamldep piqi_light.ml > ._d/piqi_light.d
ocamlfind ocamldep piqi_compile.ml > ._d/piqi_compile.d
ocamlfind ocamldep piqi_convert.ml > ._d/piqi_convert.d
ocamlfind ocamldep piqobj_of_xml.ml > ._d/piqobj_of_xml.d
ocamlfind ocamldep piqobj_to_xml.ml > ._d/piqobj_to_xml.d
ocamlfind ocamldep piqi_xml.ml > ._d/piqi_xml.d
ocamlfind ocamldep piqobj_of_json.ml > ._d/piqobj_of_json.d
ocamlfind ocamldep piqobj_to_json.ml > ._d/piqobj_to_json.d
ocamlfind ocamldep piqi_base64.ml > ._d/piqi_base64.d
ocamlfind ocamldep piqi_json.ml > ._d/piqi_json.d
ocamlfind ocamldep piqi_json_gen.ml > ._d/piqi_json_gen.d
ocamlfind ocamldep piqi_pp.ml > ._d/piqi_pp.d
ocamlfind ocamldep piqi.ml > ._d/piqi.d
ocamlfind ocamldep piq.ml > ._d/piq.d
ocamlfind ocamldep piqobj_of_piq.ml > ._d/piqobj_of_piq.d
ocamlfind ocamldep piqobj_to_piq.ml > ._d/piqobj_to_piq.d
ocamlfind ocamldep piqobj_of_protobuf.ml > ._d/piqobj_of_protobuf.d
ocamlfind ocamldep piqobj_to_protobuf.ml > ._d/piqobj_to_protobuf.d
ocamlfind ocamldep piqobj_common.ml > ._d/piqobj_common.d
ocamlfind ocamldep piqobj.ml > ._d/piqobj.d
ocamlfind ocamldep piqi_objstore.ml > ._d/piqi_objstore.d
ocamlfind ocamldep piq_gen.ml > ._d/piq_gen.d
ocamlfind ocamldep piq_parser.ml > ._d/piq_parser.d
ocamlfind: Package `ulex' not found
ocamlfind ocamldep -pp "camlp4o -I pa_ulex.cma " piq_lexer.ml > ._d/piq_lexer.d
sh: camlp4o: command not found
File "piq_lexer.ml", line 1:
Error: I/O error: camlp4o -I pa_ulex.cma  'piq_lexer.ml' > /var/folders/gj/1w1tsy617vn5w1wrpxvgcg5r0000gp/T/ocamlppc0e5d0
make[2]: *** Deleting file `._d/piq_lexer.d'
ocamlfind ocamldep piqi_db.ml > ._d/piqi_db.d
ocamlfind ocamldep piqi_protobuf.ml > ._d/piqi_protobuf.d
ocamlfind ocamldep piqi_command.ml > ._d/piqi_command.d
ocamlfind ocamldep piqi_file.ml > ._d/piqi_file.d
ocamlfind: Package `optcomp' not found
ocamlfind ocamldep -pp "camlp4o -I optcomp.cma " piqi_common.ml > ._d/piqi_common.d
sh: camlp4o: command not found
File "piqi_common.ml", line 1:
Error: I/O error: camlp4o -I optcomp.cma  'piqi_common.ml' > /var/folders/gj/1w1tsy617vn5w1wrpxvgcg5r0000gp/T/ocamlpp3333e9
make[2]: *** Deleting file `._d/piqi_common.d'
ocamlfind ocamldep piqi_name.ml > ._d/piqi_name.d
ocamlfind ocamldep piqi_iolist.ml > ._d/piqi_iolist.d
ocamlfind ocamldep piqi_config.ml > ._d/piqi_config.d
ocamlfind ocamldep piqi_c.ml > ._d/piqi_c.d
ocamlfind ocamldep piqi_boot.ml > ._d/piqi_boot.d
ocamlfind ocamldep piqi_impl_piqi.ml > ._d/piqi_impl_piqi.d
ocamlfind ocamldep piq_ast.ml > ._d/piq_ast.d
ocamlfind ocamldep piqloc.ml > ._d/piqloc.d
ocamlfind ocamldep piqi_util.ml > ._d/piqi_util.d
ocamlfind ocamldep piqi_piqi.ml > ._d/piqi_piqi.d
ocamlfind ocamldep piqi_piqirun.ml > ._d/piqi_piqirun.d
ocamlfind ocamldep piqi_version.ml > ._d/piqi_version.d
ocamlfind: Package `ulex' not found
ocamlfind ocamldep -pp "camlp4o -I pa_ulex.cma " piq_lexer.ml > ._d/piq_lexer.d
sh: camlp4o: command not found
File "piq_lexer.ml", line 1:
Error: I/O error: camlp4o -I pa_ulex.cma  'piq_lexer.ml' > /var/folders/gj/1w1tsy617vn5w1wrpxvgcg5r0000gp/T/ocamlpp55847a
make[2]: *** Deleting file `._d/piq_lexer.d'
ocamlfind: Package `optcomp' not found
ocamlfind ocamldep -pp "camlp4o -I optcomp.cma " piqi_common.ml > ._d/piqi_common.d
sh: camlp4o: command not found
File "piqi_common.ml", line 1:
Error: I/O error: camlp4o -I optcomp.cma  'piqi_common.ml' > /var/folders/gj/1w1tsy617vn5w1wrpxvgcg5r0000gp/T/ocamlpp6f2664
make[2]: *** Deleting file `._d/piqi_common.d'
ocamlfind ocamlc -c -ccopt "-fPIC -O3 -g -fno-stack-check -Wno-error=implicit-function-declaration \
                -DPIC -DNATIVE_CODE   \
                    -o piqi_c_impl.o " piqi_c_impl.c
piqi_c_impl.c:84:7: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
  str = String_val(_v_str);
      ^ ~~~~~~~~~~~~~~~~~~
1 warning generated.
ar rcs libpiqilib_stubs.a  piqi_c_impl.o
ocamlfind ocamlopt -package ulex,easy-format,xmlm,base64,bytes -c piqi_version.ml
ocamlfind: Package `ulex' not found
make[2]: *** [piqi_version.cmi] Error 2
make[1]: *** [native-code-library] Error 2
make: *** [dirs] Error 2
(alps) (21.3.8.21)AL-CAR-09855:piqi ebob
alavrik commented 2 years ago

Hi @motobob looks like you are trying to build an older version of piqi? Can I suggest switching to the latest one and follow installation instructions here: https://github.com/alavrik/piqi#installation

Also, I don't think this repo is the right one for reporting build/install issues. https://github.com/alavrik/piqi would be a better place.

motobob commented 2 years ago

yeah, that was v0.6.13. checking out latest and will report updates.

Also, I don't think this repo is the right one for reporting build/install issues. https://github.com/alavrik/piqi would be a better place.

Agree. will move if couple further iterations will not help.

motobob commented 2 years ago

@alavrik sorry for delay. cc @akontsevoy

with latest version we get:

(alps) (21.3.8.21)AL-CAR-09855:piqi ebob$ make
set -e; \
    for dir in piqilib src; do \
        /Library/Developer/CommandLineTools/usr/bin/make -C $dir ; \
    done
make[2]: `libpiqilib_stubs.a' is up to date.
ocamlfind ocamlopt -package easy-format,xmlm,base64,sedlex,sedlex.ppx -c piqi_version.ml
ocamlfind: Package `easy-format' not found
make[2]: *** [piqi_version.cmi] Error 2
make[1]: *** [native-code-library] Error 2
make: *** [dirs] Error 2

can you advise what could be the fix for that to build piqi for Darwin-arm64?

alavrik commented 2 years ago

@motobob this output doesn't appear to be a new build. Also looks like one of the dependencies is missing in your environment. Can you git clean -fdx and run through the following the build instructions including the dependency installation: https://github.com/alavrik/piqi/blob/master/INSTALL ?

rmpalomino commented 2 years ago

@motobob I was able to compile the piqi binary and our service using the instructions in the piqi INSTALL file and usual dev setup. The piqi repo tests passed. I have not had a chance to run service tests with it yet and I'm not expert in making sure that the binary is portable for all M1 macs. I used otool -L to verify that there was only the one reference to a system dynamic library. Is there anything beyond running service tests that you want to verify with this?