Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 6.7.0 statically built with llvm-mingw1706_64 has different ABI from compiler

Qt 6.7.0 statically built with llvm-mingw1706_64 has different ABI from compiler

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qt6.7.0llvm-mingwllvmabiqt6
3 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alxi11
    wrote on 16 Apr 2024, 01:28 last edited by
    #1

    I built Qt 6.7.0 statically with llvm-mingw1706_64 downloaded via Qt online installer. It works but Qt Creator reports an ABI mismatch.

    Qt version: Qt 6.7.0 llvm-mingw 64-bit Static
    ABI: x86-windows-unknown-pe-64bit

    Compiler: LLVM-MinGW 17.0.6 64-bit for C++
    ABI: x86-windows-msys-pe-64bit

    Officially provided Qt 6.7.0 llvm-mingw 64-bit version has ABI x86-windows-msys-pe-64bit, same to the compiler.

    This shouldn't be a problem and I can build with it normally. But is there a way to fix this (compile Qt to the same ABI as the official version and the compiler)?

    My configure command:

    configure.bat -opensource -confirm-license -static -static-runtime -release -opengl desktop -skip qtwebengine -nomake examples -nomake tests -Wno-dev -platform win32-clang-g++ -prefix E:\Qt\6.7.0\llvm-mingw_64_static -- -DLLVM_INSTALL_DIR=C:\libclang1706_llvm
    
    C 1 Reply Last reply 18 Apr 2024, 10:39
    0
    • A Alxi11
      16 Apr 2024, 01:28

      I built Qt 6.7.0 statically with llvm-mingw1706_64 downloaded via Qt online installer. It works but Qt Creator reports an ABI mismatch.

      Qt version: Qt 6.7.0 llvm-mingw 64-bit Static
      ABI: x86-windows-unknown-pe-64bit

      Compiler: LLVM-MinGW 17.0.6 64-bit for C++
      ABI: x86-windows-msys-pe-64bit

      Officially provided Qt 6.7.0 llvm-mingw 64-bit version has ABI x86-windows-msys-pe-64bit, same to the compiler.

      This shouldn't be a problem and I can build with it normally. But is there a way to fix this (compile Qt to the same ABI as the official version and the compiler)?

      My configure command:

      configure.bat -opensource -confirm-license -static -static-runtime -release -opengl desktop -skip qtwebengine -nomake examples -nomake tests -Wno-dev -platform win32-clang-g++ -prefix E:\Qt\6.7.0\llvm-mingw_64_static -- -DLLVM_INSTALL_DIR=C:\libclang1706_llvm
      
      C Offline
      C Offline
      cristian-adam
      wrote on 18 Apr 2024, 10:39 last edited by
      #2

      At https://bugreports.qt.io/browse/QTCREATORBUG-26247 you have an issue regarding the ABI detection and LLVM-MinGW.

      The problem is that lld-link is not inserting anything in the binary to find out that it was compiled and linked with LLVM MinGW.

      For a dynamic build of Qt Qt Creator could check to see if it links to libc++.dll, but for a static build... this way is no longer possible.

      But, you should register your Qt version with sdktool which specifies the ABI from command line. See https://codereview.qt-project.org/c/qtsdk/tqtc-qtsdk/+/547748 for my change which fixed lldb to be marked as lldb and not gdb.

      A 1 Reply Last reply 21 Apr 2024, 16:00
      1
      • C cristian-adam
        18 Apr 2024, 10:39

        At https://bugreports.qt.io/browse/QTCREATORBUG-26247 you have an issue regarding the ABI detection and LLVM-MinGW.

        The problem is that lld-link is not inserting anything in the binary to find out that it was compiled and linked with LLVM MinGW.

        For a dynamic build of Qt Qt Creator could check to see if it links to libc++.dll, but for a static build... this way is no longer possible.

        But, you should register your Qt version with sdktool which specifies the ABI from command line. See https://codereview.qt-project.org/c/qtsdk/tqtc-qtsdk/+/547748 for my change which fixed lldb to be marked as lldb and not gdb.

        A Offline
        A Offline
        Alxi11
        wrote on 21 Apr 2024, 16:00 last edited by
        #3

        @cristian-adam Thanks for the explanation. Since it works well, I'll just leave it as is.

        1 Reply Last reply
        0

        2/3

        18 Apr 2024, 10:39

        • Login

        • Login or register to search.
        2 out of 3
        • First post
          2/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved