mozjs17

Help
Anonymous
2013-04-07
2013-05-30
  • Anonymous - 2013-04-07

    will mediatomb be compatible with the latest mozjs17 ?
    if not, is the libjs1.9.5 the latest compatible version ?

     
  • Anonymous - 2013-04-07

    coz when I try to compile with mozjs17 I get these errors :

    i686-thecus32v5-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I../tombupnp/upnp/inc   -O2 -fno-inline -fPIC -I/data/Development/Home/Thecus/Build/ROOT32/raid/data/module/mediatomb/system/include -I/data/Development/Home/Thecus/Build/ROOT.DEV32/raid/data/module/ModBase1/system/include -I/raid/data/module/ffmpeg/sys/include -I../src -I../tombupnp/ixml/inc -I../tombupnp/threadutil/inc -I../tombupnp/upnp/inc -I.. -I/data/Development/Home/Thecus/Build/ROOT.DEV32/raid/data/module/ModBase1/system/include -I/raid/data/module/MySQL5.32.2.0.0/MySQL/include/mysql -I/data/Development/Home/Thecus/Build/ROOT32/raid/data/module/mediatomb/system/include/js-17.0 -I/data/Development/Home/Thecus/Build/ROOT32/raid/data/module/mediatomb/system/include/taglib  -I/data/Development/Home/Thecus/Build/ROOT.DEV32/raid/data/module/ModBase1/system/include -I/data/Development/Home/Thecus/Build/ROOT.DEV32/raid/data/module/ModBase1/system/include  -I/data/Development/Home/Thecus/Build/ROOT32/raid/data/module/mediatomb/system/include -I/data/Development/Home/Thecus/Build/ROOT.DEV32/raid/data/module/ModBase1/system/include -pthread -I/usr/include -I/raid/data/module/ffmpeg/sys/include  -I/raid/data/module/ffmpeg/sys/include -I/data/Development/Home/Thecus/Build/ROOT.DEV32/raid/data/module/ModBase1/system/include -I/data/Development/Home/Thecus/Build/ROOT.DEV32/raid/data/module/ModBase1/system/include -I/data/Development/Home/Thecus/Build/ROOT32/raid/data/module/mediatomb/system/include -I/data/Development/Home/Thecus/Build/ROOT32/raid/data/module/mediatomb/system/include -O2 -fno-inline -fPIC -I/data/Development/Home/Thecus/Build/ROOT32/raid/data/module/mediatomb/system/include -I/data/Development/Home/Thecus/Build/ROOT.DEV32/raid/data/module/ModBase1/system/include -I/raid/data/module/ffmpeg/sys/include -I/data/Development/Home/Thecus/Build/ROOT32/raid/data/module/mediatomb/system/include -MT libmediatomb_a-import_script.o -MD -MP -MF .deps/libmediatomb_a-import_script.Tpo -c -o libmediatomb_a-import_script.o `test -f '../src/scripting/import_script.cc' || echo './'`../src/scripting/import_script.cc
    In file included from ../src/scripting/import_script.cc:40:
    ../src/scripting/js_functions.h:43: error: 'uintN' has not been declared
    ../src/scripting/js_functions.h:46: error: 'uintN' has not been declared
    ../src/scripting/js_functions.h:49: error: 'uintN' has not been declared
    ../src/scripting/js_functions.h:51: error: 'uintN' has not been declared
    ../src/scripting/js_functions.h:52: error: 'uintN' has not been declared
    ../src/scripting/js_functions.h:53: error: 'uintN' has not been declared
    ../src/scripting/js_functions.h:54: error: 'uintN' has not been declared
    

    under mozjs17, 'uintN' has been deprecated in favor of 'unsigned'

     
  • Jin

    Jin - 2013-04-07

    The latest released version of MediaTomb only supports the older libjs (1.70 and earlier), the current git master head supports only 1.8.5, support for the older version has been dropped.

    SpiderMonkey 17 came out recently and is currently unsupported.

     
  • Anonymous - 2013-04-07

    thank you for replaying so quick. Then how can I help ?
    Please don't take my words in a bad way, it's not just criticism but I'd like to be constructive and help the project. I love this software, the way it works and it's efficiency make it one of the top.

    However, we can't rely eternally on an obsolete & unsupported library, for 5 years now. This is not serious.
    Besides, JS is the only one technology that evolves so quick, all other dependencies keep the same. Except for curl, I compiled mediatomb successfully with all the latest other libraries, including ffmpeg and ffmpegthumbnailer.
    So I'm pretty sure we won't have to rewrite everything. Obsolete JS calls only have to be updated.

    How to do that ? I'm not a C/GCC expert but, since some functions are obsolete, most of the time one just have to replace them by the new ones.

    example with uintN replaced by unsigned :

    for file in $(command grep -rl ${MODULE_SRC}/${PACKAGE}/src/*);
    do
        echo saving $file...
        cp $file $file.save
        echo patching $file...
        perl -pi -e "s#uintN#unsigned#g" $file
    done
    # gives:
    # ${MODULE_SRC}/${PACKAGE}/src/scripting/playlist_parser_script.cc
    # ${MODULE_SRC}/${PACKAGE}/src/scripting/js_functions.h
    # ${MODULE_SRC}/${PACKAGE}/src/scripting/dvd_image_import_script.cc
    # ${MODULE_SRC}/${PACKAGE}/src/scripting/js_functions.cc
    

    => compilation: successful

    example with JS_AddNamedRoot JS_ClearContextThread JS_NewScriptObject JS_RemoveRoot JS_SetContextThread :

    for func in JS_AddNamedRoot JS_ClearContextThread JS_NewScriptObject JS_RemoveRoot JS_SetContextThread;
    do
    grep -r $func ${MODULE_SRC}/${PACKAGE}/src/*
    done|grep -v save$ | sort | uniq
    # gives:
    # ${MODULE_SRC}/${PACKAGE}/src/scripting/dvd_image_import_script.cc
    # ${MODULE_SRC}/${PACKAGE}/src/scripting/import_script.cc
    # ${MODULE_SRC}/${PACKAGE}/src/scripting/playlist_parser_script.cc
    # ${MODULE_SRC}/${PACKAGE}/src/scripting/script.cc
    

    according to https://developer.mozilla.org/fr/docs/SpiderMonkey/JSAPI_Reference/JS_AddRoot :
    JS_AddNamedRoot is replaced by named JS_Add*Root

    it looks to me that it's not that complicated, don't you think ?

    If I patch the files, compil them successfuly, and luckily make it work, how can I participate to the project ? How can I post or commit patches ?
    It's under GIT, right ?
    Who will proofread my patches ?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks