Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. lupdate never stop
Forum Updated to NodeBB v4.3 + New Features

lupdate never stop

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 2.3k Views 1 Watching
  • 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.
  • thamT Offline
    thamT Offline
    tham
    wrote on last edited by
    #1

    Run lupdate after 1 hour yet it do not stop, keep running. Not sure what is happend, I run the lupdate from QtCreator following advices from stackoverflow.

    This solution works well on the example come with QtCreator("hellotr").

    My steps

    1. add TRANSLATIONS = english_to_turkish.ts in .pro
    2. Run lupdate from QtCreator

    The output show in General Messages(QtCreator)

    Starting external tool "qt_path\Qt\5.9.4\msvc2017_64\bin\translate.bat" project_path/client.pro
    
    C:\Users\yyyy\programs\Qt\3rdLibs\Qt\5.9.4\msvc2017_64\bin>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"   & lupdate.exe project_path/client.pro"
    

    After that, lupdate keep running in the background, more than 90 minutes now, this is unusual, do anyone know how to debug?Thanks

    The project size, qml + c++ codes, I believe is less than 100000 lines.

    sierdzioS 1 Reply Last reply
    0
    • thamT tham

      Run lupdate after 1 hour yet it do not stop, keep running. Not sure what is happend, I run the lupdate from QtCreator following advices from stackoverflow.

      This solution works well on the example come with QtCreator("hellotr").

      My steps

      1. add TRANSLATIONS = english_to_turkish.ts in .pro
      2. Run lupdate from QtCreator

      The output show in General Messages(QtCreator)

      Starting external tool "qt_path\Qt\5.9.4\msvc2017_64\bin\translate.bat" project_path/client.pro
      
      C:\Users\yyyy\programs\Qt\3rdLibs\Qt\5.9.4\msvc2017_64\bin>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"   & lupdate.exe project_path/client.pro"
      

      After that, lupdate keep running in the background, more than 90 minutes now, this is unusual, do anyone know how to debug?Thanks

      The project size, qml + c++ codes, I believe is less than 100000 lines.

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @tham said in lupdate never stop:

      After that, lupdate keep running in the background, more than 90 minutes now, this is unusual, do anyone know how to debug?Thanks

      If lupdate takes longer than a few seconds it means it hung. You can kill the process. Even for a huge project, don't wait longer than a minute.

      Debug: unfortunately it'll be some trial-and-error. Some recommendations:

      • if you have any #include in the middle of your file - move it to the beginning. lupdate has very weak parser and it's easily fooled
      • do not run lupdate on external code (third party libraries)
      • if you can, try turning lupdate off for some parts of your project to pinpoint where it is starting to hang

      (Z(:^

      thamT 1 Reply Last reply
      4
      • sierdzioS sierdzio

        @tham said in lupdate never stop:

        After that, lupdate keep running in the background, more than 90 minutes now, this is unusual, do anyone know how to debug?Thanks

        If lupdate takes longer than a few seconds it means it hung. You can kill the process. Even for a huge project, don't wait longer than a minute.

        Debug: unfortunately it'll be some trial-and-error. Some recommendations:

        • if you have any #include in the middle of your file - move it to the beginning. lupdate has very weak parser and it's easily fooled
        • do not run lupdate on external code (third party libraries)
        • if you can, try turning lupdate off for some parts of your project to pinpoint where it is starting to hang
        thamT Offline
        thamT Offline
        tham
        wrote on last edited by
        #3

        @sierdzio said in lupdate never stop:

        if you can, try turning lupdate off for some parts of your project to pinpoint where it is starting to hang

        I think the problem is caused by 3rd party libraries like boost, opencv and others, is it possible to ask lupdate ignore some include path or header files except of comment out them manually from the .pro? Thanks

        sierdzioS 1 Reply Last reply
        0
        • thamT tham

          @sierdzio said in lupdate never stop:

          if you can, try turning lupdate off for some parts of your project to pinpoint where it is starting to hang

          I think the problem is caused by 3rd party libraries like boost, opencv and others, is it possible to ask lupdate ignore some include path or header files except of comment out them manually from the .pro? Thanks

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @tham said in lupdate never stop:

          @sierdzio said in lupdate never stop:

          if you can, try turning lupdate off for some parts of your project to pinpoint where it is starting to hang

          I think the problem is caused by 3rd party libraries like boost, opencv and others, is it possible to ask lupdate ignore some include path or header files except of comment out them manually from the .pro? Thanks

          Try adding these paths to TR_EXCLUDE in your .pro:

          TR_EXCLUDE += $$PWD/some/dir/*
          

          (Z(:^

          thamT 1 Reply Last reply
          4
          • sierdzioS sierdzio

            @tham said in lupdate never stop:

            @sierdzio said in lupdate never stop:

            if you can, try turning lupdate off for some parts of your project to pinpoint where it is starting to hang

            I think the problem is caused by 3rd party libraries like boost, opencv and others, is it possible to ask lupdate ignore some include path or header files except of comment out them manually from the .pro? Thanks

            Try adding these paths to TR_EXCLUDE in your .pro:

            TR_EXCLUDE += $$PWD/some/dir/*
            
            thamT Offline
            thamT Offline
            tham
            wrote on last edited by
            #5

            @sierdzio Tried TR_EXCLUDE, but do not work, maybe my qmake is too old(v5.9.4)?

            sierdzioS 1 Reply Last reply
            0
            • thamT tham

              @sierdzio Tried TR_EXCLUDE, but do not work, maybe my qmake is too old(v5.9.4)?

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              @tham said in lupdate never stop:

              @sierdzio Tried TR_EXCLUDE, but do not work, maybe my qmake is too old(v5.9.4)?

              Hm, no, that should be OK.

              An alternative and more cumbersome solution (more a workaround, really) - try separating your third party libs into a separate .pri, keep your code in a separate .pro as well - then run lupdate on your pro so that it won't pick up external includes.

              Or, as a last resort, I think lupdate can be run on a file list instead of a .pro file - that's the most tedious way but it also gives you full control over what is parsed.

              (Z(:^

              1 Reply Last reply
              1

              • Login

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