-
Notifications
You must be signed in to change notification settings - Fork 172
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
Build problems on OpenBSD #347
Comments
Thanks for the report! Happy to update wasm3 once fixed there. DO you have any suggestions for the Makefile? |
Not yet |
Instructions from here https://github.com/wasm3/wasm3/blob/main/docs/Development.md work perfectly fine for me:
But seems like your Makefile tries to build it by using cmake directly without the make step:
I'm not skilled in writing Makefiles, but basically there should be an exception for wasm3. I might dig into this myself, but probably not today, sadly. |
BSD-flavoured OS_NAME != uname -v
all:
@ echo "You are running $(OS_NAME)." However, there's no good reason for your Makefile to use build: $(BUILD_DIR)/Makefile
- cmake --build $(BUILD_DIR) -j $(shell nproc)
+ cmake --build $(BUILD_DIR) -j "`nproc`"
build: $(BUILD_DIR)/Makefile
- cmake --build $(BUILD_DIR) -j $(shell nproc)
+ cmake --build $(BUILD_DIR) -j "$$(nproc)" Your makefile includes other constructs which aren't portable between Make implementations, so it might be wise to rename it BSDmakefile: # -*- makefile-bsdmake -*- vim: ft=make
make != \
unset exe; \
for cmd in gnumake gmake gnu-make; do \
exe=`command -v "$$cmd" 2>&1 || :`; \
[ ! "$$exe" ] || break; \
done; \
[ "$$exe" ] && [ -x "$$exe" ] || \
exe='echo >&2 "GNU Make is required to build this project." && exit 2'\ \#; \
printf %s "$$exe"
.DEFAULT:
@ ${make} $@ |
Interesting! Thanks for sharing this! |
Basically, the "-j $(shell nproc)" parts are Linux-specific. I don't think that there is an equivalent on OpenBSD or Unices in general.
After removing these parts, there is a new problem:
This is the problem with the upstream wasm3, though. I will report it there & probably suggest to use https://man.openbsd.org/arc4random.3 instead. Will keep you updated once that is fixed!
The text was updated successfully, but these errors were encountered: