AcademySoftwareFoundation / OpenRV

Open source version of RV, the Sci-Tech award-winning media review and playback software.
Other
589 stars 144 forks source link

Cmake Error on windows10 build #5

Closed haggi closed 1 year ago

haggi commented 1 year ago

I get an cmake error in a additional packages creation. I followed the install instructions:

$ cmake -B cmake-build -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DRV_DEPS_WIN_PERL_ROOT=/c/Strawberry/perl/bin -DRV_DEPS_QT5_LOCATION=/c/Qt/5.15.2/msvc2019_64 -- Build type: Release -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044. -- Building RV for Microsoft Windows -- Using build branch: main -- Using build hash: 41eccbe -- RV_STAGE_ROOT_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app -- RV_STAGE_BIN_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/bin -- RV_STAGE_LIB_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/lib -- RV_STAGE_INCLUDE_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/include -- RV_STAGE_SRC_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/src -- RV_STAGE_RESOURCES_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/resources -- RV_STAGE_PLUGINS_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns -- RV_STAGE_PLUGINS_CONFIGFILES_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/ConfigFiles -- RV_STAGE_PLUGINS_IMAGEFORMATS_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/ImageFormats -- RV_STAGE_PLUGINS_MOVIEFORMATS_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/MovieFormats -- RV_STAGE_PLUGINS_MU_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/Mu -- RV_STAGE_PLUGINS_NODES_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/Nodes -- RV_STAGE_PLUGINS_OIIO_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/OIIO -- RV_STAGE_PLUGINS_PACKAGES_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/Packages -- RV_STAGE_PLUGINS_PROFILES_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/Profiles -- RV_STAGE_PLUGINS_PYTHON_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/Python -- RV_STAGE_PLUGINS_QT_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/Qt -- RV_STAGE_PLUGINS_SUPPORTFILES_DIR: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app/PlugIns/SupportFiles -- Updating submodules -- Copying Qt into D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app -- Copying Qt translations files ... -- Copying Qt resources files ... -- Copying Qt into D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/stage/app -- DONE -- Populating rv_deps_opentimelineio -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044. -- Configuring done -- Generating done -- Build files have been written to: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/_deps/rv_deps_opentimelineio-subbuild Microsoft (R)-Build-Engine, Version 16.11.2+f32259642 für .NET Framework Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Performing update step for 'rv_deps_opentimelineio-populate' No patch step for 'rv_deps_opentimelineio-populate' No configure step for 'rv_deps_opentimelineio-populate' No build step for 'rv_deps_opentimelineio-populate' No install step for 'rv_deps_opentimelineio-populate' No test step for 'rv_deps_opentimelineio-populate' Completed 'rv_deps_opentimelineio-populate' -- Populating rv_deps_pyside2 -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044. -- Configuring done -- Generating done -- Build files have been written to: D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/_deps/rv_deps_pyside2-subbuild Microsoft (R)-Build-Engine, Version 16.11.2+f32259642 für .NET Framework Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

Performing update step for 'rv_deps_pyside2-populate' No patch step for 'rv_deps_pyside2-populate' No configure step for 'rv_deps_pyside2-populate' No build step for 'rv_deps_pyside2-populate' No install step for 'rv_deps_pyside2-populate' No test step for 'rv_deps_pyside2-populate' Completed 'rv_deps_pyside2-populate' -- Using Boost: 1.76.0 -- Using Dav1d: 1.0.0 -- Using FFMPEG: n4.4.3 -- Using atomic_ops: 7.7.0 -- Using Imath: 3.1.5 -- Using OpenEXR: 3.1.5 -- Using Python3: 3.9.15 -- Using PySide2: 5.15.2.1 -- Using Qt5: 5.15.2 -- Using zlib: 1.2.13 CMake Error at cmake/macros/rv_stage.cmake:406 (EXECUTE_PROCESS): EXECUTE_PROCESS failed command indexes:

1: "Child return code: 1"

Call Stack (most recent call first): src/plugins/rv-packages/additional_nodes/CMakeLists.txt:11 (RV_STAGE)

-- Configuring incomplete, errors occurred! See also "D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/CMakeFiles/CMakeOutput.log".

Shayen commented 1 year ago

I think I fell into same situation. I ran command cmake --trace-expand -B cmake-build -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DRV_DEPS_WIN_PERL_ROOT=/c/Strawberry/perl/bin -DRV_DEPS_QT5_LOCATION=/e/Qt/5.15.2/msvc2019_64 in MSYS2 MINGW64 shell as described in document. Here is verbose output log

E:/projects/programming/OpenRV/cmake/macros/rv_stage.cmake(402):  IF(NOT EXISTS E:/projects/programming/OpenRV/src/plugins/rv-packages/additional_nodes/PACKAGE )
E:/projects/programming/OpenRV/cmake/macros/rv_stage.cmake(406):  EXECUTE_PROCESS(COMMAND bash -c cat PACKAGE | grep version: | grep --only-matching -e '[0-9.]*' RESULT_VARIABLE _result OUTPUT_VARIABLE _pkg_version OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY WORKING_DIRECTORY E:/projects/programming/OpenRV/src/plugins/rv-packages/additional_nodes )
grep: unrecognized option: only-matching
BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary.

Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

Search for PATTERN in FILEs (or stdin)
  -n      Add 'line_no:' prefix
  -l      Show only names of files that match
  -L      Show only names of files that don't match
  -c      Show only count of matching lines
  -o      Show only the matching part of line
  -q Quiet. Return 0 if PATTERN is found, 1 otherwise
  -v      Select non-matching lines
  -s      Suppress open and read errors
  -r      Recurse
  -i      Ignore case
  -w      Match whole words only
  -x      Match whole lines only
  -F      PATTERN is a literal (not regexp)
  -E      PATTERN is an extended regexp
  -m N    Match up to N times per file
  -A N    Print N lines of trailing context
  -B N    Print N lines of leading context
  -C N    Same as '-A N -B N'
                                                                                                                                                                                                                        -e PTRN Pattern to match
                                                                                                                                                                                                                                                        -f FILE Read pattern from file
          CMake Error at cmake/macros/rv_stage.cmake:406 (EXECUTE_PROCESS):
  EXECUTE_PROCESS failed command indexes:

    1: "Child return code: 2"

Call Stack (most recent call first):
  src/plugins/rv-packages/additional_nodes/CMakeLists.txt:11 (RV_STAGE)

-- Configuring incomplete, errors occurred!
See also "E:/projects/programming/OpenRV/cmake-build/CMakeFiles/CMakeOutput.log".

hope this could help

Shayen commented 1 year ago

Just recognize on my own log. there is BusyBox v1.29.3 (2019-01-24 07:45:07 UTC) multi-call binary. appear in the lines. and grep command look different from normal grep in MSYS2 shell.

That mean WSL is enabled on my machine (this had been told in the doc already ) You might have to disable it ENTIRELY, that mean if your machine have wsl and wsl2 installed like me, you have to remove both. then it will work.

recommend guide: https://www.elevenforum.com/t/uninstall-windows-subsystem-for-linux-wsl-in-windows-11.10802/

rogernelson commented 1 year ago

Hi @Shayen I was going to ask you the same thing. If you type which grep in the CMake shell it should tell you which it is using. You want the one from /usr/bin. You could also try listing that path in you PATH environment variable to make sure it becomes before any other grep that might be found on your machine.

Hi @haggi -- Is there any more information in the log file D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/CMakeFiles/CMakeOutput.log?

One general tip that burned me a lot building on Windows is to use a path that is short as possible. Windows has a file path limit of 260 characters, and some of the pyside paths get quite long and once that is appended on to your build root, the paths can sometimes exceed 260 characters and all sort messages about files not being found will result.

Hope that helps!

Shayen commented 1 year ago

@rogernelson I heard about disable Windows's path limit once ago. But I never try it myself. https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/The-Windows-10-default-path-length-limitation-MAX-PATH-is-256-characters.html

rogernelson commented 1 year ago

Yes, there is a workaround to the path limit, but unfortunately is it opt-in (ie off by default) and not everyone knows it needs to be enabled. The other problem is a lot of the third-party dependencies still enforce the character limit since they pre-date Windows 10.

haggi commented 1 year ago

Oh, I'm very sorry. Of course I uninstalled ubuntu for wsl but not the wsl itself. Uninstalled it and now it works better.

Am 19.01.2023 um 15:18 schrieb Roger Nelson:

Hi @Shayen https://github.com/Shayen I was going to ask you the same thing. If you type |which grep| in the CMake shell it should tell you which it is using. You want the one from |/usr/bin|. You could also try listing that path in you PATH environment variable to make sure it becomes before any other |grep| that might be found on your machine.

Hi @haggi https://github.com/haggi -- Is there any more information in the log file |D:/UserDatenHaggi/Documents/coding/OpenRV/cmake-build/CMakeFiles/CMakeOutput.log|?

One general tip that burned me a lot building on Windows is to use a path that is short as possible. Windows has a file path limit of 260 characters, and some of the pyside paths get quite long and once that is appended on to your build root, the paths can sometimes exceed 260 characters and all sort messages about files not being found will result.

Hope that helps!

— Reply to this email directly, view it on GitHub https://github.com/AcademySoftwareFoundation/OpenRV/issues/5#issuecomment-1397049875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN63XVC3URGCY7DBZZZMJDWTFEKLANCNFSM6AAAAAAUAIDEAQ. You are receiving this because you were mentioned.Message ID: @.***>

geffrak commented 1 year ago

@haggi, by "now it works better", do you mean that we can close this issue?

haggi commented 1 year ago

Indeed, this issuse can be closed.