Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Undefined reference to `qFloatToFloat16_fast' after build Qt from source



  • Hello,

    I was trying to configurate my Qt 5.14.1 version for windows by adding OpenSSL:
    configure -opensource -confirm-license -release OPENSSL_LIBS="-llibcrypto -llibssl" -openssl-linked -I "C:\Qt_new\Tools\OpenSSL\Win_x64\include" -L "C:\Qt_new\Tools\OpenSSL\Win_x64\lib"

    After that i was using mingw32-make and got the compile error:

    g++ -shared -mthreads -Wl,-subsystem,windows -Wl,--out-implib,C:/Qt_new/5.14.1/Src/qtbase/lib/libQt5Core.a -o ../../lib/Qt5Core.dll @object_script.Qt5Core -LC:/openssl/lib -LC:/Utils/my_sql/mysql-5.7.25-winx64/lib -LC:/Utils/postgresql/pgsql/lib -lmpr -luserenv .obj/Qt5Core_resource_res.o -lversion -lz C:/Qt_new/5.14.1/Src/qtbase/lib/libqtpcre2.a -LC:/openssl/lib -LC:/Utils/my_sql/mysql-5.7.25-winx64/lib -LC:/Utils/postgresql/pgsql/lib -lnetapi32 -lws2_32 -ladvapi32 -lkernel32 -lole32 -lshell32 -luuid -luser32 -lwinmm
    .obj/qfloat16.o: In function qFloatToFloat16(qfloat16*, float const*, long long)':
    C:\Qt_new\5.14.1\Src\qtbase\src\corelib/global/qfloat16.cpp:259: undefined reference to qFloatToFloat16_fast'
    .obj/qfloat16.o: In function qFloatFromFloat16(float*, qfloat16 const*, long long)':
    C:\Qt_new\5.14.1\Src\qtbase\src\corelib/global/qfloat16.cpp:275: undefined reference to qFloatFromFloat16_fast'
    collect2.exe: error: ld returned 1 exit status

    Do you have any idea what's the reason? I never compiled Qt from the source so maybe I made something wrong.

    My configuration summary:

    Running configuration tests...
    Checking for valid makespec... yes
    Checking for target architecture... x86_64
    Checking for SSE2 instructions... yes
    Checking for AES new instructions... yes
    Checking for alloca() in alloca.h... no
    Checking for alloca() in malloc.h... yes
    Checking for SSE3 instructions... yes
    Checking for SSSE3 instructions... yes
    Checking for SSE4.1 instructions... yes
    Checking for SSE4.2 instructions... yes
    Checking for AVX instructions... yes
    Checking for AVX2 instructions... yes
    Checking for AVX512 F instructions... yes
    Checking for AVX512 BW instructions... yes
    Checking for AVX512 CD instructions... yes
    Checking for AVX512 DQ instructions... yes
    Checking for AVX512 ER instructions... yes
    Checking for AVX512 IFMA instructions... yes
    Checking for AVX512 PF instructions... yes
    Checking for AVX512 VBMI instructions... yes
    Checking for AVX512 VL instructions... yes
    Checking for C++14 support... yes
    Checking for C++17 support... yes
    Checking for C99 support... yes
    Checking for C11 support... yes
    Checking for D-Bus >= 1.2... no
    Checking for F16C instructions... yes
    Checking for D-Bus >= 1.2 (host)... yes
    Checking for IncrediBuild... no
    Checking for udev... no
    Checking for POSIX fallocate()... no
    Checking for precompiled header support... yes
    Checking for RDRAND instruction... yes
    Checking for SHA new instructions... yes
    Checking for Signaling NaN for doubles... yes
    Checking for STL compatibility... yes
    Checking for zlib... yes
    Checking for Intrinsics without -mXXX argument... yes
    Checking for Zstandard... no
    Checking for C++11 <future>... yes
    Checking for eventfd... no
    Checking for inotify... no
    Checking for PCRE2... no
    Checking for slog2... no
    Checking for 64 bit atomics... yes
    Checking for DoubleConversion... no
    Checking for O_CLOEXEC... no
    Checking for advapi32... yes
    Checking for gdi32... yes
    Checking for kernel32... yes
    Checking for netapi32... yes
    Checking for ole32... yes
    Checking for shell32... yes
    Checking for uuid... yes
    Checking for user32... yes
    Checking for winmm... yes
    Checking for ws2_32... yes
    Checking for C++11 <random>... yes
    Checking for working std::atomic for function pointers... yes
    Checking for OpenSSL... yes
    Checking for DTLS support in OpenSSL... yes
    Checking for getifaddrs()... no
    Checking for IPv6 ifname... no
    Checking for Network List Manager... no
    Checking for OpenSSL 1.1 support... yes
    Checking for OCSP stapling support in OpenSSL... yes
    Checking for xkbcommon >= 0.5.0... no
    Checking for OpenGL ES 2.0... no
    Checking for DirectX GUID... yes
    Checking for Direct3D Shader Compiler...
    Checking for DirectX GI... yes
    Checking for Direct3D 11... yes
    Checking for Direct2D 1... yes
    Checking for Direct2D 1.1... yes
    Checking for DirectX GI 1.2... yes
    Checking for Direct3D 11.1... yes
    Checking for Direct3D 9... yes
    Checking for DirectWrite... yes
    Checking for DirectWrite 1... yes
    Checking for DirectWrite 2... yes
    Checking for KMS... no
    Checking for EGL... no
    Checking for evdev... no
    Checking for FreeType... no
    Checking for GBM... no
    Checking for LinuxFB... no
    Checking for mtdev... no
    Checking for OpenVG... no
    Checking for default QPA platform... windows
    Checking for libjpeg... no
    Checking for libpng... no
    Checking for libmd4c... no
    Checking for tslib... no
    Checking for Vulkan... no
    Checking for XLib... no
    Checking for uxtheme.h... yes
    Checking for CUPS... no
    Checking for DB2 (IBM)... no
    Checking for InterBase... no
    Checking for MySQL... no
    Checking for OCI (Oracle)... no
    Checking for ODBC... yes
    Checking for PostgreSQL... no
    Checking for SQLite (version 2)... no
    Checking for TDS (Sybase)... no
    Checking for ntddmodm... yes
    Checking for 64bit pointers... yes
    Checking for Direct3D 12... no
    Checking for Assimp... no
    Checking for SDL2... no
    Checking for Assimp... no
    Checking for Autodesk FBX... no
    Checking for Wayland EGL library... no
    Checking for BlueZ... no
    Checking for WinRT Bluetooth API... no
    Checking for sensorfw... no
    Checking for Gypsy... no
    Checking for WinRT Geolocation API... no
    Checking for DirectShow... yes
    Checking for evr.h... yes
    Checking for GStreamer 1.0... no
    Checking for GStreamer 0.10... no
    Checking for OpenAL... no
    Checking for libresourceqt5... no
    Checking for Windows Audio Services... no
    Checking for WMF... no
    Checking for wmsdk.h... no
    Checking for WShellItem... yes
    Checking for Flite... no
    Checking for libclang... no
    Checking for architecture supported... yes
    Checking for bison... yes
    Checking for python2...
    Checking for flex... yes
    Checking for gperf... yes
    Checking for jumbo build merge limit... 0
    Checking for platform supported... Qt WebEngine on Windows requires MSVC or Clang (MSVC mode).
    Checking for build path without whitespace... yes
    Checking for submodule initialized... yes
    Checking for d-bus... no
    Checking for fontconfig... no
    Checking for libdrm... no
    Checking for system ninja... no
    Checking for xcomposite... no
    Checking for xcursor... no
    Checking for xi... no
    Checking for xtst... no
    Checking for 64bit compiler... yes
    Checking for winversion... no
    Done running configuration tests.


  • Lifetime Qt Champion

    Hi,

    Not a direct answer but why do you want to rebuild Qt with OpenSSL ? The support is already built in by dynamically loading the OpenSSL dlls. You just have to explicitly provide OpenSSL with your application.



  • Hi @SGaist and thank you for response.

    Actualy I want to build QtOpcUa and the last release from branch 5.14.1 is requiring OpenSSL. Mingw cant find OpenSSL toolkit in compile time and I was wondering if there is some additional steps to do.

    Then I found this article https://doc.qt.io/qt-5/ssl.html and there is an information to reconfigurate qt with --openssl.


  • Lifetime Qt Champion

    Did you install OpenSSL on your machine ?



  • I was downloading them via Qt Maintenance tool.


  • Lifetime Qt Champion

    I just realized something: there's no need to rebuild all of Qt ! Just build the module you want using the Qt version you already installed.


Log in to reply