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

Emscripten build #262

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Emscripten build #262

wants to merge 11 commits into from

Conversation

aaalloc
Copy link

@aaalloc aaalloc commented Jun 16, 2024

From openslide/openslide#621

For building, you will need to have emscripten and wasm-ld installed

Meson setup command

meson setup builddir --cross-file machines/cross-emscripten.ini --default-library=static -Dzlib:default_library=static -Dlibffi:default_library=static -Dlibxml2:default_library=static -Dsqlite3:default_library=static -Dzstd:default_library=static -Dlibpng:default_library=static -Dlibopenjp2:default_library=static -Dglib:default_library=static -Dgdk-pixbuf:default_library=static -Dpixman:default_library=static -Dcairo:default_library=static -Duthash:default_library=static -Dlibdico:default_library=static -Dopenslide:default_library=static -Dproxy-libintl:default_library=static

meson compile -C builddir

I have changed glib.wrap because building glib with emscripten needs particular changes (emscripten-core/emscripten#11066) but it stills fails building.

It currently stuck to glib/gdk-pixbuf compilation part
image

When trying to compile pcre2 it says

pcre2| Checking for function "mkostemp" : YES

subprojects/pcre2-10.44/meson.build:73:6: ERROR: Problem encountered: Your configuration is not supported

but pcre2 wasm build are present online https://github.com/stephen-riley/pcre2-wasm/blob/master/Makefile, so it is possible but I don't know for now how to do it. (Pcre2 was needed for glib 2.80.3 (previous version of glib.wrap that I modified))

So, for a successful wasm32 build, I think a correct emscripten patch for glib would do the trick.

@openslide-bot
Copy link
Contributor

openslide-bot commented Jun 16, 2024

DCO signed off ✔️

All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1.

@aaalloc aaalloc marked this pull request as ready for review June 16, 2024 09:53
aaalloc and others added 3 commits August 10, 2024 21:22
- removed gmodule for gdk-pixbuf
- refactored a bit
Signed-off-by: yanovskyy <[email protected]>
@aaalloc
Copy link
Author

aaalloc commented Aug 11, 2024

Errors previously showed in screen are fixed by e1f3519, now it seem to compile with different warnings in gdk-pixbuf side and some problems objcopy step that might be easy to fix

/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(meson-generated_.._openslide-tables.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-cache.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-decode-gdkpixbuf.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-decode-jp2k.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-decode-jpeg.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-decode-png.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-decode-sqlite.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-decode-tiff.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-decode-tifflike.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-decode-xml.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-error.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-file.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-grid.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-hash.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-jdatasrc.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
/usr/bin/objcopy: subprojects/openslide-4.0.0/src/libopenslide.a(openslide-util.c.o): Incapable de reconnaître le format du fichier: format de fichier non reconnu
............

I might fix it if I have some times.

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

Successfully merging this pull request may close these issues.

2 participants