Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Windows 11, Build failed on PySide2 Compilations #353

Closed
1 task done
AlsonEntuna opened this issue Jan 4, 2024 · 6 comments
Closed
1 task done

[Bug]: Windows 11, Build failed on PySide2 Compilations #353

AlsonEntuna opened this issue Jan 4, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@AlsonEntuna
Copy link

AlsonEntuna commented Jan 4, 2024

What happened?

So I followed the steps in compiling for Windows but I came across 4 errors which somehow is related to pyside2

List all the operating systems versions where this is happening

Windows 11

On what computer hardware is this happening?

Windows 11, 64bit
VS2022 & VS2019 (tried both compiling)

Relevant console log output

Build FAILED.

       "D:\Projects\VS\OpenRV\_build\main_executable.vcxproj" (default target) (1) ->
       "D:\Projects\VS\OpenRV\_build\src\bin\apps\rv\rv.vcxproj" (default target) (3) ->
       "D:\Projects\VS\OpenRV\_build\cmake\dependencies\dependencies.vcxproj" (default target) (15) ->
       "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_OPENSSL-stage-target.vcxproj" (default target) (136) ->
       (CustomBuild target) ->
         C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(2
       54,5): warning MSB8065: Custom build for item "D:\Projects\VS\OpenRV\_build\CMakeFiles\cc1d8d8435c2b7833fbb05c2f2
       a33fd4\crypto.1.1.dll.rule" succeeded, but specified output "d:\projects\vs\openrv\_build\stage\app\lib\crypto.1.
       1.dll" has not been created. This may cause incremental build to work incorrectly. [D:\Projects\VS\OpenRV\_build\
       cmake\dependencies\RV_DEPS_OPENSSL-stage-target.vcxproj]
         C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(2
       54,5): warning MSB8065: Custom build for item "D:\Projects\VS\OpenRV\_build\CMakeFiles\cc1d8d8435c2b7833fbb05c2f2
       a33fd4\crypto.1.1.dll.rule" succeeded, but specified output "d:\projects\vs\openrv\_build\stage\app\lib\ssl.1.1.d
       ll" has not been created. This may cause incremental build to work incorrectly. [D:\Projects\VS\OpenRV\_build\cma
       ke\dependencies\RV_DEPS_OPENSSL-stage-target.vcxproj]


       "D:\Projects\VS\OpenRV\_build\main_executable.vcxproj" (default target) (1) ->
       "D:\Projects\VS\OpenRV\_build\src\bin\apps\rv\rv.vcxproj" (default target) (3) ->
       "D:\Projects\VS\OpenRV\_build\cmake\dependencies\dependencies.vcxproj" (default target) (15) ->
       "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj" (default target) (138) ->
         CUSTOMBUILD : CMake warning :  [D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vc
       xproj]
         qt.shiboken: (concurrent) D:\Projects\VS\OpenRV\_build\_deps\rv_deps_pyside2-src\sources\pyside2\PySide2\QtConc
       urrent\typesystem_concurrent.xml(57,86): warning G41DF139B: 1 attributes(s) unused on <typedef-type>: disable-wra
       pper="yes" [D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj]
         qt.shiboken: (concurrent) D:\Projects\VS\OpenRV\_build\_deps\rv_deps_pyside2-src\sources\pyside2\PySide2\QtConc
       urrent\typesystem_concurrent.xml(61,92): warning G41DF139B: 1 attributes(s) unused on <typedef-type>: disable-wra
       pper="yes" [D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj]
         D:\Projects\VS\OpenRV\_build\_deps\rv_deps_pyside2-src\sources\pyside2\PySide2\QtQml\pysideqmlregistertype.cpp(
       465): warning C4273: 'QtQml_VolatileBoolTypeF': inconsistent dll linkage [D:\Projects\VS\OpenRV\_build\cmake\depe
       ndencies\RV_DEPS_PYTHON3-stage-target.vcxproj]


       "D:\Projects\VS\OpenRV\_build\main_executable.vcxproj" (default target) (1) ->
       "D:\Projects\VS\OpenRV\_build\src\bin\apps\rv\rv.vcxproj" (default target) (3) ->
       "D:\Projects\VS\OpenRV\_build\cmake\dependencies\dependencies.vcxproj" (default target) (15) ->
       "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj" (default target) (138) ->
       (CustomBuild target) ->
         CUSTOMBUILD : ignored error :  [D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vc
       xproj]
         D:\Projects\VS\OpenRV\_build\_deps\rv_deps_pyside2-src\pyside3_build\py3.10-qt5.15.2-64bit-release\pyside2\PySi
       de2\QtDataVisualization\PySide2\QtDataVisualization\qtdatavisualization_qheightmapsurfacedataproxy_wrapper.cpp :
       fatal error C1083: Cannot open compiler generated file: '': Invalid argument [D:\Projects\VS\OpenRV\_build\cmake\
       dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj]
         CUSTOMBUILD : error : Error compiling pyside2 [D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-
       stage-target.vcxproj]
         C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(2
       54,5): error MSB8066: Custom build for 'D:\Projects\VS\OpenRV\_build\CMakeFiles\2e4c5a476537ee1709252e07cd9955e6\
       RV_DEPS_PYSIDE2-build-flag.rule;D:\Projects\VS\OpenRV\_build\CMakeFiles\6c6c892cb34ac7c4a4b334a35febdacf\python31
       0.dll.rule;D:\Projects\VS\OpenRV\_build\CMakeFiles\81efeb73ca415b97ff0a28f897c29732\RV_DEPS_PYTHON3-stage-target.
       rule' exited with code 1. [D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj]

    6 Warning(s)
    4 Error(s)

Environment variables

No response

Extra information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@AlsonEntuna AlsonEntuna added the bug Something isn't working label Jan 4, 2024
@AlsonEntuna
Copy link
Author

so, I tried to compile the Python3 deps using this command rvbuildt RV_DEPS_PYTHON3 and I get this log which says it successfully built it but when I do rvbuild then I get pyside2 errors

`alson@Alson-ASUS MINGW64 /d/Projects/VS/OpenRV
$ rvbuildt RV_DEPS_PYTHON3
Change Dir: 'D:/Projects/VS/OpenRV/_build'

Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe" cmake/dependencies/RV_DEPS_PYTHON3.vcxproj /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=17.0 /m:12 /v:n
MSBuild version 17.8.3+195e7f5a3 for .NET Framework
Build started 04/01/2024 16:54:58.

 1>Project "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3.vcxproj" on node 1 (default targets).
 1>Project "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3.vcxproj" (1) is building "D:\Projects\VS\OpenRV\_build\ZERO_CHECK.vcxproj" (2) on node 1 (de
   fault targets).
 2>PrepareForBuild:
     Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
   InitializeBuildStatus:
     Creating "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
     Touching "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
   PreBuildEvent:
     Checking File Globs
     setlocal
     C:\msys64\mingw64\bin\cmake.exe -P D:/Projects/VS/OpenRV/_build/CMakeFiles/VerifyGlobs.cmake
     if %errorlevel% neq 0 goto :cmEnd
     :cmEnd
     endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
     :cmErrorLevel
     exit /b %1
     :cmDone
     if %errorlevel% neq 0 goto :VCEnd
     :VCEnd
   CustomBuild:
     All outputs are up-to-date.
   FinalizeBuildStatus:
     Deleting file "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
     Touching "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
 2>Done Building Project "D:\Projects\VS\OpenRV\_build\ZERO_CHECK.vcxproj" (default targets).
 1>Project "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3.vcxproj" (1) is building "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_OPENSSL.vc
   xproj" (3) on node 2 (default targets).
 3>PrepareForBuild:
     Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
   InitializeBuildStatus:
     Creating "x64\Release\RV_DEPS_OPENSSL\RV_DEPS_OPENSSL.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
     Touching "x64\Release\RV_DEPS_OPENSSL\RV_DEPS_OPENSSL.tlog\unsuccessfulbuild".
   PostBuildEvent:
     Renaming the openssl import libs to the name FFmpeg is expecting
     setlocal
     C:\msys64\mingw64\bin\cmake.exe -E copy D:/Projects/VS/OpenRV/_build/RV_DEPS_OPENSSL/install/lib/libssl.lib D:/Projects/VS/OpenRV/_build/RV_DEPS_OPENSSL/install/li
     b/ssl.lib
     if %errorlevel% neq 0 goto :cmEnd
     C:\msys64\mingw64\bin\cmake.exe -E copy D:/Projects/VS/OpenRV/_build/RV_DEPS_OPENSSL/install/lib/libcrypto.lib D:/Projects/VS/OpenRV/_build/RV_DEPS_OPENSSL/install
     /lib/crypto.lib
     if %errorlevel% neq 0 goto :cmEnd
     :cmEnd
     endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
     :cmErrorLevel
     exit /b %1
     :cmDone
     if %errorlevel% neq 0 goto :VCEnd
     :VCEnd
   FinalizeBuildStatus:
     Deleting file "x64\Release\RV_DEPS_OPENSSL\RV_DEPS_OPENSSL.tlog\unsuccessfulbuild".
     Touching "x64\Release\RV_DEPS_OPENSSL\RV_DEPS_OPENSSL.tlog\RV_DEPS_OPENSSL.lastbuildstate".
 3>Done Building Project "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_OPENSSL.vcxproj" (default targets).
 1>PrepareForBuild:
     Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
   InitializeBuildStatus:
     Creating "x64\Release\RV_DEPS_PYTHON3\RV_DEPS_PYTHON3.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
     Touching "x64\Release\RV_DEPS_PYTHON3\RV_DEPS_PYTHON3.tlog\unsuccessfulbuild".
   FinalizeBuildStatus:
     Deleting file "x64\Release\RV_DEPS_PYTHON3\RV_DEPS_PYTHON3.tlog\unsuccessfulbuild".
     Touching "x64\Release\RV_DEPS_PYTHON3\RV_DEPS_PYTHON3.tlog\RV_DEPS_PYTHON3.lastbuildstate".
 1>Done Building Project "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3.vcxproj" (default targets).

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:01.28
`

@AlsonEntuna
Copy link
Author

I tried compiling the RV_DEPS_PYTHON3 project manually and still get the issue from pyside 2

       "D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj" (default target) (1) ->
       (CustomBuild target) ->
         CUSTOMBUILD : ignored error :  [D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj]
         D:\Projects\VS\OpenRV\_build\_deps\rv_deps_pyside2-src\pyside3_build\py3.10-qt5.15.2-64bit-release\pyside2\PySide2\QtDataVisualization\PySide2\QtDataVisualization\
       qtdatavisualization_qheightmapsurfacedataproxy_wrapper.cpp : fatal error C1083: Cannot open compiler generated file: '': Invalid argument [D:\Projects\VS\OpenRV\_bui
       ld\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj]
         CUSTOMBUILD : error : Error compiling pyside2 [D:\Projects\VS\OpenRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj]
         C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'D:\Projects\
       VS\OpenRV\_build\CMakeFiles\2e4c5a476537ee1709252e07cd9955e6\RV_DEPS_PYSIDE2-build-flag.rule;D:\Projects\VS\OpenRV\_build\CMakeFiles\6c6c892cb34ac7c4a4b334a35febdacf
       \python310.dll.rule;D:\Projects\VS\OpenRV\_build\CMakeFiles\81efeb73ca415b97ff0a28f897c29732\RV_DEPS_PYTHON3-stage-target.rule' exited with code 1. [D:\Projects\VS\O
       penRV\_build\cmake\dependencies\RV_DEPS_PYTHON3-stage-target.vcxproj]

@ZhongLingXiao
Copy link

Hi @AlsonEntuna
I also encountered the same issue here. May I ask how you resolved the problem?
企业微信截图_17052982859484(1)

@AlsonEntuna
Copy link
Author

@ZhongLingXiao here's the link: #355
I've discussed this and also added my solutions. Hope this helps!

@ZhongLingXiao
Copy link

ZhongLingXiao commented Jan 16, 2024

I am still encountering this issue.

When I execute the make_pyside.py file and import py7zr in util.py using the line from py7zr import SevenZipFile, exceptions, it triggers a segmentation fault.

After install dependency using pacman:

pacman -Sy --needed \
        mingw-w64-x86_64-autotools \
        mingw-w64-x86_64-cmake \
        mingw-w64-x86_64-cmake-cmcldeps \
        mingw-w64-x86_64-glew \
        mingw-w64-x86_64-libarchive \
        mingw-w64-x86_64-make \
        mingw-w64-x86_64-meson \
        mingw-w64-x86_64-python-pip \
        mingw-w64-x86_64-python-psutil \
        mingw-w64-x86_64-toolchain \
        autoconf  \
        automake \
        bison \
        flex \
        git \
        libtool \
        nasm \
        p7zip \
        patch \
        unzip \
        zip

my python version is python:3.11.7.

This might be an issue, so I will ask about it in the Issues section. Thank you for your help.

@mingvfx
Copy link

mingvfx commented Mar 8, 2024

我仍然遇到这个问题。

当我执行make_pyside.py文件并util.py使用 from 行导入 py7zr 时py7zr import SevenZipFile, exceptions,它会触发分段错误。

使用 pacman 安装依赖项后:

pacman -Sy --needed \
        mingw-w64-x86_64-autotools \
        mingw-w64-x86_64-cmake \
        mingw-w64-x86_64-cmake-cmcldeps \
        mingw-w64-x86_64-glew \
        mingw-w64-x86_64-libarchive \
        mingw-w64-x86_64-make \
        mingw-w64-x86_64-meson \
        mingw-w64-x86_64-python-pip \
        mingw-w64-x86_64-python-psutil \
        mingw-w64-x86_64-toolchain \
        autoconf  \
        automake \
        bison \
        flex \
        git \
        libtool \
        nasm \
        p7zip \
        patch \
        unzip \
        zip

我的Python版本是python:3.11.7.

这可能是一个问题,所以我会在问题部分询问它。感谢您的帮助。

have you solver this error , i have the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants