The build system as seen on GitHub for libjpeg-turbo doesn't include the
files for all platforms when compiling:

https://github.com/libjpeg-turbo/libjpeg-turbo/tree/master/simd

It only includes the right stuff for the target platform which is what you
should be doing here for emscripten as well.

 - Bruce


On Mon, Sep 14, 2015 at 5:20 PM, Björn K. <[email protected]
> wrote:

> @Gordon: Have you succeeded? I get the same warnings (and as a result a
> non-worling JavaScript-file)...
>
> Am Donnerstag, 6. August 2015 10:59:59 UTC+2 schrieb Gordon Rankin:
>>
>> 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.

Reply via email to