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

Dev branch wasm build error unable to find library lfreetype lpng lOpenGL lGLX

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 6.0.1
    • Build tools: qmake
    • None
    • Linux/X11, WebAssembly

    Description

      I cloned dev branch and compiled from sources under Debian:

       

      ./configure -xplatform wasm-emscripten -nomake examples  -no-warnings-are-errors -prefix $PWD/qtbase -skip qt3d
      
      
      ...
      Configure summary:Building for: wasm-emscripten (x86_64, CPU features: mmx sse sse2)
      Compiler: gcc 8.3.0
      Build options:
        Mode ................................... release
        Optimize release build for size ........ no
        Fully optimize release builds (-O3) .... no
        Building shared libraries .............. yes
        Using C standard ....................... C11
        Using C++ standard ..................... C++17
        Using ccache ........................... no
        Using new DTAGS ........................ yes
        Relocatable ............................ yes
        Using precompiled headers .............. yes
        Using LTCG ............................. no
        Target compiler supports:
          SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
          AVX .................................. AVX AVX2
          AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
          Other x86 ............................ AES F16C RDRAND SHA
          Intrinsics without -mXXX option ...... yes
        Sanitizers:
          Addresses ............................ no
          Threads .............................. no
          Memory ............................... no
          Fuzzer (instrumentation only) ........ no
          Undefined ............................ no
        Build parts ............................ libs tools
      Qt modules and options:
        Qt Concurrent .......................... yes
        Qt D-Bus ............................... yes
        Qt D-Bus directly linked to libdbus .... yes
        Qt Gui ................................. yes
        Qt Network ............................. yes
        Qt Sql ................................. yes
        Qt Testlib ............................. yes
        Qt Widgets ............................. yes
        Qt Xml ................................. yes
      Support enabled for:
        Using pkg-config ....................... yes
        udev ................................... yes
        Using system zlib ...................... yes
        Zstandard support ...................... no
      Qt Core:
        DoubleConversion ....................... yes
          Using system DoubleConversion ........ no
        GLib ................................... yes
        ICU .................................... yes
        Using system libb2 ..................... no
        Built-in copy of the MIME database ..... yes
        Tracing backend ........................ <none>
        Logging backends:
          journald ............................. no
          syslog ............................... no
          slog2 ................................ no
        PCRE2 .................................. yes
          Using system PCRE2 ................... no
        CLONE_PIDFD support in forkfd .......... yes
      Qt Sql:
        SQL item models ........................ yes
      Qt Network:
        getifaddrs() ........................... yes
        IPv6 ifname ............................ yes
        libproxy ............................... no
        Linux AF_NETLINK ....................... yes
        OpenSSL ................................ yes
          Qt directly linked to OpenSSL ........ no
        OpenSSL 1.1 ............................ yes
        DTLS ................................... yes
        OCSP-stapling .......................... yes
        SCTP ................................... no
        Use system proxies ..................... yes
        GSSAPI ................................. no
        Brotli Decompression Support ........... no
      Qt Gui:
        Accessibility .......................... yes
        FreeType ............................... yes
          Using system FreeType ................ yes
        HarfBuzz ............................... yes
          Using system HarfBuzz ................ no
        Fontconfig ............................. yes
        Image formats:
          GIF .................................. yes
          ICO .................................. yes
          JPEG ................................. yes
            Using system libjpeg ............... no
          PNG .................................. yes
            Using system libpng ................ yes
        Text formats:
          HtmlParser ........................... yes
          CssParser ............................ yes
          OdfWriter ............................ yes
          MarkdownReader ....................... yes
            Using system libmd4c ............... no
          MarkdownWriter ....................... yes
        EGL .................................... yes
        OpenVG ................................. no
        OpenGL:
          Desktop OpenGL ....................... yes
          OpenGL ES 2.0 ........................ no
          OpenGL ES 3.0 ........................ no
          OpenGL ES 3.1 ........................ no
          OpenGL ES 3.2 ........................ no
        Vulkan ................................. yes
        Session Management ..................... yes
      Features used by QPA backends:
        evdev .................................. yes
        libinput ............................... yes
        INTEGRITY HID .......................... no
        mtdev .................................. yes
        tslib .................................. no
        xkbcommon .............................. yes
        X11 specific:
          XLib ................................. yes
          XCB Xlib ............................. yes
          EGL on X11 ........................... yes
          xkbcommon-x11 ........................ yes
      QPA backends:
        DirectFB ............................... no
        EGLFS .................................. yes
        EGLFS details:
          EGLFS OpenWFD ........................ no
          EGLFS i.Mx6 .......................... no
          EGLFS i.Mx6 Wayland .................. no
          EGLFS RCAR ........................... no
          EGLFS EGLDevice ...................... yes
          EGLFS GBM ............................ no
          EGLFS VSP2 ........................... no
          EGLFS Mali ........................... no
          EGLFS Raspberry Pi ................... no
          EGLFS X11 ............................ yes
        LinuxFB ................................ yes
        VNC .................................... yes
        QNX:
          lgmon ................................ no
          IMF .................................. no
        XCB:
          Using system-provided xcb-xinput ..... yes
          Native painting (experimental) ....... no
          GL integrations:
            GLX Plugin ......................... yes
              XCB GLX .......................... yes
            EGL-X11 Plugin ..................... yes
        Windows:
          Direct 2D ............................ no
          Direct 2D 1.1 ........................ no
          DirectWrite .......................... no
          DirectWrite 3 ........................ no
      Qt Widgets:
        GTK+ ................................... yes
        Styles ................................. Fusion Windows
      Qt Testlib:
        Tester for item models ................. yes
      Qt PrintSupport:
        CUPS ................................... no
      Qt Sql Drivers:
        DB2 (IBM) .............................. no
        InterBase .............................. no
        MySql .................................. no
        OCI (Oracle) ........................... no
        ODBC ................................... no
        PostgreSQL ............................. no
        SQLite ................................. yes
          Using system provided SQLite ......... no
      Qt QML:
        QML network support .................... yes
        QML debugging and profiling support .... yes
        QML just-in-time compiler .............. yes
        QML sequence object .................... yes
        QML XML http request ................... yes
        QML Locale ............................. yes
      Qt QML Models:
        QML list model ......................... yes
        QML delegate model ..................... yes
      Qt Quick:
        AnimatedImage item ..................... yes
        Canvas item ............................ yes
        Support for Qt Quick Designer .......... yes
        Flipable item .......................... yes
        GridView item .......................... yes
        ListView item .......................... yes
        TableView item ......................... yes
        Path support ........................... yes
        PathView item .......................... yes
        Positioner items ....................... yes
        Repeater item .......................... yes
        ShaderEffect item ...................... yes
        Sprite item ............................ yes
      Qt 5 Compatibility Libraries:
        iconv .................................. no
      Qt Tools:
        Qt Assistant ........................... yes
        QDoc ................................... no
        Clang-based lupdate parser ............. no
        Qt Designer ............................ yes
        Qt Distance Field Generator ............ yes
        kmap2qmap .............................. yes
        Qt Linguist ............................ yes
        Mac Deployment Tool .................... no
        pixeltool .............................. yes
        qdbus .................................. yes
        qev .................................... yes
        Qt Attributions Scanner ................ yes
        qtdiag ................................. yes
        qtpaths ................................ yes
        qtplugininfo ........................... yes
        Windows deployment tool ................ no
      Qt Quick Templates 2:
        Hover support .......................... yes
        Multi-touch support .................... yes
      Qt Quick Controls 2:
        Styles ................................. Basic Fusion Imagine Material Universal macOS Windows
      Further Image Formats:
        JasPer ................................. no
        MNG .................................... no
        TIFF ................................... no
          Using system libtiff ................. no
        WEBP ................................... no
          Using system libwebp ................. no
      QtQuick3D:
        Assimp ................................. yes
        System Assimp .......................... no
      Qt Wayland Drivers:
        EGL .................................... yes
        Raspberry Pi ........................... no
        XComposite EGL ......................... yes
        XComposite GLX ......................... yes
        DRM EGL ................................ yes
        libhybris EGL .......................... no
        Linux dma-buf server buffer integration  yes
        Vulkan-based server buffer integration . yes
        Shm emulation server buffer integration  yes
      Qt Wayland Client Shell Integrations:
        xdg-shell .............................. yes
        wayland_client_xdg_shell_v5 ............ no
        wayland_client_xdg_shell_v6 ............ no
        ivi-shell .............................. yes
        wl-shell (deprecated) .................. yes
      Qt Wayland Client ........................ yes
      Qt Wayland Compositor .................... yes
      Qt Wayland Compositor Layer Plugins:
        VSP2 hardware layer integration ........ no
      Qt Wayland Drivers:
        EGL .................................... yes
        Raspberry Pi ........................... no
        XComposite EGL ......................... yes
        XComposite GLX ......................... yes
        DRM EGL ................................ yes
        libhybris EGL .......................... no
        Linux dma-buf server buffer integration  yes
        Vulkan-based server buffer integration . yes
        Shm emulation server buffer integration  yes
      Qt Wayland Client Shell Integrations:
        xdg-shell .............................. yes
        wayland_client_xdg_shell_v5 ............ no
        wayland_client_xdg_shell_v6 ............ no
        ivi-shell .............................. yes
        wl-shell (deprecated) .................. yes
      Qt Wayland Client ........................ yes
      Qt Wayland Compositor .................... yes
      Qt Wayland Compositor Layer Plugins:
        VSP2 hardware layer integration ........ noNote: No wayland-egl support detected. Cross-toolkit compatibility disabled.
      Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.
       Either set CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation. On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution. On macOS, you can use Homebrew's llvm package.
      WARNING: Clang-based lupdate parser will not be available. LLVM and Clang C++ libraries have not been found.Qt is now configured for building. Just run 'cmake --build . --parallel'Once everything is built, Qt is installed. You should NOT run 'cmake --install .'
      Note that this build cannot be deployed to other machines or devices.
      
       em++ --version
      emcc (Emscripten gcc/clang-like replacement) 2.0.11 (6e28e4fa4fa1bc50d58b9ddbbb9603a3cf21ea9e)
      Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
      This is free and open source software under the MIT license.
      There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

      After build I create new project with qmake (stackview) and run compile:

      ~/Project/opensource/qt/test-stackview1$ /qt5/qtbase/bin/qmake  .
      Info: creating stash file /home/user/Project/opensource/qt/test-stackview1/.qmake.stash
      Project MESSAGE: Setting PTHREAD_POOL_SIZE to 4
      Project MESSAGE: Setting TOTAL_MEMORY to 1GB
      time Project WARNING: You should use the recommended Emscripten version 1.39.8 with this Qt. You have 2.0.11 
      Project WARNING: This Qt was built with Emscripten version . You have 2.0.11. The difference may cause issues.~/Project/opensource/qt/test-stackview1$ time make -j4
      em++ -c -pipe -O2 -std=gnu++1z -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -s TOTAL_MEMORY=1GB -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/qt5/qtbase/include -I/qt5/qtbase/include/QtQuick -I/qt5/qtbase/include/QtOpenGL -I/qt5/qtbase/include/QtGui -I/qt5/qtbase/include/QtQmlModels -I/qt5/qtbase/include/QtQml -I/qt5/qtbase/include/QtNetwork -I/qt5/qtbase/include/QtCore -I. -I/home/user/.emscripten_ports/openssl/include -I/qt5/qtbase/mkspecs/wasm-emscripten -o main.o main.cpp
      /qt5/qtbase/bin/rcc -name qml qml.qrc -o qrc_qml.cpp
      sed -e s/@APPNAME@/test-stackview1/g /qt5/qtbase/mkspecs/features/wasm/../../../src/plugins/platforms/wasm/wasm_shell.html > /home/user/Project/opensource/qt/test-stackview1/test-stackview1.html
      cp -f /qt5/qtbase/mkspecs/features/wasm/../../../src/plugins/platforms/wasm/qtloader.js /home/user/Project/opensource/qt/test-stackview1
      cp -f /qt5/qtbase/mkspecs/features/wasm/../../../src/plugins/platforms/wasm/qtlogo.svg /home/user/Project/opensource/qt/test-stackview1
      em++ -c -pipe -O2 -std=gnu++1z -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -s TOTAL_MEMORY=1GB -Wall -Wextra -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/qt5/qtbase/include -I/qt5/qtbase/include/QtQuick -I/qt5/qtbase/include/QtOpenGL -I/qt5/qtbase/include/QtGui -I/qt5/qtbase/include/QtQmlModels -I/qt5/qtbase/include/QtQml -I/qt5/qtbase/include/QtNetwork -I/qt5/qtbase/include/QtCore -I. -I/home/user/.emscripten_ports/openssl/include -I/qt5/qtbase/mkspecs/wasm-emscripten -o qrc_qml.o qrc_qml.cpp
      main.cpp:6:40: warning: 'AA_EnableHighDpiScaling' is deprecated: High-DPI scaling is always enabled. This attribute no longer has any effect. [-Wdeprecated-declarations]
          QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
                                             ^
      /qt5/qtbase/include/QtCore/../../src/corelib/global/qnamespace.h:473:33: note: 'AA_EnableHighDpiScaling' has been explicitly marked deprecated here
              AA_EnableHighDpiScaling Q_DECL_ENUMERATOR_DEPRECATED_X(
                                      ^
      /qt5/qtbase/include/QtCore/../../src/corelib/global/qcompilerdetection.h:1158:45: note: expanded from macro 'Q_DECL_ENUMERATOR_DEPRECATED_X'
      #  define Q_DECL_ENUMERATOR_DEPRECATED_X(x) Q_DECL_DEPRECATED_X(x)
                                                  ^
      /qt5/qtbase/include/QtCore/../../src/corelib/global/qcompilerdetection.h:1153:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
      #  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
                                         ^
      1 warning generated.
      em++ -s WASM=1 -s FULL_ES2=1 -s FULL_ES3=1 -s USE_WEBGL2=1 -s EXIT_RUNTIME=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --bind -s FETCH=1 -O2 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -s TOTAL_MEMORY=1GB -lfreetype -lpng -o test-stackview1.js main.o qrc_qml.o   /qt5/qtbase/lib/libQt6Quick.so /qt5/qtbase/lib/libQt6OpenGL.so /qt5/qtbase/lib/libQt6Gui.so /qt5/qtbase/lib/libQt6QmlModels.so /qt5/qtbase/lib/libQt6Qml.so /qt5/qtbase/lib/libQt6Network.so /qt5/qtbase/lib/libQt6Core.so -pthread -lGLX -lOpenGL   
      wasm-ld: error: unable to find library -lfreetype
      wasm-ld: error: unable to find library -lpng
      wasm-ld: error: unable to find library -lGLX
      wasm-ld: error: unable to find library -lOpenGL
      em++: error: '/emsdk/upstream/bin/wasm-ld -o test-stackview1.wasm -lfreetype -lpng -L/emsdk/upstream/emscripten/system/local/lib main.o -L/emsdk/upstream/emscripten/system/lib qrc_qml.o -L/emsdk/upstream/emscripten/cache/wasm -lGLX -lOpenGL --whole-archive /emsdk/upstream/emscripten/cache/wasm/libembind-rtti.a /emsdk/upstream/emscripten/cache/wasm/libfetch-mt.a --no-whole-archive /emsdk/upstream/emscripten/cache/wasm/libc-mt.a /emsdk/upstream/emscripten/cache/wasm/libcompiler_rt-mt.a /emsdk/upstream/emscripten/cache/wasm/libc++-mt-noexcept.a /emsdk/upstream/emscripten/cache/wasm/libc++abi-mt-noexcept.a /emsdk/upstream/emscripten/cache/wasm/libdlmalloc-mt.a /emsdk/upstream/emscripten/cache/wasm/libc_rt_wasm.a /emsdk/upstream/emscripten/cache/wasm/libsockets-mt.a -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --allow-undefined --import-memory --shared-memory --strip-debug --export-table --export main --export stackSave --export stackRestore --export stackAlloc --export __wasm_call_ctors --export fflush --export __errno_location --export __emscripten_pthread_data_constructor --export __pthread_tsd_run_dtors --export _emscripten_call_on_thread --export _emscripten_do_dispatch_to_thread --export _emscripten_main_thread_futex --export _emscripten_thread_init --export emscripten_futex_wake --export emscripten_get_global_libc --export emscripten_main_browser_thread_id --export emscripten_main_thread_process_queued_calls --export emscripten_register_main_browser_thread_id --export emscripten_run_in_main_runtime_thread_js --export emscripten_stack_set_limits --export emscripten_sync_run_in_main_thread_2 --export emscripten_sync_run_in_main_thread_4 --export emscripten_tls_init --export pthread_self --export memalign --export malloc --export free -z stack-size=5242880 --initial-memory=1073741824 --no-entry --max-memory=1073741824 --global-base=1024' failed (1)
      make: *** [Makefile:213: test-stackview1.js] Error 1
      

       

      Attachments

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

        Activity

          People

            lpotter Lorn Potter
            homdx Homdx Homdx
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes