Skip to content
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

Building for Web Assembly got audio_player linker errors #52

Closed
pixelblender opened this issue Mar 8, 2021 · 5 comments
Closed

Building for Web Assembly got audio_player linker errors #52

pixelblender opened this issue Mar 8, 2021 · 5 comments

Comments

@pixelblender
Copy link

Hi,

First of all thank you for this awesome library. The code structure is very clean.

I'm still exploring pmtech and trying to build for wasm but got linker errors when pmbuild is building audio_player. I was following the steps in the Building page in the wiki. I'm using the latest emscripten sdk-releases-upstream-89202930a98fe7f9ed59b574469a9471b0bda7dd-64bit on macOS Big Sur. Same error happens on Linux KDE Neon (based on ubuntu 20.04):

Linking audio_player
error: undefined symbol: _ZN3put18audio_channel_stopEj (referenced by top-level compiled C/C++ code)
warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: __ZN3put18audio_channel_stopEj may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library

and many more similar errors.

@polymonster
Copy link
Owner

Hi, Audio currently is not implemented in the wasm / emscripten builds... it should only affect the audio_player and play_sound samples. To get around this I have been deleting the corresponding makefiles in build/web folder.

I can add something more official to exclude those samples for the time being, when I get chance.

@pixelblender
Copy link
Author

Hello. I removed audio_player.make and play_sound.make and turns out sdf_shadow also won't compile:

Linking sdf_shadow
error: data/textures/redchecker01.dds does not exist

other than that the rest are compiling just fine.

@polymonster
Copy link
Owner

I will take a look at the sdf one when I get chance.. probably at the weekend now.

@polymonster
Copy link
Owner

Hey I've fixed the audio linking issues now, these samples are excluded from the web platform.

As for the issue with the sdf_shadow I think its because the source file is RedChecker and the entry is lower case when it's trying to be linked...

I've renamed the textures to all lowercase, if you try building again clean first and try again:

pmbuild web -clean
pmbuild web
pmbuild make web all

@pixelblender
Copy link
Author

emscripten compiles without issue now. the sdf shadow example is working fine. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants