We have a few cases where stuff exists in headers but is not implemented -
because we use headers from musl, but have a js implementation that is not
100% comprehensive yet.

If you have a simple way to edit the configure step to manually fail those
tests, that could be the easiest workaround. Or, locally edit the
system/include headers to remove them.

Perhaps we should remove stuff from headers that is not implemented yet,
but we try to not modify the musl headers to keep things close to upstream.

- Alon



On Thu, Jan 2, 2014 at 10:38 AM, Sam Reid <[email protected]> wrote:

> Hi there, I am attempting to build and run the ngspice circuit simulator
> under emscripten.  I posted previously under a more specific thread topic
> "linker problem" but after resolving that I am hitting other issues I was
> hoping you could help with, so I decided to start a new thread.
>
> I'm using clang (and llvm) 3.2 with emscripten 1.7.8 on OSX 10.9.1.
>
> My current problem is that "sigsetjmp" and a few other symbols are
> unresolved, even though they appear to exist in the configure step.
>
> I'm building the project as described in
> https://github.com/kripken/emscripten/wiki/Building-Projects.  When I run
> the configure step 'emconfigure ../configure', it reports:
> ...
> checking whether isnan is declared... yes
> checking for sigsetjmp... yes
> checking libiberty.h usability... no
> ...
>
> So it appears that sigsetjmp is discovered by the configure process.
>  After 'emmake make' succeeds, I copy the binary file 'ngspice' to
> 'ngspice.o' (not sure if that's the right thing to do), and run the emcc
> compiler on ngspice.o.  This reports:
>
> Sams-MacBook-Air:src samreid$ emcc ngspice.o -o ngspice.js
> warning: unresolved symbol: sigsetjmp
> warning: unresolved symbol: llvm_dbg_value
> warning: unresolved symbol: siglongjmp
> warning: unresolved symbol: logb
> warning: Casting a function pointer type to a potentially incompatible one
> (use -s VERBOSE=1 to see more)
> warning: See
> https://github.com/kripken/emscripten/wiki/CodeGuidelinesAndLimitations#function-pointer-issuesfor
>  more information on dangerous function pointer casts
> warning: Casting a function pointer type to a potentially incompatible one
> (use -s VERBOSE=1 to see more)
> warning: See
> https://github.com/kripken/emscripten/wiki/CodeGuidelinesAndLimitations#function-pointer-issuesfor
>  more information on dangerous function pointer casts
> sourcemapper: Unable to find original file for
> ../../../../src/spicelib/devices/dev.c at
> /Users/samreid/src/spicelib/devices/dev.c
>
> Note it said a few symbols are unresolved, though it does create a 30+MB
> js file.  After manually fixing TOTAL_MEMORY (by doubling it in the js
> file), when I run under node, it fails with that error:
>
> Sams-MacBook-Air:src samreid$ node ngspice.js
> exception thrown: ReferenceError: _sigsetjmp is not
> defined,ReferenceError: _sigsetjmp is not defined
>     at _baseaddr
> (/Users/samreid/Downloads/ngspice-25/release/src/ngspice.js:43834:2)
>     at _init_rlimits
> (/Users/samreid/Downloads/ngspice-25/release/src/ngspice.js:43798:9)
>     at Object._main
> (/Users/samreid/Downloads/ngspice-25/release/src/ngspice.js:7086:2)
>     at Object.callMain
> (/Users/samreid/Downloads/ngspice-25/release/src/ngspice.js:941255:30)
>     at doRun
> (/Users/samreid/Downloads/ngspice-25/release/src/ngspice.js:941295:25)
>     at run
> (/Users/samreid/Downloads/ngspice-25/release/src/ngspice.js:941308:5)
>     at Object.<anonymous>
> (/Users/samreid/Downloads/ngspice-25/release/src/ngspice.js:941351:1)
>     at Module._compile (module.js:456:26)
>     at Object.Module._extensions..js (module.js:474:10)
>     at Module.load (module.js:356:32)
>
> /Users/samreid/Downloads/ngspice-25/release/src/ngspice.js:941272
>       throw e;
>             ^
> Any ideas?  I’m a bit stuck!
>
> Thanks!
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/groups/opt_out.

Reply via email to