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

bump cibuildwheel action to v2.17.0 #7672

Open
wants to merge 4 commits into
base: RC_2_0
Choose a base branch
from
Open

bump cibuildwheel action to v2.17.0 #7672

wants to merge 4 commits into from

Conversation

arvidn
Copy link
Owner

@arvidn arvidn commented May 11, 2024

No description provided.

@xavier2k6
Copy link
Contributor

@arvidn try using Boost 1.82.0 instead.

@arvidn
Copy link
Owner Author

arvidn commented May 11, 2024

it looks like there's some progress. Now the failure is a rename that happens after the build, here.

rename build\lib.win-amd64-cpython-37\libtorrent.cp37-win_amd64.pyd -> build\lib.win-amd64-cpython-37\libtorrent\__init__.cp37-win_amd64.pyd
error: [WinError 2] The system cannot find the file specified: 'build\\lib.win-amd64-cpython-37\\libtorrent.cp37-win_amd64.pyd' -> 'build\\lib.win-amd64-cpython-37\\libtorrent\\__init__.cp37-win_amd64.pyd'

@xavier2k6
Copy link
Contributor

It should make no difference to error but just as an FYI v2.18.0 of cibuildwheel action has been released.

@qstokkink
Copy link

Thanks for picking this up! I'd like to see this fixed, so I'll support to the best of my ability.

[Click me for analysis]

If I'm interpreting the log correctly, this is the "rename" log entry just before failure:

log.info("rename %s -> %s", src, dst)

I assume the following os.rename(src, dst) is the cause of the crash.

On the other builds this succeeds. For example, Mac:

common.copy /Users/runner/work/libtorrent/libtorrent/bindings/python/build/lib.macosx-10.9-x86_64-cpython-37/libtorrent.cpython-37m-darwin.so
    ...updated 276 targets...
    rename build/lib.macosx-10.9-x86_64-cpython-37/libtorrent.cpython-37m-darwin.so -> build/lib.macosx-10.9-x86_64-cpython-37/libtorrent/__init__.cpython-37m-darwin.so

However, on Windows, build\lib.win-amd64-cpython-37\libtorrent.pyd is apparently created instead of the expected build\lib.win-amd64-cpython-37\libtorrent.cp37-win_amd64.pyd:

common.copy D:\a\libtorrent\libtorrent\bindings\python\build\lib.win-amd64-cpython-37\libtorrent.pyd
    bin\msvc-14.3\rls\adrs-mdl-64\cxstd-14-iso\pythn-3.7\libtorrent.pyd
            1 file(s) copied.
    ...updated 266 targets...
    rename build\lib.win-amd64-cpython-37\libtorrent.cp37-win_amd64.pyd -> build\lib.win-amd64-cpython-37\libtorrent\__init__.cp37-win_amd64.pyd

As I see it, you could remedy this by either changing the setup.py output-detection logic or the build logic that creates the output in the first place (probably in the jamfile).

@qstokkink
Copy link

@arvidn if you want some help and you don't mind me hammering your GitHub Actions builds for a bit, I can try getting the action (back) up and running. Just let me know and I'll pick this up.

@qstokkink
Copy link

qstokkink commented Jun 4, 2024

According to the following line, the EXT_SUFFIX is empty on Windows. I'm not 100% sure but that might be causing the failure.

2024-05-11T16:35:18.8519849Z   using python : 3.7 : "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ffbtcev5\\cp37-win_amd64\\build\\venv\\Scripts\\python.exe" : "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ffbtcev5\\cp37-win_amd64\\build\\venv\\include" "C:\\Users\\runneradmin\\AppData\\Local\\pypa\\cibuildwheel\\Cache\\nuget-cpython\\python.3.7.9\\tools\\include" "C:\\Users\\runneradmin\\AppData\\Local\\pypa\\cibuildwheel\\Cache\\nuget-cpython\\python.3.7.9\\tools\\Include" : "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ffbtcev5\\cp37-win_amd64\\build\\venv\\libs" : <libtorrent-python>on : "" ;

I think this may be due to #7649 switching from distutils.sysconfig.get_config_var("EXT_SUFFIX") to sysconfig.get_config_var("EXT_SUFFIX"). The former contains a workaround specific to Python 3.7 for Windows (see here). If this is the case, then you need to add in a workaround for sys.version_info < (3, 10) and platform.system() == 'Windows' in your setup.py to set the EXT_SUFFIX to _imp.extension_suffixes()[0] for that specific platform.

@arvidn
Copy link
Owner Author

arvidn commented Jun 8, 2024

the next issue:

+ bash -c "cd 'D:\a\libtorrent\libtorrent/bindings/python' && python test.py"
  Error: Command bash -c "cd 'D:\a\libtorrent\libtorrent/bindings/python' && python test.py" failed with code 2816. None

@arvidn
Copy link
Owner Author

arvidn commented Jun 8, 2024

exit code 2816, according to this means:

The EventMapping table refers to an invalid control [4] on dialog [2] for the event [3]

Possibly some issue related to the program running in a console, without a GUI.

the other python test fails with exit code 0xC0000005, which is ACCESS VIOLATION

@xavier2k6
Copy link
Contributor

exit code 2813

@arvidn Where did you see this?

#7672 (comment) shows 2816

The EventMapping table refers to an invalid control [4] on dialog [2] for the event [3]

@arvidn
Copy link
Owner Author

arvidn commented Jun 8, 2024

@qstokkink
Copy link

Almost there 🎉 I think 2816 is simply a segfault (11) in disguise due to bash running on Windows (for reasons explained here).

It would be easier to debug if we could check out the .whl that was produced. Could you skip the test command and share the wheel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants