Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-72892

"cannot represent a NaN literal" while building shared lib with QtGui

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.12.0
    • Build System
    • None
    • WebAssembly

    Description

      I am experimenting with Qt for WebAssembly, which I installed as per these instructions (Qt 5.12.0, emscripten 1.38.16). The attached script produces an example with a minimal .cpp file and a related .pro file. Running it leads to warnings similar to the following:

      emcc: warning: cannot represent a NaN literal '0xc2e65e0' with custom bit pattern in NaN-canonicalizing JS engines (e.g. Firefox and Safari) without erasing bits!
      

      and errors like the following (as described here):

      error: undefined symbol: png_create_info_struct
      

      Some observations:
      1. The reason why I am using "CONFIG *= shared" is that I am not building an app, but instead using embind;

      2. The errors and warnings are related to "QT = core widgets gui": "QT = core" alone works with no errors;

      3. By performing the linking step manually I could get rid of the errors. However, the resulting .wasm is huge (8 MB+) and does not seem to work correctly.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            matpen Matteo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes