Some annoying compilation issues

Report any problems with CopperSpice
Post Reply
seasoned_geek
Posts: 109
Joined: Thu Jun 11 2020 12:18 pm

Some annoying compilation issues

Post by seasoned_geek »

Some annoying compile time issues. I am compiling on various Linux platforms. Just passing along because they seem to spit up a lot. Please add to the never ending to-do list. I don't do anything with JavaScript, but that one seems like it could cause all sorts of hardship.

=====

Code: Select all

/home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.cpp: In function ‘QTJSC::JSValue QTJSC::dateProtoFuncToISOString(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, const QTJSC::ArgList&)’:
/home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.cpp:463:58: warning: ‘%02d’ directive output may be truncated writing between 2 and 11 bytes into a region of size between 0 and 16 [-Wformat-truncation=]
  463 |     snprintf(buffer, sizeof(buffer) - 1, "%04d-%02d-%02dT%02d:%02d:%02d.%03dZ", 1900 + gregorianDateTime->year, gregorianDateTime->month + 1, gregorianDateTime->monthDay, gregorianDateTime->hour, gregorianDateTime->minute, gregorianDateTime->second, static_cast<int>(fmod(thisDateObj->internalNumber(), 1000)));
      |                                                          ^~~~
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /usr/include/c++/9/ext/string_conversions.h:43,
                 from /usr/include/c++/9/bits/basic_string.h:6493,
                 from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/stdexcept:39,
                 from /usr/include/c++/9/array:39,
                 from /usr/include/c++/9/tuple:39,
                 from /usr/include/c++/9/functional:54,
                 from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/9/algorithm:71,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefPtr.h:24,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashFunctions.h:24,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTraits.h:24,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h:33,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Register.h:32,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/runtime/ArgList.h:25,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.h:26,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSWrapperObject.h:25,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateInstance.h:24,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.h:24,
                 from /home/roland/Projects/copperspice/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.cpp:24:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 25 and 85 bytes into a destination of size 27
   67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   68 |        __bos (__s), __fmt, __va_arg_pack ());
      |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

=====

Code: Select all

include/QtCore/qcoreevent.h:34:2: warning: #warning "QCoreEvent should be included before any X11 header, issue with enum Expose" [-Wcpp]

   34 | #warning "QCoreEvent should be included before any X11 header, issue with enum Expose"

      |  ^~~~~~~

[2153/3927] Building CXX object src/webkit/CMakeFiles/CsWebKit.dir/__/3rdparty/webkit/Source/WebCore/bridge/npruntime.cpp.o

In file included from include/QtCore/qcoreapplication.h:30,

                 from include/QtCore/csobject_internal.h:27,

                 from include/QtCore/qobject.h:613,

                 from include/QtCore/qiodevice.h:27,

                 from include/QtCore/qdatastream.h:29,

                 from include/QtCore/QDataStream:1,

                 from /home/roland/Projects/copperspice/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Vector.h:35,

                 from /home/roland/Projects/copperspice/src/3rdparty/webkit/Source/JavaScriptCore/wtf/BlockStack.h:30,

                 from /home/roland/Projects/copperspice/src/3rdparty/webkit/Source/JavaScriptCore/heap/HandleHeap.h:29,

                 from /home/roland/Projects/copperspice/src/3rdparty/webkit/Source/JavaScriptCore/heap/Heap.h:25,

                 from /home/roland/Projects/copperspice/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSGlobalData.h:33,

                 from /home/roland/Projects/copperspice/src/3rdparty/webkit/Source/JavaScriptCore/runtime/Identifier.h:24,

                 from /home/roland/Projects/copperspice/src/3rdparty/webkit/Source/WebCore/bridge/npruntime.cpp:36:

include/QtCore/qcoreevent.h:34:2: warning: #warning "QCoreEvent should be included before any X11 header, issue with enum Expose" [-Wcpp]

   34 | #warning "QCoreEvent should be included before any X11 header, issue with enum Expose"

      |  ^~~~~~~

=====

Code: Select all

[1357/3927] Building CXX object src/gui/CMakeFiles/CsGui.dir/text/qharfbuzz_gui.cpp.o

/home/roland/Projects/copperspice/src/gui/text/qharfbuzz_gui.cpp: In constructor ‘cs_hb_font_funcs_t::cs_hb_font_funcs_t()’:

/home/roland/Projects/copperspice/src/gui/text/qharfbuzz_gui.cpp:235:92: warning: ‘void hb_font_funcs_set_glyph_func(hb_font_funcs_t*, hb_font_get_glyph_func_t, void*, hb_destroy_func_t)’ is deprecated: Use 'hb_font_funcs_set_nominal_glyph_func or hb_font_funcs_set_variation_glyph_func' instead [-Wdeprecated-declarations]

  235 |       hb_font_funcs_set_glyph_func(funcs,               cs_font_get_glyph, nullptr, nullptr);

      |                                                                                            ^

In file included from /home/roland/Projects/copperspice/src/3rdparty/harfbuzz/src/hb.h:34,

                 from privateinclude/QtCore/private/qharfbuzz_core_p.h:28,

                 from /home/roland/Projects/copperspice/src/gui/text/qharfbuzz_gui_p.h:27,

                 from /home/roland/Projects/copperspice/src/gui/text/qharfbuzz_gui.cpp:24:

/home/roland/Projects/copperspice/src/3rdparty/harfbuzz/src/hb-deprecated.h:67:1: note: declared here

   67 | hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,

      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~



barbara
Posts: 272
Joined: Sat Apr 04 2015 2:32 am

Re: Some annoying compilation issues

Post by barbara »

Thanks for mentioning this, please know we are aware of these issues.

(1) src/3rdparty/javascriptcore

There are a number of JavaScript files in the which are part of the "third party libraries". The one you mentioned has a format issue and we have also seen zeros which should be a nullptr. We would prefer to update these files through the vendor instead of changing them directly.


(2) include/QtCore/qcoreevent.h

We have assigned this to someone on the team and they will trace through this one.


(3) qharfbuzz_gui.cpp

We are about to update the Harfbuzz library which will involve changing all of the support files.

Thanks again for your information and we will keep you updated.



Barbara

Post Reply