[BUILD] Windows valentina_ru_RU.qm

Issue #371 closed
David Arnold created an issue

error during build of develop branch on windows:

#!sh

xcopy /y B:\valentina\src\app\valentina\..\..\..\share\translations\valentina_ru_RU.qm \B\build-Valentina-Desktop_Qt_5_4_2_MinGW_32bit2-Release\src\app\valentina\bin\translations 
0 archivo(s) copiado(s)
No se encuentra el archivo: valentina_ru_RU.qm
Makefile:220: recipe for target 'bin/valentina.exe' failed
mingw32-make[3]: *** [bin/valentina.exe] Error 4
mingw32-make[3]: Leaving directory 'B:/build-Valentina-Desktop_Qt_5_4_2_MinGW_32bit2-Release/src/app/valentina'
mingw32-make[2]: *** [sub-valentina-make_first] Error 2
Makefile:39: recipe for target 'sub-valentina-make_first' failed
mingw32-make[2]: Leaving directory 'B:/build-Valentina-Desktop_Qt_5_4_2_MinGW_32bit2-Release/src/app'
Makefile:65: recipe for target 'sub-app-make_first' failed
mingw32-make[1]: *** [sub-app-make_first] Error 2
mingw32-make[1]: Leaving directory 'B:/build-Valentina-Desktop_Qt_5_4_2_MinGW_32bit2-Release/src'
makefile:38: recipe for target 'sub-src-make_first' failed
mingw32-make: *** [sub-src-make_first] Error 2
21:42:41: The process "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project Valentina (kit: Desktop Qt 5.4.2 MinGW 32bit2)
When executing step "Make"
21:42:42: Elapsed time: 20:42.

Comments (49)

  1. Roman Telezhynskyi repo owner

    Please, check if you have the file B:\valentina\share\translations\valentina_ru_RU.qm. If not, run qmake again.

  2. David Arnold reporter

    Intel Core i7 - 4500; I think it is a quad core... not sure, though...

    After running qmake via the Qt Creator, no such file is created.

  3. Roman Telezhynskyi repo owner

    After running qmake via the Qt Creator, no such file is created.

    They will be created after build.

    Delete the folder build-Valentina-Desktop_Qt_5_4_2_MinGW_32bit2-Release. Run qmake, rebuild whole project again. After error attache a file with whole build log.

  4. Roman Telezhynskyi repo owner

    Intel Core i7 - 4500

    You can little bit speed up compilation if will run make with key -j2.

  5. David Arnold reporter

    I'm building against the release branch, have seen that latest commits by valentina with build error fixes on windows have been made on develop, trying that out now..

  6. David Arnold reporter

    same error.

    #!c++
    
    xcopy /y B:\valentina\src\app\valentina\..\..\..\share\translations\valentina_ru_RU.qm \B\build-Valentina-Desktop_Qt_5_4_2_MinGW_32bit2-Release\src\app\valentina\bin\translations 
    

    attempts to copy a file out of the working tree into the built dir, that does not exist. In any case, the working tree should not be altered by the build process, so I guess *unless I do not illegally oversimplify(, that this file is simply missing in the branch, or wrongly referenced in some place.

  7. Roman Telezhynskyi repo owner

    Qt: Untested Windows version 10.0 detected!

    Try to use Qt 5.5. It seems has better support Windows 10.

  8. Roman Telezhynskyi repo owner

    \B\build-Valentina-Desktop_Qt_5_4_2_MinGW_32bit2-Release\src\app\valentina\bin\translations

    This is not a valid path.

  9. Roman Telezhynskyi repo owner

    xcopy /y C:\CAD\Valentina\src\app\valentina......\share\translations\valentina_ru_RU.qm C:\CAD\build-Valentina-Desktop_Qt_5_4_0_MinGW_32bit-Debug\src\app\valentina\bin\translations

    Sorry, i can't reproduce your result. On Windows XP and Windows 7 all fork fine.

  10. Roman Telezhynskyi repo owner

    Can you modify the file valentina.pro like this?

    #!qmake
    
    message(PWD path: $${PWD})          #Add this line
    message(OUT_PWD path: $${OUT_PWD})  #Add this line
    message(Qt version: $$[QT_VERSION])
    message(Qt is installed in $$[QT_INSTALL_PREFIX])
    message(Qt resources can be found in the following locations:)
    message(Documentation: $$[QT_INSTALL_DOCS])
    message(Header files: $$[QT_INSTALL_HEADERS])
    message(Libraries: $$[QT_INSTALL_LIBS])
    message(Binary files (executables): $$[QT_INSTALL_BINS])
    message(Plugins: $$[QT_INSTALL_PLUGINS])
    message(Data files: $$[QT_INSTALL_DATA])
    message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
    message(Settings: $$[QT_INSTALL_SETTINGS])
    message(Examples: $$[QT_INSTALL_EXAMPLES])
    

    I want to look what paths you will get.

    My now are:

    #!bash
    
    Project MESSAGE: PWD path: C:/CAD/Valentina/src/app/valentina
    Project MESSAGE: OUT_PWD path: C:/CAD/build-Valentina-Desktop_Qt_5_4_0_MinGW_32bit-Debug/src/app/valentina
    
  11. David Arnold reporter

    It did work ever less (or more?) with Qt 5.5 I surrender and leave this part to the experts.. :-) Feel free to close...

  12. Roman Telezhynskyi repo owner

    It did work ever less (or more?) with Qt 5.5 I surrender and leave this part to the experts.. :-) Feel free to close...

    Do you mean someone else will to try fix it for you? Or you are saying you will wait our fix?

  13. David Arnold reporter

    I'll probably wait until you release, If you need beta testers on a release candidate, I would be pleased to test... Best, David

  14. Roman Telezhynskyi repo owner

    But i also will try to repeat your problem on VirtualBox. I am downloading Windows 10 now.

  15. Roman Telezhynskyi repo owner

    Hi David,

    I can't repeat your problem. I have used Qt 5.4.2 and Windows 10 and all build and run as expected.

    But i think you have some troubles with your Qt version. Where did you get it? Because i always use build from Qt's official site.

  16. Roman Telezhynskyi repo owner

    Shouldn't it probably .ts?

    No, each time you run qmake it will generate for you QM files from TS. I don't know why this doesn't work for you. I checked on Windows 10, Windows XP, people build with Qt 5.5.0 (MSVC 2013, 32 bit) and linux and all work.

    Can you describe how you did it from the beginning? More details better.

  17. David Arnold reporter

    Ah I see, but isn't qmake supposed to not to mess with the source directory? It tries to copy it from the source directory (from the hg clone).

  18. Roman Telezhynskyi repo owner

    but isn't qmake supposed to not to mess with the source directory?

    qmake doesn't mess with source directory. Saving in repository only TS files is a common practise.

    Instead of forcing user to run:

    • lrelease Valentina.pro
    • qmake
    • make

    qmake does all work for you. But, because this is not enough, it also copies QM file into bin directory. Valentina.exe need to have predictable place with all QM files.

  19. David Arnold reporter

    Apparently, it doesn't, that's what is defined in the project:

    #!c++
    qmake.exe Valentina.pro -r -spec win32-g++
    
  20. David Arnold reporter

    Running lrelease manually gives:

    #!c++
    
    Starting external tool "C:\Qt\5.5\mingw492_32\bin\lrelease.exe" B:/valentina/Valentina.pro
    lrelease warning: Met no 'TRANSLATIONS' entry in project file 'B:/valentina/Valentina.pro'
    
    "C:\Qt\5.5\mingw492_32\bin\lrelease.exe" finished
    
  21. Roman Telezhynskyi repo owner

    Running lrelease manually gives

    You are running wrong file. :)

    #!bash
    
    # Run this script if you want release all translated string in program.
    # lrelease doesn't work with recursive *.pro file and without direct pointing to correct *.pro doesn't find anything.
    # Please run this script from folder <root_folder>/scripts. 
    lrelease -removeidentical -nounfinished ../share/translations/translations.pro
    lrelease -removeidentical -nounfinished ../share/translations/measurements.pro
    
  22. Roman Telezhynskyi repo owner

    After running qmake, where I'm supposed to find the qm files?

    First they will be in share/translations. And after success linking bin/valentina.exe in folder bin/translations.

  23. David Arnold reporter

    Spotting

    #!c++
    
    Project MESSAGE: ----------------------------------------------begin------------------------------------------------
    Project MESSAGE: Copy to /B/valentina/src/app/valentina/bin/translations after link
    Project MESSAGE: Command: xcopy /y B:\valentina\src\app\valentina\..\..\..\share\translations\valentina_ru_RU.qm \B\valentina\src\app\valentina\bin\translations
    

    I suspect the culprit beeing those lines, now:

    #!c++
    
        message("----------------------------------------------begin------------------------------------------------")
        message("Copy to" $$DDIR "after link")
        for(FILE, files) {
    
            # Replace slashes in paths with backslashes for Windows
            win32{
                FILE ~= s,/,\\,g
                DDIR ~= s,/,\\,g
            }
            QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
            message("Command:" $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR))
        }
    
        export(QMAKE_POST_LINK)
        message("----------------------------------------------end---------------------------------------------------")
    
    in the common.pri

  24. David Arnold reporter

    As you noted somewhere above \B\ is not a valid path. As I didn't know the build system I saw this directory though beeing created at B:/B/ asumed it stands for "Build" and is some intermediate directory. NoW, I fell aware, that it is a malformatted path...

  25. David Arnold reporter

    It seems that this regex is fine. If it is supposed to copy into the same directory as the source directory, then the problem is the leading "/" and the missing ":" for xcopy to work correctly.

  26. Roman Telezhynskyi repo owner

    Can you use function message() and test each variable on different stages?

    #!qmake
    
    files = $$1
    DDIR = $$2
    mkpath($$DDIR)
    
    message("DDIR" $$DDIR)
    
    message("----------------------------------------------begin------------------------------------------------")
        message("Copy to" $$DDIR "after link")
        for(FILE, files) {
    
    message("File" $$FILE)
    
            # Replace slashes in paths with backslashes for Windows
            win32{
                FILE ~= s,/,\\,g
                message("File" $$FILE)
                DDIR ~= s,/,\\,g
               message("DDIR" $$DDIR)
            }
            QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
            message("Command:" $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR))
        }
    
        export(QMAKE_POST_LINK)
        message("----------------------------------------------end---------------------------------------------------")
    
  27. David Arnold reporter
    #!c++
    
    Project MESSAGE: File B:\valentina\src\app\valentina\..\..\..\share\translations\measurements_p998_en_US.qm
    Project MESSAGE: DDIR B:\valentina\src\app\valentina\bin\translations
    Project MESSAGE: Command: xcopy /y B:\valentina\src\app\valentina\..\..\..\share\translations\measurements_p998_en_US.qm B:\valentina\src\app\valentina\bin\translations
    Project MESSAGE: ----------------------------------------------end---------------------------------------------------
    
  28. Roman Telezhynskyi repo owner

    Try to run qmake and then to delete valentina.exe. After linking make will copy files.

  29. David Arnold reporter

    QT "General MEssages" yielded the above Project MESSAGE output. QT "Compile Output" yielded again "xcopy /y B:\valentina\src\app\valentina......\share\translations\measurements_p998_fi_FI.qm \B\valentina\src\app\valentina\bin\translations "

  30. Roman Telezhynskyi repo owner

    Maybe you should try to install qt 5.5? I don't know man, this is first time i meet such a problem.

  31. David Arnold reporter

    Now building yielded "13:37:25: The process "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe" exited normally. 13:37:25: Elapsed time: 01:43."

  32. David Arnold reporter

    Trying to open B:\valentina\src\app\valentina\bin\valentina.exe reports qmuparser2.dll and vpropertyexplorer.dll missing

  33. David Arnold reporter

    jep, now i clicked on the little green "run" button and aarently a cmd opened to run some tests... I feel closer every time.. :)

  34. David Arnold reporter

    Yesss :) Thanks a lot for guidance...

    Resume:

    • I disactivated shadow build.
    • I still get this strange fodler B:\B\
    • I triggered the lrelease script manually.

    Now it is running...

  35. David Arnold reporter

    I think I identified a candidate: I had still a standalone MinGW in my path, after deleting it, things started to work. Somehow.

  36. Log in to comment