Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. pyside6-deploy Failed unexpectedly in Scons C backend compilation ????

pyside6-deploy Failed unexpectedly in Scons C backend compilation ????

Scheduled Pinned Locked Moved Unsolved Qt for Python
pythonqt for pythonpyside
4 Posts 3 Posters 367 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.
  • Y Offline
    Y Offline
    yoja
    wrote on 22 Jan 2025, 22:17 last edited by
    #1

    I have been working with pyside6 and qml. but unfortunately I can't deploy the application. I have started a new project but the error continues. Does anyone know how to fix it?:
    main.py

    import sys
    from PySide6.QtCore import QCoreApplication
    from PySide6.QtGui import QGuiApplication
    from PySide6.QtQml import QQmlApplicationEngine
    
    if __name__ == "__main__":
        #creating the app
        app = QGuiApplication([])
        engine = QQmlApplicationEngine()
        
    
        #load the qml
        engine.load("Main.qml")
    
    
        if not engine.rootObjects():
                print("Failed to load main.qml:")
                exit(1)
    
        app.exec()
    

    Main.qml

    import QtQuick 2.15
    import QtQuick.Controls 2.15
    
    
    ApplicationWindow {
        id:appWindow
        visible: true
        width: 370
        height: 370
        maximumHeight: height
        maximumWidth: width
        minimumHeight: height
        minimumWidth: width
        title: "My App"
    
    }
    

    nuitka-crash-report

    <?xml version='1.0' encoding='utf8'?>
    <nuitka-compilation-report nuitka_version="2.4.8" nuitka_commercial_version="not installed" completion="error exit message (1)" exit_message="Failed unexpectedly in Scons C backend compilation.">
      <scons_error_reports>
        <scons_error_report>
          <command>clang -o "/home/simbad/qtProyects/testPyqt/deployment/main.dist/main.bin" -z noexecstack -Xlinker -export-dynamic -rdynamic -Wl,-R,'$ORIGIN' -Wl,--disable-new-dtags @"./@link_input.txt" -L/usr/lib -ldl -lm "/usr/lib/python3.10/config-3.10-x86_64-linux-gnu/libpython3.10-pic.a" -lz -lm -lutil -lpthread -lexpat</command>
          <stderr>
    /usr/bin/ld: ./__constants.o: in function `_createGlobalConstants':__constants.c:(.text+0x90): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: __constants.c:(.text+0xc2): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: __constants.c:(.text+0xfa): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __constants.c:(.text+0x180): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __constants.c:(.text+0x1b8): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __constants.c:(.text+0x208): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __constants.c:(.text+0x24a): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: ./__constants.o:__constants.c:(.text+0x2a6): more undefined references to `__ubsan_handle_type_mismatch_v1' follow/usr/bin/ld: ./__constants.o: in function `_createGlobalConstants':__constants.c:(.text+0xa43): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: ./__loader.o: in function `setupMetaPathBasedLoader':__loader.c:(.text+0x30): undefined reference to `__ubsan_handle_load_invalid_value'/usr/bin/ld: ./__loader.o: in function `_loadBytesCodesBlob':__loader.c:(.text+0xa0): undefined reference to `__ubsan_handle_load_invalid_value'/usr/bin/ld: ./__loader.o: in function `copyFrozenModulesTo':__loader.c:(.text+0x133): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x163): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x1a2): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x1d2): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x211): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: ./__loader.o:__loader.c:(.text+0x249): more undefined references to `__ubsan_handle_type_mismatch_v1' follow/usr/bin/ld: ./__loader.o: in function `copyFrozenModulesTo':__loader.c:(.text+0x273): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: __loader.c:(.text+0x2b6): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x2f5): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x32d): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x36c): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x3a4): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: ./__loader.o:__loader.c:(.text+0x3e1): more undefined references to `__ubsan_handle_type_mismatch_v1' follow/usr/bin/ld: ./module.PySide6-postLoad.o: in function `modulecode_PySide6$$45$postLoad':module.PySide6-postLoad.c:(.text+0x62): undefined reference to `__ubsan_handle_load_invalid_value'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0xb4): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0xe9): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0x136): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0x165): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0x1a6): undefined 
    

    thanks a lot.

    J 1 Reply Last reply 23 Jan 2025, 08:50
    0
    • Y yoja
      22 Jan 2025, 22:17

      I have been working with pyside6 and qml. but unfortunately I can't deploy the application. I have started a new project but the error continues. Does anyone know how to fix it?:
      main.py

      import sys
      from PySide6.QtCore import QCoreApplication
      from PySide6.QtGui import QGuiApplication
      from PySide6.QtQml import QQmlApplicationEngine
      
      if __name__ == "__main__":
          #creating the app
          app = QGuiApplication([])
          engine = QQmlApplicationEngine()
          
      
          #load the qml
          engine.load("Main.qml")
      
      
          if not engine.rootObjects():
                  print("Failed to load main.qml:")
                  exit(1)
      
          app.exec()
      

      Main.qml

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      
      
      ApplicationWindow {
          id:appWindow
          visible: true
          width: 370
          height: 370
          maximumHeight: height
          maximumWidth: width
          minimumHeight: height
          minimumWidth: width
          title: "My App"
      
      }
      

      nuitka-crash-report

      <?xml version='1.0' encoding='utf8'?>
      <nuitka-compilation-report nuitka_version="2.4.8" nuitka_commercial_version="not installed" completion="error exit message (1)" exit_message="Failed unexpectedly in Scons C backend compilation.">
        <scons_error_reports>
          <scons_error_report>
            <command>clang -o "/home/simbad/qtProyects/testPyqt/deployment/main.dist/main.bin" -z noexecstack -Xlinker -export-dynamic -rdynamic -Wl,-R,'$ORIGIN' -Wl,--disable-new-dtags @"./@link_input.txt" -L/usr/lib -ldl -lm "/usr/lib/python3.10/config-3.10-x86_64-linux-gnu/libpython3.10-pic.a" -lz -lm -lutil -lpthread -lexpat</command>
            <stderr>
      /usr/bin/ld: ./__constants.o: in function `_createGlobalConstants':__constants.c:(.text+0x90): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: __constants.c:(.text+0xc2): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: __constants.c:(.text+0xfa): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __constants.c:(.text+0x180): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __constants.c:(.text+0x1b8): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __constants.c:(.text+0x208): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __constants.c:(.text+0x24a): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: ./__constants.o:__constants.c:(.text+0x2a6): more undefined references to `__ubsan_handle_type_mismatch_v1' follow/usr/bin/ld: ./__constants.o: in function `_createGlobalConstants':__constants.c:(.text+0xa43): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: ./__loader.o: in function `setupMetaPathBasedLoader':__loader.c:(.text+0x30): undefined reference to `__ubsan_handle_load_invalid_value'/usr/bin/ld: ./__loader.o: in function `_loadBytesCodesBlob':__loader.c:(.text+0xa0): undefined reference to `__ubsan_handle_load_invalid_value'/usr/bin/ld: ./__loader.o: in function `copyFrozenModulesTo':__loader.c:(.text+0x133): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x163): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x1a2): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x1d2): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x211): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: ./__loader.o:__loader.c:(.text+0x249): more undefined references to `__ubsan_handle_type_mismatch_v1' follow/usr/bin/ld: ./__loader.o: in function `copyFrozenModulesTo':__loader.c:(.text+0x273): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: __loader.c:(.text+0x2b6): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x2f5): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x32d): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x36c): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: __loader.c:(.text+0x3a4): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: ./__loader.o:__loader.c:(.text+0x3e1): more undefined references to `__ubsan_handle_type_mismatch_v1' follow/usr/bin/ld: ./module.PySide6-postLoad.o: in function `modulecode_PySide6$$45$postLoad':module.PySide6-postLoad.c:(.text+0x62): undefined reference to `__ubsan_handle_load_invalid_value'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0xb4): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0xe9): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0x136): undefined reference to `__ubsan_handle_out_of_bounds'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0x165): undefined reference to `__ubsan_handle_type_mismatch_v1'/usr/bin/ld: module.PySide6-postLoad.c:(.text+0x1a6): undefined 
      

      thanks a lot.

      J Offline
      J Offline
      JonB
      wrote on 23 Jan 2025, 08:50 last edited by
      #2

      @yoja
      I know no more than this: Googling for your missing symbols suggests you may need to pass some -fsanitize=... option(s) to your compilation/link command.

      Y 1 Reply Last reply 24 Jan 2025, 16:20
      0
      • J JonB
        23 Jan 2025, 08:50

        @yoja
        I know no more than this: Googling for your missing symbols suggests you may need to pass some -fsanitize=... option(s) to your compilation/link command.

        Y Offline
        Y Offline
        yoja
        wrote on 24 Jan 2025, 16:20 last edited by
        #3

        @JonB
        I finally managed to generate an executable using cx_Freeze. Then by copying the directory that contains the .qml files in the same dir of the executable, I made the application run without problems.
        Soon I will continue using pyside6-deploy in the way you suggest. Thank you so much

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mjiggidyj
          wrote on 25 Jan 2025, 06:21 last edited by
          #4

          Out of curiosity, have you tried building this with "pure" nuitka (not via pyside6-deploy)? I have completely given up on pyside6-deploy, but never really have any problems with nuitka for any platform.

          1 Reply Last reply
          0

          3/4

          24 Jan 2025, 16:20

          • Login

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