-
Notifications
You must be signed in to change notification settings - Fork 239
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
Fail to build with wasm #1034
Comments
The post above was ambiguous. The "another error" is this part.
I checked the current implementations of timer module. Other platforms follow the latest interface of the Timer class, but it seems that the wasm timer implementation does not follow it? |
Thanks for the additional details. It looks like something got out of sync in the building of timer for wasm. While other platforms use both modTimer.c and a platform specific timer.c, the wasm port merges those into its timer.c. That's not incorrect, but the inconsistency seems to have created a build mixup. I think this is the commit that introduced the problem, specifically with simulators/manifest.json. Unfortunately, my wasm tooling is not set-up, so I can't easily try. Maybe you can? |
After reverting the commit Moddable successfully builds the wasm target! https://twitter.com/meganetaaan/status/1640393426243035136 I believe our next step should be to make |
That makes sense. Thank you for confirming. |
Build environment: Linux (Ubuntu 20.04) and moddable v3.7.0
Target device: wasm
Description
The wasm build fails. There are two problems.
-p wasm
, I get an error about timer.Steps to Reproduce
After fixing the failed command of makefile according to other lines
$(BIN_DIR)/xsc -> $(XSC)
the compile error dessapeared.But when I try to build examples another error occurs.
build log
sskw@sskw-XF:~/.local/share/moddable/examples/piu/balls$ mcconfig -m -d -p wasm # xsc screen.xsb # xsc time.xsb # xsc timer.xsb # xsc Resource.xsb # xsc main.xsb # xsc commodetto/Bitmap.xsb # xsc commodetto/Poco.xsb # xsc commodetto/parseBMP.xsb # xsc commodetto/parseRLE.xsb # xsc piu/All.xsb # xsc piu/Timeline.xsb # xsc piu/CombTransition.xsb # xsc piu/MC.xsb # xsc piu/WipeTransition.xsb # xsc mc/config.xsb # xsid screen.c.xsi # xsid modTime.c.xsi # xsid modTimer.c.xsi # xsid timer.c.xsi # xsid Resource.c.xsi # xsid modInstrumentation.c.xsi # xsid piuDie.c.xsi # xsid piuFont.c.xsi # xsid piuImage.c.xsi # xsid piuRegion.c.xsi # xsid piuTexture.c.xsi # xsid piuView.c.xsi # xsid commodettoBitmap.c.xsi # xsid commodettoPoco.c.xsi # xsid commodettoPocoBlit.c.xsi # xsid cfeBMF.c.xsi # xsid commodettoParseBMP.c.xsi # xsid commodettoParseRLE.c.xsi # xsid piuApplication.c.xsi # xsid piuBehavior.c.xsi # xsid piuColor.c.xsi # xsid piuColumn.c.xsi # xsid piuContainer.c.xsi # xsid piuContent.c.xsi # xsid piuLabel.c.xsi # xsid piuLayout.c.xsi # xsid piuLocals.c.xsi # xsid piuPort.c.xsi # xsid piuRectangle.c.xsi # xsid piuRow.c.xsi # xsid piuScroller.c.xsi # xsid piuSkin.c.xsi # xsid piuStyle.c.xsi # xsid piuText.c.xsi # xsid piuTimeline.c.xsi # xsid piuTransition.c.xsi # xsid screen.h.xsi # xsid modTimer.h.xsi # xsid modInstrumentation.h.xsi # xsid commodettoBitmap.h.xsi # xsid commodettoPoco.h.xsi # xsid commodettoPocoBlit.h.xsi # xsid piuAll.h.xsi # xsid piuMC.h.xsi # png2bmp balls-color.bmp balls-alpha.bmp # cc main.c # cp index.html # xsl modules # mcrez resources Total resource size: 9188 bytes # cc mc.resources.c ### 524 instances, 967 keys, 92 colors, 0 holes # cc mc.xs.c # cc screen.c.o # cc modTime.c.o # cc modTimer.c.o # cc timer.c.o # cc Resource.c.o # cc modInstrumentation.c.o # cc piuDie.c.o # cc piuFont.c.o # cc piuImage.c.o # cc piuRegion.c.o # cc piuTexture.c.o # cc piuView.c.o # cc commodettoBitmap.c.o # cc commodettoPoco.c.o # cc commodettoPocoBlit.c.o # cc cfeBMF.c.o # cc commodettoParseBMP.c.o # cc commodettoParseRLE.c.o # cc piuApplication.c.o # cc piuBehavior.c.o # cc piuColor.c.o # cc piuColumn.c.o # cc piuContainer.c.o # cc piuContent.c.o # cc piuLabel.c.o /home/sskw/.local/share/moddable/modules/commodetto/commodettoParseBMP.c:74:6: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] return; ^ /home/sskw/.local/share/moddable/modules/commodetto/commodettoParseBMP.c:72:5: note: previous statement is here if ((gray != c_read8(bytes + palette + 0)) || (gray != c_read8(bytes + palette + 1)) || (gray != c_read8(bytes + palette + 2))) ^ # cc piuLayout.c.o 1 warning generated. # cc piuLocals.c.o # cc piuPort.c.o # cc piuRectangle.c.o # cc piuRow.c.o # cc piuScroller.c.o # cc piuSkin.c.o # cc piuStyle.c.o # cc piuText.c.o # cc piuTimeline.c.o # cc piuTransition.c.o # cc mc.js wasm-ld: error: duplicate symbol: xs_timer_set >>> defined in /home/sskw/.local/share/moddable/build/tmp/wasm/debug/balls/modTimer.c.o >>> defined in /home/sskw/.local/share/moddable/build/tmp/wasm/debug/balls/timer.c.owasm-ld: error: duplicate symbol: xs_timer_repeat
wasm-ld: error: duplicate symbol: xs_timer_schedule
wasm-ld: error: duplicate symbol: xs_timer_clear
wasm-ld: error: duplicate symbol: xs_timer_delay
The text was updated successfully, but these errors were encountered: