Guidance needed to port duktape js library
  • Just looking around
    gevik
    Posts: 16 from 2022/11/29
    Hi,

    I would like to port this JS library to work on MorphOS. Where should I normally start?
    I have tried to compile it using the cross toolchain with no result!

    Any guidance is very much appreciated.

    https://duktape.org/index.html

    Thanks.
  • »17.12.22 - 20:44
    Profile Visit Website
  • Moderator
    Kronos
    Posts: 2119 from 2003/2/24
    Telling us what kind of error messages you get when (not) compiling might be a good idea....
  • »17.12.22 - 20:54
    Profile
  • Just looking around
    gevik
    Posts: 16 from 2022/11/29
    It does not find the following function. It might be a POSIX thing or something missing in the cross platform toolchain.

    Code:

    implicit declaration of function ‘strptime’; did you mean ‘strftime’?


    and later on when linking:


    Code:
    duktape.c:(.text+0x13a40): undefined reference to `strptime'



    Quote:

    Kronos wrote:
    Telling us what kind of error messages you get when (not) compiling might be a good idea....
  • »17.12.22 - 22:27
    Profile Visit Website
  • MorphOS Developer
    cyfm
    Posts: 509 from 2003/4/11
    From: Germany
    It seems that strptime() is currently not available in the libnix support library, you should probably create a stub function for now which returns NULL for a failed conversion. This way it won't stop you from testing other aspects of the port until a solution for the missing function is found.
  • »17.12.22 - 23:46
    Profile Visit Website
  • Just looking around
    gevik
    Posts: 16 from 2022/11/29
    Thanks for your reply. Is it this library?

    https://github.com/bebbo/libnix


    Quote:

    cyfm wrote:
    It seems that strptime() is currently not available in the libnix support library, you should probably create a stub function for now which returns NULL for a failed conversion. This way it won't stop you from testing other aspects of the port until a solution for the missing function is found.

  • »18.12.22 - 10:58
    Profile Visit Website
  • MorphOS Developer
    cyfm
    Posts: 509 from 2003/4/11
    From: Germany
    Quote:

    gevik schrieb:
    Thanks for your reply. Is it this library?

    https://github.com/bebbo/libnix




    yea, it is definitely based around that, even though the one you refer to and the MorphOS version are different branches of the original code.
  • »18.12.22 - 13:29
    Profile Visit Website
  • Just looking around
    gevik
    Posts: 16 from 2022/11/29
    Should the libnix be in the sdk-sources? Or it is somewhere else?
  • »18.12.22 - 20:37
    Profile Visit Website
  • MorphOS Developer
    cyfm
    Posts: 509 from 2003/4/11
    From: Germany
    Quote:

    gevik schrieb:
    Should the libnix be in the sdk-sources? Or it is somewhere else?


    SDK-Sources only contains source archives that need to get released according to its related licenses.
    So you won't find it in there.
    It's arguable if it would be better if the libnix linklib was open sourced but well, MorphOS is mostly closed source as-is and this is unlikely to change for various reasons which I don't plan to discuss here and would be off-topic anyway.
  • »19.12.22 - 09:17
    Profile Visit Website