Agreed, it would be great to fix this and get it upstream if possible.

(I would help but I know almost nothing about autotools...)

- Alon


On Fri, Jun 12, 2015 at 4:56 PM, Brion Vibber <[email protected]> wrote:

> My ogv.js media decoder/player project pulls in several C libraries, most
> of which use the GNU autoconf build system. autoconf is notoriously
> difficult to wrap one's head around, but it's used on a lot of projects so
> emscripten has some hacks to make it work a little better out of the box...
>
> Recently I was told of a regression with shared library support detection
> on Linux build hosts, which I tracked down to the removal of one of those
> hacks since emscripten 1.30.
>
> Patch for emscripten master:
> https://github.com/kripken/emscripten/pull/3538
>
>
> What I'd like instead of relying on these hacks is to invoke autoconf's
> built-in support for cross-compiling, so the toolchain fully understands
> that it's cross-compiling to JavaScript and not building for Mac or Linux.
>
> This can be done by passing the option "--host=asmjs-unknown-emscripten"
> to configure. There are two major problems blocking me from using it right
> now:
>
>
> 1) GNU's config.guess / config.sub scripts don't yet recognize emscripten
> as a valid OS target, and craps out. You can work around this by using
> "--host=asmjs-local-emscripten" for now -- the "local" overrides the
> validity checks.
>
> I have a patch for these files sitting around which I need to clean up and
> submit upstream.
>
> A lot of stuff seems to "just work" in the build process this way,
> except...
>
>
> 2) GNU libtool's macros for autoconf don't recognize emscripten as
> supporting shared libraries, so projects using it only produce static .a
> libs.
>
> Using static libraries with emscripten seems very flaky. Emscripten's docs
> recommend building shared libraries instead, so I've been relying on
> producing .so or .dylib files (depending on the build host system!) and
> manually linking to them instead of using -lwhatever.
>
> I should be able to whip up a patch to libtool's autoconf macros to accept
> emscripten as a target and produce .so files consistently regardless of the
> build host system.
>
> Alternately... it might make more sense to *not* enable shared libraries,
> and figure out why linking to the static libraries is failing. I'm not yet
> sure whether that's a problem with the libraries, the archive tool,
> emscripten, my build, or what. :D
>
>
> (Note that autoconf is a weird system; *source releases* of software tend
> to include the configure script in them, but *source control* checkouts
> usually do not... so people building projects checked out from source
> control need the proper versions of autoconf/libtool/etc, it's all kind of
> confusing.)
>
> But it'd be nice to get fixes in the tools upstream so as they trickle
> out, it gets easier to use the cross-compilation mode. :)
>
> -- brion vibber (brion @ pobox.com / bvibber @ wikimedia.org)
>
> --
> 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