s-u / fastmatch

Fast hashing functions and replacement of match()
18 stars 7 forks source link

WebR issue: unable to load shared object #13

Open isbool opened 5 months ago

isbool commented 5 months ago

Hey, im trying to use a custom compiled version of phangorn in webR and i get the following error:

An error occurred: package or namespace load failed for ‘phangorn’ in dyn.load(file, DLLpath = DLLpath, ...): webr.js?v=2d081c24:2588 unable to load shared object '/usr/lib/R/library/fastmatch/libs/fastmatch.so': webr.js?v=2d081c24:2588 Could not load dynamic lib: /usr/lib/R/library/fastmatch/libs/fastmatch.so webr.js?v=2d081c24:2588 LinkError: WebAssembly.Instance(): Import #28 "env" "R_registerRoutines": imported function does not match the expected type

isbool commented 4 months ago

You can solve this by commenting out the src/dummy.c

// extern void R_registerRoutines(void);
// extern void R_useDynamicSymbols(void);

// void dummy(void) {
//     R_registerRoutines();
//     R_useDynamicSymbols();
// }

then it compiles