HaxeFoundation / HaxeFoundation/haxe

[haxe 4.3.4] build errors

Open
#11,878 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

I'm trying to compile Haxe 4.3.4 on a Mac M2 running Sequoia 15.1.1 and OCaml 5.2.1.
I've encountered some issues along the way, but I've managed to resolve most of them (#11787 #10679 #11874).

Now, I'm facing the following errors:

```
dune build --workspace dune-workspace.dev src-prebuild/prebuild.exe
_build/default/src-prebuild/prebuild.exe libparams -cclib -lpcre2-8 -cclib -lz -cclib -lmbedtls -cclib -lmbedx509 -cclib -lmbedcrypto -cclib '-framework Security -framework CoreFoundation' > lib.sexp
_build/default/src-prebuild/prebuild.exe version "0" "b4.3.4" "dc1a43dc5" > src/compiler/version.ml
dune build --workspace dune-workspace.dev src/haxe.exe
File "libs/pcre2/dune", line 7, characters 9-20:
7 | (names pcre2_stubs))
^^^^^^^^^^^
pcre2_stubs.c:57:10: fatal error: 'pcre2.h' file not found
57 | #include
| ^~~~~~~~~
1 error generated.
File "libs/mbedtls/dune", line 7, characters 9-22:
7 | (names mbedtls_stubs))
^^^^^^^^^^^^^
mbedtls_stubs.c:21:10: fatal error: 'mbedtls/debug.h' file not found
21 | #include "mbedtls/debug.h"
| ^~~~~~~~~~~~~~~~~
```

I've installed both `pcre2` and `mbedtls@2` through Homebrew.
Here are the installation details:

```
==> pcre2: stable 10.44 (bottled), HEAD
Perl compatible regular expressions library with a new API
https://www.pcre.org/
Installed
/opt/homebrew/Cellar/pcre2/10.44 (237 files, 6.3MB) *
Poured from bottle using the formulae.brew.sh API on 2024-08-27 at 09:21:42
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/p/pcre2.rb
```

```
==> mbedtls@2: stable 2.28.9 (bottled), HEAD [keg-only]
Cryptographic & SSL/TLS library
https://tls.mbed.org/
Installed
/opt/homebrew/Cellar/mbedtls@2/2.28.9 (188 files, 8.3MB)
Poured from bottle using the formulae.brew.sh API on 2024-12-12 at 08:56:51
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/m/mbedtls@2.rb
```

I've also tried setting the LDFLAGS and CPPFLAGS variables to the library locations, but it seems the build script does not use them.

Contributor guide

Open the contributing guide

Research direction

Start with libs/pcre2/dune and libs/mbedtls/dune, then reproduce the reported dune build commands on macOS. Check how these stubs locate the installed PCRE2 and mbedTLS headers; done means the Haxe build proceeds without the missing pcre2.h and mbedtls/debug.h errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.