-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
minifb: unsupported on wasm/wasm32 #5589
Comments
I am still getting the same error:
|
Try |
That seemed to update things, but did not install:
|
The default find emsdk detection based on It is recommended to try the official emsdk installation first.
|
Hmm, I wonder if it might be better to detect using
Additionally, I performed same test on linux box, with emscripten installed from SDK (from git) and got same results. It builds emscripten programs fine, as long as I leave out minifb. WIth it in, it warned it wasn't supported, but seemed to install & use it on build. I uninstalled brew emscripten, and installed from git, and it seems to work ok:
|
it works for me, please add ruki-2:xmake-repo ruki$ xmake l scripts/test.lua -vD --shallow -p wasm minifb
{
"minifb"
}
create test ...
[+]: xmake.lua
[+]: src/main.cpp
[+]: .gitignore
create ok!
/private/var/folders/32/w9cz0y_14hs19lkbs6v6_fm80000gn/T/.xmake501/241031/xmake-repo/test
add local repository(local-repo): /Users/ruki/projects/personal/xmake-repo ok!
local repositories:
local-repo /Users/ruki/projects/personal/xmake-repo
global repositories:
build-artifacts https://gitee.com/xmake-mirror/build-artifacts.git main
xmake-repo https://gitee.com/tboox/xmake-repo.git master
builtin-repo /Users/ruki/.local/share/xmake/repository
4 repositories were found!
checking for architecture ... wasm32
checking for emsdk directory ... /Users/ruki/Downloads/emsdk
checking for emcc ... /Users/ruki/Downloads/emsdk/upstream/emscripten/emcc
configure
{
clean = true
emsdk = /Users/ruki/Downloads/emsdk
plat = wasm
proxy_pac = pac.lua
arch = wasm32
ndk_stdcxx = true
kind = static
mode = release
buildir = build
host = macosx
ccache = true
network = public
theme = default
}
checking for git ... /usr/bin/git
/usr/bin/git rev-parse HEAD
checking for gzip ... /usr/bin/gzip
checking for tar ... /usr/bin/tar
/usr/bin/git rev-parse HEAD
checking for SDK version of Xcode for macosx (x86_64) ... 14.0
checking for Minimal target version of Xcode for macosx (x86_64) ... 14.0
checkinfo: cannot runv(zig version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(zig version), No such file or directory
checking for zig ... no
checking for nim ... /usr/local/bin/nim
checking for cmake ... no
checking for cmake ... /usr/local/bin/cmake
checking for ping ... /sbin/ping
pinging the host(github.com) ... 73 ms
/usr/bin/git clone https://github.com/emoon/minifb.git --filter=tree:0 --no-checkout -c core.fsm
onitor=false source.tmp/minifb
Cloning into 'source.tmp/minifb'...
remote: Enumerating objects: 215, done.
remote: Counting objects: 100% (110/110), done.
remote: Compressing objects: 100% (109/109), done.
remote: Total 215 (delta 1), reused 91 (delta 1), pack-reused 105 (from 1)
Receiving objects: 100% (215/215), 60.46 KiB | 848.00 KiB/s, done.
Resolving deltas: 100% (7/7), done.
/usr/bin/git -c core.fsmonitor=false checkout 2ce2449b1bc8d7c6d20c31b86244f1e540f2e788
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 28 (delta 0), reused 22 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (28/28), 3.71 KiB | 1.24 MiB/s, done.
remote: Enumerating objects: 77, done.
remote: Counting objects: 100% (71/71), done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 77 (delta 10), reused 27 (delta 5), pack-reused 6 (from 1)
Receiving objects: 100% (77/77), 153.96 KiB | 1.26 MiB/s, done.
Resolving deltas: 100% (10/10), done.
Updating files: 100% (77/77), done.
Note: switching to '2ce2449b1bc8d7c6d20c31b86244f1e540f2e788'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 2ce2449 Fix issue #111
=> clone https://github.com/emoon/minifb.git 2023.09.21 .. ok
checking for emcc ... /Users/ruki/Downloads/emsdk/upstream/emscripten/emcc
checking for the c compiler (cc) ... emcc
checking for emcc ... /Users/ruki/Downloads/emsdk/upstream/emscripten/emcc
checking for the c++ compiler (cxx) ... emcc
checking for cmake ... /usr/local/bin/cmake
/usr/local/bin/cmake -DMINIFB_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=
OFF -DCMAKE_INSTALL_PREFIX=/Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f
9f9389f09b5 -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/Users/ru
ki/Downloads/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_POSITION_
INDEPENDENT_CODE=ON -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM
=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH -DCMAKE
_SHARED_LINKER_FLAGS_RELEASE= "-DCMAKE_C_FLAGS_RELEASE= -O3 -DNDEBUG" "-DCMAKE_CXX_FLAGS_RELEASE
= -O3 -DNDEBUG" -DCMAKE_STATIC_LINKER_FLAGS_RELEASE= -DCMAKE_EXE_LINKER_FLAGS_RELEASE= /Users/ru
ki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/minifb
-- Processing MiniFB
-- Done MiniFB
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/
source/minifb/build_3c0a9f80
make -j10 VERBOSE=1
/usr/local/Cellar/cmake/3.25.3/bin/cmake -S/Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.
09.21/source/minifb -B/Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/minifb/b
uild_3c0a9f80 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.25.3/bin/cmake -E cmake_progress_start /Users/ruki/.xmake/cache/packag
es/2410/m/minifb/2023.09.21/source/minifb/build_3c0a9f80/CMakeFiles /Users/ruki/.xmake/cache/pac
kages/2410/m/minifb/2023.09.21/source/minifb/build_3c0a9f80//CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/m
inifb/build_3c0a9f80'
make -f CMakeFiles/minifb.dir/build.make CMakeFiles/minifb.dir/depend
make[2]: Entering directory '/Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/m
inifb/build_3c0a9f80'
cd /Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/minifb/build_3c0a9f80 && /u
sr/local/Cellar/cmake/3.25.3/bin/cmake -E cmake_depends "Unix Makefiles" /Users/ruki/.xmake/cach
e/packages/2410/m/minifb/2023.09.21/source/minifb /Users/ruki/.xmake/cache/packages/2410/m/minif
b/2023.09.21/source/minifb /Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/min
ifb/build_3c0a9f80 /Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/minifb/buil
d_3c0a9f80 /Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/minifb/build_3c0a9f
80/CMakeFiles/minifb.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/mi
nifb/build_3c0a9f80'
make -f CMakeFiles/minifb.dir/build.make CMakeFiles/minifb.dir/build
make[2]: Entering directory '/Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/m
inifb/build_3c0a9f80'
[ 33%] Building C object CMakeFiles/minifb.dir/src/MiniFB_timer.c.o
[ 33%] Building CXX object CMakeFiles/minifb.dir/src/MiniFB_cpp.cpp.o
/Users/ruki/Downloads/emsdk/upstream/emscripten/emcc @CMakeFiles/minifb.dir/includes_C.rsp -fPI
C -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthr
ough -Wno-cast-function-type -MD -MT CMakeFiles/minifb.dir/src/MiniFB_timer.c.o -MF CMakeFiles/m
inifb.dir/src/MiniFB_timer.c.o.d -o CMakeFiles/minifb.dir/src/MiniFB_timer.c.o -c /Users/ruki/.x
make/cache/packages/2410/m/minifb/2023.09.21/source/minifb/src/MiniFB_timer.c
[ 50%] Building C object CMakeFiles/minifb.dir/src/MiniFB_common.c.o
[ 66%] Building C object CMakeFiles/minifb.dir/src/MiniFB_internal.c.o
/Users/ruki/Downloads/emsdk/upstream/emscripten/em++ @CMakeFiles/minifb.dir/includes_CXX.rsp -f
PIC -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallt
hrough -Wno-cast-function-type -std=c++11 -MD -MT CMakeFiles/minifb.dir/src/MiniFB_cpp.cpp.o -MF
CMakeFiles/minifb.dir/src/MiniFB_cpp.cpp.o.d -o CMakeFiles/minifb.dir/src/MiniFB_cpp.cpp.o -c /
Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/minifb/src/MiniFB_cpp.cpp
/Users/ruki/Downloads/emsdk/upstream/emscripten/emcc @CMakeFiles/minifb.dir/includes_C.rsp -fPI
C -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthr
ough -Wno-cast-function-type -MD -MT CMakeFiles/minifb.dir/src/MiniFB_internal.c.o -MF CMakeFile
s/minifb.dir/src/MiniFB_internal.c.o.d -o CMakeFiles/minifb.dir/src/MiniFB_internal.c.o -c /User
s/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/minifb/src/MiniFB_internal.c
/Users/ruki/Downloads/emsdk/upstream/emscripten/emcc @CMakeFiles/minifb.dir/includes_C.rsp -fPI
C -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthr
ough -Wno-cast-function-type -MD -MT CMakeFiles/minifb.dir/src/MiniFB_common.c.o -MF CMakeFiles/
minifb.dir/src/MiniFB_common.c.o.d -o CMakeFiles/minifb.dir/src/MiniFB_common.c.o -c /Users/ruki
/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/minifb/src/MiniFB_common.c
[ 83%] Building C object CMakeFiles/minifb.dir/src/web/WebMiniFB.c.o
/Users/ruki/Downloads/emsdk/upstream/emscripten/emcc @CMakeFiles/minifb.dir/includes_C.rsp -fPI
C -O2 -Wall -Wextra -Wno-switch -Wno-unused-function -Wno-unused-parameter -Wno-implicit-fallthr
ough -Wno-cast-function-type -MD -MT CMakeFiles/minifb.dir/src/web/WebMiniFB.c.o -MF CMakeFiles/
minifb.dir/src/web/WebMiniFB.c.o.d -o CMakeFiles/minifb.dir/src/web/WebMiniFB.c.o -c /Users/ruki
/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/minifb/src/web/WebMiniFB.c
[100%] Linking CXX static library libminifb.a
/usr/local/Cellar/cmake/3.25.3/bin/cmake -P CMakeFiles/minifb.dir/cmake_clean_target.cmake
/usr/local/Cellar/cmake/3.25.3/bin/cmake -E cmake_link_script CMakeFiles/minifb.dir/link.txt --v
erbose=1
/Users/ruki/Downloads/emsdk/upstream/emscripten/emar qc libminifb.a CMakeFiles/minifb.dir/src/Mi
niFB_common.c.o CMakeFiles/minifb.dir/src/MiniFB_cpp.cpp.o CMakeFiles/minifb.dir/src/MiniFB_inte
rnal.c.o CMakeFiles/minifb.dir/src/MiniFB_timer.c.o CMakeFiles/minifb.dir/src/web/WebMiniFB.c.o
/Users/ruki/Downloads/emsdk/upstream/emscripten/emranlib libminifb.a
make[2]: Leaving directory '/Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/mi
nifb/build_3c0a9f80'
[100%] Built target minifb
make[1]: Leaving directory '/Users/ruki/.xmake/cache/packages/2410/m/minifb/2023.09.21/source/mi
nifb/build_3c0a9f80'
/usr/local/Cellar/cmake/3.25.3/bin/cmake -E cmake_progress_start /Users/ruki/.xmake/cache/packag
es/2410/m/minifb/2023.09.21/source/minifb/build_3c0a9f80/CMakeFiles 0
make install
[100%] Built target minifb
Install the project...
-- Install configuration: "Release"
-- Installing: /Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/
lib/libminifb.a
-- Installing: /Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/
include/MiniFB.h
-- Installing: /Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/
include/MiniFB_cpp.h
-- Installing: /Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/
include/MiniFB_enums.h
-- Installing: /Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/
include/MiniFB_ios.h
-- Installing: /Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/
lib/cmake/minifb/minifb-config.cmake
-- Installing: /Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/
lib/cmake/minifb/minifb-config-release.cmake
finding minifb from xmake ..
checking for xmake::minifb ... minifb 2023.09.21
{
license = "MIT",
version = "2023.09.21",
sysincludedirs = {
"/Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/include"
},
linkdirs = {
"/Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/lib"
},
libfiles = {
"/Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/lib/libmin
ifb.a"
},
static = true,
links = {
"minifb"
}
}
patching /Users/ruki/.xmake/packages/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/lib/pk
gconfig/minifb.pc ..
checking for /Users/ruki/Downloads/emsdk/upstream/emscripten/emcc ... ok
checking for flags (-fPIC) ... ok
> emcc "-fPIC"
> /Users/ruki/Downloads/emsdk/upstream/emscripten/emcc -c -isystem /Users/ruki/.xmake/packages/m
/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/include -o /var/folders/32/w9cz0y_14hs19lkbs
6v6_fm80000gn/T/.xmake501/241031/_08C73D50D908453086DF4F9951104460.o /var/folders/32/w9cz0y_14hs
19lkbs6v6_fm80000gn/T/.xmake501/241031/_E2F545E80F43404C9F31A3736323FCE9.c
checking for flags (-fdiagnostics-color=always) ... ok
> emcc "-fdiagnostics-color=always"
clang: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
checking for em++ ... /Users/ruki/Downloads/emsdk/upstream/emscripten/em++
checking for the linker (ld) ... em++
checking for /Users/ruki/Downloads/emsdk/upstream/emscripten/em++ ... ok
checking for flags (-fPIC) ... ok
> em++ "-fPIC"
> /Users/ruki/Downloads/emsdk/upstream/emscripten/em++ -o /var/folders/32/w9cz0y_14hs19lkbs6v6_f
m80000gn/T/.xmake501/241031/_08C73D50D908453086DF4F9951104460.b /var/folders/32/w9cz0y_14hs19lkb
s6v6_fm80000gn/T/.xmake501/241031/_08C73D50D908453086DF4F9951104460.o -L/Users/ruki/.xmake/packa
ges/m/minifb/2023.09.21/3c0a9f808bcd46248fd8f9f9389f09b5/lib -lminifb
> checking for c includes(MiniFB.h)
> checking for c funcs(mfb_update_ex)
> checking for c links(minifb)
> checking for c snippet(has_cfuncs)
=> install minifb 2023.09.21 .. ok |
Xmake Version
2.9.5+20241026
Operating System Version and Architecture
Mac Catalina on x86_64
Describe Bug
minifb supports a lot of platforms, including wasm:
I noticed miniaudio does not specify supported platforms, which may be a better approach here?
Expected Behavior
I expect it to build for wasm platform.
Project Configuration
Additional Information and Error Logs
The text was updated successfully, but these errors were encountered: