Librum-Reader/Librum

error during building project on windows11

1250890838 opened this issue · 4 comments

Describe the bug
I running the cmake and the result below

cmake -G "Visual Studio 16 2019" -DBUILD_TESTS=Off -DCMAKE_PREFIX_PATH=<C:\Qt\6.5.3\msvc2019_arm64> ..
-- The CXX compiler identification is MSVC 19.29.30153.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
MuPdf build command: pythonscripts/mupdfwrap.py--venv-dbuild/$<IF:$CONFIG:Debug,shared-debug,shared-release>-b-j0m01
-- Configuring done (10.0s)
-- Generating done (0.3s)

I continue and get the error below

PS C:\Users\12508\projects\Librum\build> cmake --build . --config Release
用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642
版权所有(C) Microsoft Corporation。保留所有权利。
1>Checking Build System
Building mupdf (This takes a while) ...
Traceback (most recent call last):
File "C:\Users\12508\projects\Librum\libs\mupdf\scripts\mupdfwrap.py", line 3, in
import wrap.main
File "C:\Users\12508\projects\Librum\libs\mupdf\scripts\wrap_main_.py", line 934, in
import pipcl
File "C:\Users\12508\projects\Librum\libs\mupdf\scripts\pipcl.py", line 26, in
import setuptools
ModuleNotFoundError: No module named 'setuptools'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(24
1,5): error MSB8066: “C:\Users\12508\projects\Librum\build\CMakeFiles\d556a53304f87ca3688f6d0ad3ef5b3d\mupdf.rule;C:\Us
ers\12508\projects\Librum\src\application\CMakeLists.txt”的自定义生成已退出,代码为 1。 [C:\Users\12508\projects\Librum\build\src\app
lication\mupdf.vcxproj]

Desktop (please complete the following information):

  • OS: Windows11
  • Qt6.5.3

Can you try installing setuptools via pip?

i have installed setuptools and the error is dfferent from before @DavidLazarescu

Building mupdf (This takes a while) ...
C:\Users\12508\projects\Librum\libs\mupdf\scripts\wdev.py:15: SyntaxWarning: invalid escape sequence '\P'
'''
C:\Users\12508\projects\Librum\libs\mupdf\scripts\wdev.py:104: SyntaxWarning: invalid escape sequence '\A'
vcvars = f'{directory}\VC\Auxiliary\Build\vcvars{cpu.bits}.bat'
(+0.3s): parse.py:14:: Warning, could not import clang: No module named 'clang'
(+0.5s): state.py:18:: Warning: failed to import clang.cindex: e=ModuleNotFoundError("No module named 'clang'
")
(+0.5s): state.py:18:: We need Clang Python to build MuPDF python.
(+0.5s): state.py:18:: Install with pip install libclang (typically inside a Python venv),
(+0.5s): state.py:18:: or (OpenBSD only) pkg_add py3-llvm.
(+0.5s): state.py:335:set_dir_so: Adding suffix to 'shared-release': '-x64-py3.12'
(+0.5s): --venv: main.py:2949:main2: running: "C:\Users\12508\AppData\Local\Programs\Python\Python312\python.exe"
-m venv venv-mupdfwrap-3.12-x64
(+5.7s): --venv: main.py:2949:main2: [returned e=0]
(+5.7s): --venv: main.py:2967:main2: running: venv-mupdfwrap-3.12-x64\Scripts\activate.bat && python -m pip insta
ll --upgrade pip && python -m pip install --upgrade libclang swig && python scripts/mupdfwrap.py -d build/shared-rele
ase -b -j 0 m01 && deactivate
(+6.4s): --venv: main.py:2967:main2: Requirement already satisfied: pip in c:\users\12508\projects\librum\libs\mu
pdf\venv-mupdfwrap-3.12-x64\lib\site-packages (23.2.1)
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=4, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connection
AbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/pip/[/***write encoding error
***]
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=3, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connection
AbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/pip/[/***write encoding error
***]
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=2, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connection
AbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/pip/[/***write encoding error
***]
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=1, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connectio
nAbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/pip/[/write encoding erro
r
]
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=0, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connectio
nAbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/pip/[/write encoding erro
r
]
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=4, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connectio
nAbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/libclang/[/write encoding
error
]
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=3, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connectio
nAbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/libclang/[/write encoding
error
]
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=2, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connectio
nAbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/libclang/[/write encoding
error
]
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=1, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connectio
nAbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/libclang/[/write encoding
error
]
write encoding error: --venv: main.py:2967:main2: WARNING: Retrying (Retry(total=0, connect=None,
read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connectio
nAbortedError(10053, '????????е?????????????????????????', None, 10053, None))': /simple/libclang/[/write encoding
error
]
(+25.7s): --venv: main.py:2967:main2: ERROR: Could not find a version that satisfies the requirement libclang (fr
om versions: none)
(+25.7s): --venv: main.py:2967:main2: ERROR: No matching distribution found for libclang
(+26.1s): --venv: main.py:2967:main2: [returned e=1]
Traceback (most recent call last):
scripts\mupdfwrap.py:6:(): wrap.main.main()
scripts\wrap_main_.py:3017:main(): jlib.exception_info()
^except raise:
scripts\wrap_main_.py:3015:main(): main2()
scripts\wrap_main_.py:2967:main2(): jlib.system(command, out='log', verbose=1)
scripts\jlib.py:1682:system(): raise Exception( message)
Exception: Command failed: venv-mupdfwrap-3.12-x64\Scripts\activate.bat && python -m pip install --upgrade pip && pyt
hon -m pip install --upgrade libclang swig && python scripts/mupdfwrap.py -d build/shared-release -b -j 0 m01 && deac
tivate
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(24
1,5): error MSB8066: “C:\Users\12508\projects\Librum\build\CMakeFiles\d556a53304f87ca3688f6d0ad3ef5b3d\mupdf.rule”的自定义生
成已退出,代码为 1。 [C:\Users\12508\projects\Librum\build\src\application\mupdf.vcxproj]
Automatic MOC and UIC for target domain
Auto build dll exports
domain.vcxproj -> C:\Users\12508\projects\Librum\build\domain.dll

I found that the error occurred with the latest version of python 3.12.1, and it will not happen when I switch to older version ,Finally I successfully built the project @DavidLazarescu