[BUG]: pybind11 failed to build due to ImportError: DLL load failed while importing test_cmake_build on windows with MSVC ASAN
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- build-system, testing
Hướng nghiên cứu
Bắt đầu với tests/test_cmake_build/test.py và tests/test_cmake_build/subdirectory_target/CMakeLists.txt, sau đó tái hiện bản build Windows MSVC ASAN bằng các lệnh CMake và MSBuild đã được báo cáo. Công việc hoàn tất khi module test_cmake_build được import thành công và bản build của test_build_subdirectory_target hoàn tất mà không có lỗi DLL-load hoặc MSB8066.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
19a6b9f
Problem description
Hi,
pybind11 failed to build due to ImportError: DLL load failed while importing test_cmake_build on windows with MSVC ASAN. It can be reproduced on commit https://github.com/pybind/pybind11/commit/19a6b9f4efb569129c878b7f8db09132248fbaa1 on master branch. Could you please help look at this issue? Thanks in advance.
Steps to reproduce the behavior:
- git clone https://github.com/pybind/pybind11 C:\gitP\pybind\pybind11
- Open a VS2022 x64 cmd
- set CL= /fsanitize=address /GS- /wd5072 & set LINK= /InferASanLibs /incremental:no /debug
cd C:\gitP\pybind\pybind11 && mkdir build_amd64 && cd build_amd64 - python.exe -m pip install -r tests/requirements.txt
- cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DPython_EXECUTABLE=C:\Python311\python.exe ..
- msbuild /m /p:Platform=x64 /p:Configuration=Release pybind11.sln /t:Rebuild
Error Message:
17>CustomBuild:
Internal cmake changing into directory: C:/gitP/pybind/pybind11/build_amd64/tests/test_cmake_build/subdirectory_target
======== CMake output ======
Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.20348.
The CXX compiler identification is MSVC 19.41.34102.96
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
pybind11 v2.13.0 dev1
Found Python: C:\Python311\python.exe (found suitable version "3.11.4", minimum required is "3.6") found components: Interpreter Development.Module Development.Embed
Performing Test HAS_MSVC_GL_LTCG
Performing Test HAS_MSVC_GL_LTCG - Success
Configuring done (3.6s)
Generating done (0.0s)
Build files have been written to: C:/gitP/pybind/pybind11/build_amd64/tests/test_cmake_build/subdirectory_target
======== End CMake output ======
Change Dir: 'C:/gitP/pybind/pybind11/build_amd64/tests/test_cmake_build/subdirectory_target'
Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe" check_subdirectory_target.vcxproj /p:Configuration=Release /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m
MSBuild version 17.10.4+10fbfbf2e for .NET Framework
1>Checking Build System
Building Custom Rule C:/gitP/pybind/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt
17>cl : command line warning D9025: overriding '/GS' with '/GS-' [C:\gitP\pybind\pybind11\build_amd64\tests\test_cmake_build\subdirectory_target\test_subdirectory_target.vcxproj] [C:\gitP\pybind\pybind11\build_amd64\tests\test_cmake_build\test_build_subdirectory_target.vcxproj]
main.cpp
Creating library C:/gitP/pybind/pybind11/build_amd64/tests/test_cmake_build/subdirectory_target/Release/test_cmake_build.lib and object C:/gitP/pybind/pybind11/build_amd64/tests/test_cmake_build/subdirectory_target/Release/test_cmake_build.exp
test_subdirectory_target.vcxproj -> C:\gitP\pybind\pybind11\build_amd64\tests\test_cmake_build\subdirectory_target\Release\test_cmake_build.cp311-win_amd64.pyd
1>
Traceback (most recent call last):
File "C:\gitP\pybind\pybind11\tests\test_cmake_build\test.py", line 3, in <module>
import test_cmake_build
**ImportError: DLL load failed while importing test_cmake_build: The specified module could not be found.
The system cannot find the batch label specified - VCEnd**
17>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): error MSB8066: Custom build for 'C:\gitP\pybind\pybind11\build_amd64\tests\test_cmake_build\subdirectory_target\CMakeFiles\ebc2369a84847dd293a43f7c55032ecd\check_subdirectory_target.rule' exited with code 1. [C:\gitP\pybind\pybind11\build_amd64\tests\test_cmake_build\subdirectory_target\check_subdirectory_target.vcxproj] [C:\gitP\pybind\pybind11\build_amd64\tests\test_cmake_build\test_build_subdirectory_target.vcxproj]
The system cannot find the batch label specified - VCEnd
17>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): **error MSB8066: Custom build** for 'C:\gitP\pybind\pybind11\build_amd64\CMakeFiles\51bbd34823709d98a279260beab39c00\test_build_subdirectory_target.rule' exited with code 1. [C:\gitP\pybind\pybind11\build_amd64\tests\test_cmake_build\test_build_subdirectory_target.vcxproj]
17>Done Building Project "C:\gitP\pybind\pybind11\build_amd64\tests\test_cmake_build\test_build_subdirectory_target.vcxproj" (Rebuild target(s)) -- FAILED.
Steps to reproduce the behavior:
Reproducible example code
No response
Is this a regression? Put the last known working version here if it is.
Not a regression
- Ngôn ngữ chính
- C++
- Star
- 18k
- Fork
- 2.3k
- Merge trung bình
- 5 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 53
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pybind/pybind11
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 4 ngày
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
pybind/pybind11#5604 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 4 ngày
-
docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
pybind/pybind11#747 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
array_t::at() returns a misaligned reference when the stride is not a multiple of alignof(T)Có thể đã có người làm @henryiii đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của pybind/pybind11
Issue tương tự
-
[Bug] Windows Ghidra provider rejects a PATH-only JDK: bare `java.exe` probe fails with Win32 87Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
tenstorrent/tt-umd#4084 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ToffelsKater/X4_VR#34 ·
-
difficulty:easy prio:low refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NatronGitHub/openfx-supportext#220 ·
Maintainer thường phản hồi trong vòng 1 ngày