I would check how libjpegturbo links in a native build. Perhaps when simd is enabled they do not link certain files into libturbojpeg?
On Thu, Aug 6, 2015 at 1:59 AM, Gordon Rankin <[email protected]> wrote: > We are making use of libjpeg compiled to javascript in a webapp to perform > jpeg decoding and encoding in webworkers. This works great, however i've > been reading that simd support in emscripten has improved greatly > recently. Therefore I am now trying to compile libjpeg-turbo. > > I have managed to correctly set up my configure and Makefiles and now I > end up with two bitcode files libturbojpeg.a and libsimd.a > > libsimd.a contains the C code for x64, i386, ARM, and MIPS versions along > with the relevant .o files. > > When trying to combine libturbojpeg.a and libsimd.a i get the following > error: > > ERROR: Linking globals named 'jsimd_can_rgb_ycc': symbol multiply defined! > > I assume this is because the globals are defined in each of the various > CPU types C files. And should be loaded depending on which type of CPU is > present. > > My question is how am I supposed to handle this situation with Emscipten? > > > If I try to compile them directly with the following: > > sudo ../emcc -O3 ./decoder.cc ./.libs/libturbojpeg.a > ./simd/.libs/libsimd.a -o jpegturbo.js --bind --memory-init-file 0 -s > TOTAL_MEMORY=100000000 -s DISABLE_EXCEPTION_CATCHING=1 -s ASSERTIONS=1 > > I get unresolved symbol warnings for all of the simd functions. > > I'm relatively new to Emscripten so I assume i'm doing something stupidly > wrong. > > Any help would be greatly appreciated > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
