Open samuraitruong opened 1 year ago
You can go on my forked, I added docker file to run the build inside docker as the solution for now
docker run \
--rm \
-v $(pwd):/src \
-u $(id -u):$(id -g) \
emscripten/emsdk:2.0.26 \
./build.js
I think the fix would be to change the Makefile to use proper options syntax:
--- a/src/Makefile
+++ b/src/Makefile
@@ -475,8 +475,8 @@ ifeq ($(KERNEL),Darwin)
CXXFLAGS += -mmacosx-version-min=10.14
LDFLAGS += -mmacosx-version-min=10.14
ifneq ($(arch),any)
- CXXFLAGS += -arch $(arch)
- LDFLAGS += -arch $(arch)
+ CXXFLAGS += -arch=$(arch)
+ LDFLAGS += -arch=$(arch)
endif
XCRUN = xcrun
endif
However the fix above would bring you to the next error, which is CXXFLAGS += -mdynamic-no-pic
being an unknown option for WASM architecture. Removing that solves the issue. Not sure how to make a patch to fix the latter properly.
Running into the same issue on mac
The build script seem does not work on MACOS. same script works fine on ubuntu