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

Compile error on Mac M1 #11771

Closed
onehundredfeet opened this issue Sep 14, 2024 · 9 comments
Closed

Compile error on Mac M1 #11771

onehundredfeet opened this issue Sep 14, 2024 · 9 comments

Comments

@onehundredfeet
Copy link
Contributor

I"m getting a compile error on the latest development branch. I"m on a Mac m1. I"ve been able to compile many times before, except now recently.

File "src/macro/eval/evalLuv.ml", line 97, characters 3-11:
97 | | `ENODATA -> 80

dune build --workspace dune-workspace.dev src/haxe.exe
File "src/macro/eval/evalLuv.ml", line 97, characters 3-11:
97 | 	| `ENODATA -> 80
     	  ^^^^^^^^
Error: This pattern matches values of type [? `ENODATA ]
       but a pattern was expected which matches values of type Luv.Error.t
       The second variant type does not allow tag(s) `ENODATA
@Simn
Copy link
Member

Simn commented Sep 14, 2024

Sounds like the sequel to #10679.

@onehundredfeet
Copy link
Contributor Author

Should I be upgrading generally? I"m always afraid to upgrade because I"m assuming you"re using specific versions

@onehundredfeet
Copy link
Contributor Author

I always run:


opam update

# install the haxe package dependencies (as listed in the `opam` file)
opam install haxe --deps-only

But I guess that"s not enough.

@Simn
Copy link
Member

Simn commented Sep 14, 2024

I have yet to solve this locally myself, but opam upgrade luv is likely a good idea.

@onehundredfeet
Copy link
Contributor Author

[ERROR] The compilation of luv.0.5.14 failed at "dune build -p luv -j 19".
∗ installed camlp5.8.03.00

#=== ERROR while compiling luv.0.5.14 =========================================#
# context     2.1.5 | macos/arm64 | ocaml.4.14.2 | https://opam.ocaml.org#2d4ed1d357476c1cef4ba85ee4e76e9dfb81f2ee
# path        ~/.opam/default/.opam-switch/build/luv.0.5.14
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p luv -j 19
# exit-code   1
# env-file    ~/.opam/log/luv-87316-a50742.env
# output-file ~/.opam/log/luv-87316-a50742.out
### output ###
# [...]
# c_generated_functions.c:1814:10: warning: initializing "char *" with an expression of type "const char *" discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
#    char* x1408 = CTYPES_PTR_OF_OCAML_STRING(x1407);
#          ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# c_generated_functions.c:1835:29: warning: passing "unsigned char *" to parameter of type "char *" converts between pointers to integer types where one is of the unique plain "char" type and the other is not [-Wpointer-sign]
#    int x1424 = luv_os_uname(x1423);
#                             ^~~~~
# ./helpers.h:180:24: note: passing argument to parameter "buffer" here
# int luv_os_uname(char *buffer);
#                        ^
# 34 warnings and 2 errors generated.
# (cd _build/default/src/c/vendor/libuv && /opt/homebrew/bin/bash -e -u -o pipefail -c "sh configure --host `ocamlc -config | awk "\""/^host:/ {print $NF}"\""` "\""CC=cc -O2 -fno-strict-aliasing -fwrapv -pthread"\"" CFLAGS=-DNDEBUG --silent --enable-silent-rules")
# ld: warning: -single_module is obsolete

I"m wiping the opam cache and starting from scratch

@Simn
Copy link
Member

Simn commented Sep 14, 2024

I"m wiping the opam cache and starting from scratch

Yeah that sounds a lot of my typical opam upgrading experience...

@onehundredfeet
Copy link
Contributor Author

Well, full wipe FTW. Thanks Simon.

@onehundredfeet
Copy link
Contributor Author

5.0.0-alpha.1 is latest correct?

@tobil4sk
Copy link
Member

It"s possible that you had ctypes pinned to an old version, our ci had issues until we unpinned it: #11765

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

3 participants