emcc gmp/mpfr/mpir

29 views
Skip to first unread message

leopard

unread,
Sep 8, 2020, 5:13:52 AM9/8/20
to emscripten-discuss
hi all,

I tried to convert mpir (a multiple precision lib) to javascript via emscripten under windows 64bit and failed, it said "mpn/generic/get_d.c:125:34: error: variable has incomplete type 'union ieee_double_extract'".  

I googled and somebody compiled gmp/mpfr sucessfully under win 32bit with empscripten, but failed under 64bit too.  Anybody ever make it work under win64?

thanks,
wei. 

Sam Clegg

unread,
Sep 8, 2020, 6:55:24 AM9/8/20
to emscripte...@googlegroups.com
Emscripten and WebAssembly are inherently always 32-bit, regardless of the machine you use to compile.

Regarding your specific compile error you probably need to look at the various ways the `ieee_double_extract` type is being defined in the library headers.  It could be that its inside an `ifdef` or that you need to modify the library at the location of the type definition.

cheers,
sam

--
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 emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/1c4eb408-15a8-4203-89db-191a4628059en%40googlegroups.com.

Floh

unread,
Sep 8, 2020, 8:35:33 AM9/8/20
to emscripten-discuss
I don't know the mpn library, but it seems this is an autoconf-related configuration error, look here:


...the union ieee_double_extract only exists when either the define HAVE_DOUBLE_IEEE_LITTLE_SWAPPED, HAVE_DOUBLE_IEEE_LITTLE_ENDIAN or HAVE_DOUBLE_IEEE_BIG_ENDIAN exists, these seem to be autoconf-generated configuration defines (https://clgitlab.o9n.de/Kryptographische-Protokolle/Zettel1/-/blob/master/c/lib/gmp/configure#L24758). So either autoconf wasn't run, or it was confused by the emscripten toolchain.
Reply all
Reply to author
Forward
0 new messages