js-config.h not installed mozjs-31.2.0

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

js-config.h not installed mozjs-31.2.0

greg
Building helloworld fails with the following error:
/usr/local/include/mozjs-31/js/TypeDecls.h:23:23: fatal error: js-config.h: No such file or directory
 #include "js-config.h"


It is in my build directory:
mozjs-31.2.0/js/src/build_OPT.OBJ/dist/include/js-config.h
mozjs-31.2.0/js/src/build_OPT.OBJ/js/src/js-config.h

but make install didn't transfer it.

$ js-config --cflags --libs
-std=gnu++0x -include /usr/local/include/mozjs-31/js/RequiredDefines.h -I/usr/local/include/mozjs-31
-L${libdir} -l${JS_LIBRARY_NAME}  -lm -ldl

$ uname -a
Linux greg-softsprocket 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2 18:23:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


Everything seemed to build and install without a problem. Can I just copy it to /usr/local/include/mozjs-31? Should I be downloading and building a different source? This one was https://people.mozilla.org/~sstangl/mozjs-31.2.0.rc0.tar.bz2

Thanks.
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: js-config.h not installed mozjs-31.2.0

Sean Stangl
Hi Greg,

Thanks for reporting. You can copy the file and that will work fine.

I uploaded a newer version of the standalone release just now and modified
it so that js-config.h is automatically installed. If you would like to
pick up that version, it is available at
https://people.mozilla.org/~sstangl/mozjs-31.5.0.tar.bz2.

Note that https://bugzilla.mozilla.org/show_bug.cgi?id=1006275 is still
unfixed, so parallel builds for non-ICU code will fail. As a workaround,
you can specify "make -j1".

Thanks,
Sean

On Thu, Mar 5, 2015 at 8:25 AM, <[hidden email]> wrote:

> Building helloworld fails with the following error:
> /usr/local/include/mozjs-31/js/TypeDecls.h:23:23: fatal error:
> js-config.h: No such file or directory
>  #include "js-config.h"
>
>
> It is in my build directory:
> mozjs-31.2.0/js/src/build_OPT.OBJ/dist/include/js-config.h
> mozjs-31.2.0/js/src/build_OPT.OBJ/js/src/js-config.h
>
> but make install didn't transfer it.
>
> $ js-config --cflags --libs
> -std=gnu++0x -include /usr/local/include/mozjs-31/js/RequiredDefines.h
> -I/usr/local/include/mozjs-31
> -L${libdir} -l${JS_LIBRARY_NAME}  -lm -ldl
>
> $ uname -a
> Linux greg-softsprocket 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2
> 18:23:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
>
>
> Everything seemed to build and install without a problem. Can I just copy
> it to /usr/local/include/mozjs-31? Should I be downloading and building a
> different source? This one was
> https://people.mozilla.org/~sstangl/mozjs-31.2.0.rc0.tar.bz2
>
> Thanks.
> _______________________________________________
> dev-tech-js-engine mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: js-config.h not installed mozjs-31.2.0

answerwinner
In reply to this post by greg
-------TITLE-------------
v31 crashed on Mac
-------CONTENT-----------
I am using SpiderMonkey mozjs-31.2.0 to work with Unity3D (Unity3D.com).
SpiderMonkey is initialized when Unity3D editor enters Play mode, and is shutted down when the editor exits editor mode.
Crash happens during SECOND initialization of SpiderMonkey when trying to JS_CompileScript FIRST JavaScript file which is marked (1) in the code below.
The library was built with --disable-shared-js.

Is it an known issue? or any ideas to fix this?

(BTW, there was another crash of JS::CompileOptions and was fixed by defining JSGC_USE_EXACT_ROOTING in js-config.h.)

-----------------------------------------------------------------------------
MOZ_API _BOOL evaluate( const char* ascii, int length, const char* filename )
{
    WriteLog(filename);
    JS::CompileOptions options(g_cx);
    WriteLog("1");
    options.setVersion(JSVERSION_LATEST);
    WriteLog("2");
    options.setUTF8(true);
    WriteLog("3");
    options.setFileAndLine(filename, 1);
    WriteLog("4");

    JS::RootedObject roGlobal(g_cx, g_global.ref().get());
    WriteLog("5");

    JS::RootedScript jsScript(g_cx, JS_CompileScript(g_cx, roGlobal, ascii, length, options));  ///////// (1) CRASHED here

    WriteLog("6");
    if (jsScript == 0)
    {
        Assert(false, "JS_CompileScript fail");
        return _FALSE;
    }

    JS::RootedValue val(g_cx);
    if (!JS_ExecuteScript(g_cx, roGlobal, jsScript, &val))
    {
        Assert(false, "JS_ExecuteScript fail");
        return _FALSE;
    }

    WriteLog("7\n");
    return _TRUE;
}
-----------------------------------------------------------------------------

在 2015年3月7日星期六 UTC+8上午7:38:40,Sean Stangl写道:

> Hi Greg,
>
> Thanks for reporting. You can copy the file and that will work fine.
>
> I uploaded a newer version of the standalone release just now and modified
> it so that js-config.h is automatically installed. If you would like to
> pick up that version, it is available at
> https://people.mozilla.org/~sstangl/mozjs-31.5.0.tar.bz2.
>
> Note that https://bugzilla.mozilla.org/show_bug.cgi?id=1006275 is still
> unfixed, so parallel builds for non-ICU code will fail. As a workaround,
> you can specify "make -j1".
>
> Thanks,
> Sean
>
> On Thu, Mar 5, 2015 at 8:25 AM, <[hidden email]> wrote:
>
> > Building helloworld fails with the following error:
> > /usr/local/include/mozjs-31/js/TypeDecls.h:23:23: fatal error:
> > js-config.h: No such file or directory
> >  #include "js-config.h"
> >
> >
> > It is in my build directory:
> > mozjs-31.2.0/js/src/build_OPT.OBJ/dist/include/js-config.h
> > mozjs-31.2.0/js/src/build_OPT.OBJ/js/src/js-config.h
> >
> > but make install didn't transfer it.
> >
> > $ js-config --cflags --libs
> > -std=gnu++0x -include /usr/local/include/mozjs-31/js/RequiredDefines.h
> > -I/usr/local/include/mozjs-31
> > -L${libdir} -l${JS_LIBRARY_NAME}  -lm -ldl
> >
> > $ uname -a
> > Linux greg-softsprocket 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2
> > 18:23:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
> >
> >
> > Everything seemed to build and install without a problem. Can I just copy
> > it to /usr/local/include/mozjs-31? Should I be downloading and building a
> > different source? This one was
> > https://people.mozilla.org/~sstangl/mozjs-31.2.0.rc0.tar.bz2
> >
> > Thanks.
> > _______________________________________________
> > dev-tech-js-engine mailing list
> > [hidden email]
> > https://lists.mozilla.org/listinfo/dev-tech-js-engine
> >
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine
Reply | Threaded
Open this post in threaded view
|

Re: js-config.h not installed mozjs-31.2.0

answerwinner
Sorry, it's not crash, it seems it's a dead loop, CPU cost is 100%.

Call stack:
0 _pthread_cond_check_init
1 _pthread_cond_wait
2 pthread_cond_wait$UNIX2003
3 PR_WaitCondVar(nspr::CondVar*, unsigned int)
4 js::SourceCompressTask::complete()
5 js::frontend::CompileScript(js::ExclusiveContext*, js::LifoAlloc*, JS::Handle<JSObject*>, JS::Handle..mpileOptions const&, JS::SourceBufferHolder&, JSString*, unsigned int, js::SourceCompressTask*)
6 JS::Compile(JSContext*, JS::Handle<JSObject*>, JS::ReadOnlyCompileOptions const&, char16_t const*, unsigned long)
7 JS::Compile(JSContext*, JS::Handle<JSObject*>, JS::ReadOnlyCompileOptions const&, char const*, unsigned long)


在 2015年7月19日星期日 UTC+8下午7:28:34,answer...@gmail.com写道:

> -------TITLE-------------
> v31 crashed on Mac
> -------CONTENT-----------
> I am using SpiderMonkey mozjs-31.2.0 to work with Unity3D (Unity3D.com).
> SpiderMonkey is initialized when Unity3D editor enters Play mode, and is shutted down when the editor exits editor mode.
> Crash happens during SECOND initialization of SpiderMonkey when trying to JS_CompileScript FIRST JavaScript file which is marked (1) in the code below.
> The library was built with --disable-shared-js.
>
> Is it an known issue? or any ideas to fix this?
>
> (BTW, there was another crash of JS::CompileOptions and was fixed by defining JSGC_USE_EXACT_ROOTING in js-config.h.)
>
> -----------------------------------------------------------------------------
> MOZ_API _BOOL evaluate( const char* ascii, int length, const char* filename )
> {
>     WriteLog(filename);
>     JS::CompileOptions options(g_cx);
>     WriteLog("1");
>     options.setVersion(JSVERSION_LATEST);
>     WriteLog("2");
>     options.setUTF8(true);
>     WriteLog("3");
>     options.setFileAndLine(filename, 1);
>     WriteLog("4");
>
>     JS::RootedObject roGlobal(g_cx, g_global.ref().get());
>     WriteLog("5");
>
>     JS::RootedScript jsScript(g_cx, JS_CompileScript(g_cx, roGlobal, ascii, length, options));  ///////// (1) CRASHED here
>
>     WriteLog("6");
>     if (jsScript == 0)
>     {
>         Assert(false, "JS_CompileScript fail");
>         return _FALSE;
>     }
>
>     JS::RootedValue val(g_cx);
>     if (!JS_ExecuteScript(g_cx, roGlobal, jsScript, &val))
>     {
>         Assert(false, "JS_ExecuteScript fail");
>         return _FALSE;
>     }
>
>     WriteLog("7\n");
>     return _TRUE;
> }
> -----------------------------------------------------------------------------
>
> 在 2015年3月7日星期六 UTC+8上午7:38:40,Sean Stangl写道:
> > Hi Greg,
> >
> > Thanks for reporting. You can copy the file and that will work fine.
> >
> > I uploaded a newer version of the standalone release just now and modified
> > it so that js-config.h is automatically installed. If you would like to
> > pick up that version, it is available at
> > https://people.mozilla.org/~sstangl/mozjs-31.5.0.tar.bz2.
> >
> > Note that https://bugzilla.mozilla.org/show_bug.cgi?id=1006275 is still
> > unfixed, so parallel builds for non-ICU code will fail. As a workaround,
> > you can specify "make -j1".
> >
> > Thanks,
> > Sean
> >
> > On Thu, Mar 5, 2015 at 8:25 AM, <[hidden email]> wrote:
> >
> > > Building helloworld fails with the following error:
> > > /usr/local/include/mozjs-31/js/TypeDecls.h:23:23: fatal error:
> > > js-config.h: No such file or directory
> > >  #include "js-config.h"
> > >
> > >
> > > It is in my build directory:
> > > mozjs-31.2.0/js/src/build_OPT.OBJ/dist/include/js-config.h
> > > mozjs-31.2.0/js/src/build_OPT.OBJ/js/src/js-config.h
> > >
> > > but make install didn't transfer it.
> > >
> > > $ js-config --cflags --libs
> > > -std=gnu++0x -include /usr/local/include/mozjs-31/js/RequiredDefines.h
> > > -I/usr/local/include/mozjs-31
> > > -L${libdir} -l${JS_LIBRARY_NAME}  -lm -ldl
> > >
> > > $ uname -a
> > > Linux greg-softsprocket 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2
> > > 18:23:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
> > >
> > >
> > > Everything seemed to build and install without a problem. Can I just copy
> > > it to /usr/local/include/mozjs-31? Should I be downloading and building a
> > > different source? This one was
> > > https://people.mozilla.org/~sstangl/mozjs-31.2.0.rc0.tar.bz2
> > >
> > > Thanks.
> > > _______________________________________________
> > > dev-tech-js-engine mailing list
> > > [hidden email]
> > > https://lists.mozilla.org/listinfo/dev-tech-js-engine
> > >
_______________________________________________
dev-tech-js-engine mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-js-engine