Re: Undefined simbols moz_xmalloc (et al.) in Gecko 12

Benjamin Smedberg <[email protected]> Fri, 18 May 2012 12:17:25 -0400
Newsgroups gmane.comp.mozilla.devel.embedding
Message-ID <[email protected]>
On 5/18/2012 4:20 AM, Babele Dunnit wrote:
> Hi everybody,
>
> I am updating our embedding app from Gecko7 to Gecko12. I get linking
> errors:
>
> In function `operator new(unsigned int)':
> /dist/include/mozilla/mozalloc.h:229: undefined reference to
> `moz_xmalloc'
>
> In function `operator new[](unsigned int)':
> /dist/include/mozilla/mozalloc.h:241: undefined reference to
> `moz_xmalloc'
>
> In function `operator delete(void*)':
> /dist/include/mozilla/mozalloc.h:253: undefined reference to
> `moz_free'
>
> In function `operator delete[](void*)':
> dist/include/mozilla/mozalloc.h:265: undefined reference to `moz_free'
>
> I am building xulrunner with a default .mozconfig, with just
>
> ac_add_options --enable-cpp-rtti
>
> added.
>
> Any advice (apart from copying the sources and forcing the compilation/
> linking, which I will do now) ?
These errors occur while linking your embedding app? Are you using 
dependent or independent glue? I think you would need to end up linking 
against mozutil (which contains mozalloc IIRC), but that might depend on 
how you're linking to begin with.

--BDS