Wesley Hardman <whardman87@...> writes:

> 
> I'm trying to build Firefox 64-bit and keep running into this error.  Does
anyone know how to resolve it?
> 
> Unified_cpp_netwerk_base0.obj : error LNK2019: unresolved external symbol
"public: bool __cdecl
> JS::CallArgs::requireAtLeast(struct JSContext *,char const *,unsigned int)"
> (?requireAtLeast <at> CallArgs <at> JS <at>  <at> QEAA_NPEAUJSContext <at>
 <at> PEBDI <at> Z) referenced in function "bool
> __cdecl mozilla::net::PACProxyAlert(struct JSContext *,unsigned int,class
JS::Value *)" (?PACProxyAlert <at> net <at> mozilla <at>  <at>
YA_NPEAUJSContext <at>  <at> IPEAVValue <at> JS <at>  <at>  <at> Z)
> xul.dll : fatal error LNK1120: 1 unresolved externals
> mozmake[5]: *** [xul.dll] Error 1120
> mozmake[4]: *** [toolkit/library/target] Error 2
> 
> Thanks
> Wesley Hardman
> 


CallArgs::requireAtLeast is not exported. The build is broken probably when
--enable-shared-js is used. You'll need to export the function as follows:

In js\src\jsapi.h, add an exported function:
namespace MozillaIsBroken {
extern JS_PUBLIC_API(bool)
JS_RequireArgsAtLeast(JSContext* cx, JS::CallArgs& args, const char* fnname,
unsigned required);
}

In js\src\jsapi.cpp, add the function definition:
JS_PUBLIC_API(bool)
MozillaIsBroken::JS_RequireArgsAtLeast(JSContext* cx, JS::CallArgs& args,
const char* fnname, unsigned required) {
    return args.requireAtLeast(cx, fnname, required);
}

In netwerk\base\ProxyAutoConfig.cpp, replace all calls to
CallArgs::requireAtLeast:
args..requireAtLeast(cx, "whatever", 1)
with:
MozillaIsBroken::JS_RequireArgsAtLeast(cx, args, "whatever", 1)

Regards,
WebSupergoo


_______________________________________________
dev-builds mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-builds

Reply via email to