Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle duktape as external project #66

Open
scheibel opened this issue Feb 5, 2023 · 2 comments
Open

Handle duktape as external project #66

scheibel opened this issue Feb 5, 2023 · 2 comments

Comments

@scheibel
Copy link
Member

scheibel commented Feb 5, 2023

No description provided.

@sbusch42
Copy link
Member

sbusch42 commented Feb 5, 2023

Do we have a general concept for handling external dependencies (cmake's ExternalProject, or Conan, or ...)? Depending on system packages for external C++ dependencies is also not very nice ... But guessing from the titel, you are talking about using ExternalProject?

@scheibel
Copy link
Member Author

scheibel commented Feb 5, 2023

I thought about a similar approach we applied to the externalization of googletest / googlemock (effective as of cginternals/cmake-init@0571c02).
For those projects, an external setup by means of pkg-config was already established and we integrate them by being discoverable through find_package.

If we don't find something similar for duktape, I suggest we propose a change to the duktape project or fork from it.

Advantages:

  • Access to up-to-date duktape versions
  • No cluttering of our own sources

Disdavantages:

  • Another project to set up
  • If duktape does not come with a cmake-friendly environment, the implicit updates are not available

Ultimately, I'm also fine with leaving duktape as is, but the latest stack trace re-triggered this issue:

[ 34%] Building C object source/cppexpose/CMakeFiles/cppexpose.dir/source/scripting/duktape-1.4.0/duktape.c.o
cc1: warning: command-line option ‘-Wreorder’ is valid for C++/ObjC++ but not for C
duk_api_codec.c: In function ‘duk__base64_encode_helper’:
duk_api_codec.c:57:2: warning: switch missing default case [-Wswitch-default]
duk_bi_duktape.c: In function ‘duk_bi_duktape_object_info’:
duk_bi_duktape.c:57:2: warning: switch missing default case [-Wswitch-default]
duk_bi_json.c: In function ‘duk__enc_value1’:
duk_bi_json.c:2039:4: warning: switch missing default case [-Wswitch-default]
duk_js_compiler.c: In function ‘duk__expr_nud’:
duk_js_compiler.c:3269:2: warning: switch missing default case [-Wswitch-default]
duk_js_compiler.c: In function ‘duk__ispec_toregconst_raw’:
duk_js_compiler.c:1968:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
duk_js_compiler.c:2081:2: note: here
duk_js_executor.c: In function ‘duk__js_execute_bytecode_inner’:
duk_heap_stringtable.c:962:33: warning: ‘%lu’ directive output may be truncated writing between 1 and 20 bytes into a region of size 11 [-Wformat-truncation=]
duk_heap_stringtable.c:962:33: note: directive argument in the range [0, 18446744073709551614]
In file included from /usr/include/stdio.h:894,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duk_config.h:664,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duktape.h:126,
                 from duk_internal.h:26:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 2 and 21 bytes into a destination of size 11
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
duk_bi_date.c: In function ‘duk_bi_date_prototype_tostring_shared’:
duk_bi_date.c:984:39: warning: ‘%02d’ directive output may be truncated writing 2 bytes into a region of size between 0 and 4 [-Wformat-truncation=]
duk_bi_date.c:984:39: note: directive argument in the range [0, 59]
In file included from /usr/include/stdio.h:894,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duk_config.h:664,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duktape.h:126,
                 from duk_internal.h:26:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 7 and 11 bytes into a destination of size 8
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
duk_bi_date.c:981:39: warning: ‘%02d’ directive output may be truncated writing 2 bytes into a region of size between 0 and 4 [-Wformat-truncation=]
duk_bi_date.c:981:39: note: directive argument in the range [0, 59]
In file included from /usr/include/stdio.h:894,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duk_config.h:664,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duktape.h:126,
                 from duk_internal.h:26:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 7 and 11 bytes into a destination of size 8
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
duk_hobject_props.c: In function ‘duk__realloc_props’:
duk_heap_stringtable.c:962:33: warning: ‘%lu’ directive output may be truncated writing between 1 and 20 bytes into a region of size 11 [-Wformat-truncation=]
duk_heap_stringtable.c:962:33: note: directive argument in the range [0, 18446744073709551614]
In file included from /usr/include/stdio.h:894,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duk_config.h:664,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duktape.h:126,
                 from duk_internal.h:26:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 2 and 21 bytes into a destination of size 11
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~
duk_hobject_enum.c: In function ‘duk_hobject_enumerator_create’:
duk_heap_stringtable.c:962:33: warning: ‘%lu’ directive output may be truncated writing between 1 and 20 bytes into a region of size 11 [-Wformat-truncation=]
duk_heap_stringtable.c:962:33: note: directive argument in the range [0, 18446744073709551614]
In file included from /usr/include/stdio.h:894,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duk_config.h:664,
                 from /home/scheibel/github.com/cginternals/cppexpose/source/cppexpose/source/scripting/duktape-1.4.0/duktape.h:126,
                 from duk_internal.h:26:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 2 and 21 bytes into a destination of size 11
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   72 |                                    __glibc_objsize (__s), __fmt,
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   73 |                                    __va_arg_pack ());
      |                                    ~~~~~~~~~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants