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

Run build on Python 3.8 #357

Closed
wants to merge 1 commit into from
Closed

Run build on Python 3.8 #357

wants to merge 1 commit into from

Conversation

lkollar
Copy link
Contributor

@lkollar lkollar commented Nov 6, 2019

Enable Travis and AppVeyor builds on 3.8.

.travis.yml Show resolved Hide resolved
@lkollar
Copy link
Contributor Author

lkollar commented Nov 7, 2019

Looks like the windows build is blocked by appveyor/ci#3142.

@romainthomas
Copy link
Member

Yep. I'll wait for the support before merging. Thanks, though.

@hugovk
Copy link

hugovk commented Nov 9, 2019

🚀 Python 3.8 is now available on AppVeyor:

@romainthomas
Copy link
Member

Nice! Waiting for appveyor and I'll merge

@lkollar
Copy link
Contributor Author

lkollar commented Nov 10, 2019

The Python tests are failing on Windows:

2474  C:\projects\lief\build\temp.win32-3.8\Release\tests\elf>C:/Python38/python.exe C:/projects/lief/tests/elf/elf_test.py 
2475CUSTOMBUILD : Fatal Python error : _PyInterpreterState_Get(): no current thread state [C:\projects\lief\build\temp.win32-3.8\Release\tests\check-lief.vcxproj]
2476  Python runtime state: initialized
2477  
2478  Current thread 0x00000418 (most recent call first):
2479    File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed
2480    File "<frozen importlib._bootstrap_external>", line 1101 in create_module
2481    File "<frozen importlib._bootstrap>", line 556 in module_from_spec
2482    File "<frozen importlib._bootstrap>", line 657 in _load_unlocked
2483    File "<frozen importlib._bootstrap>", line 975 in _find_and_load_unlocked
2484    File "<frozen importlib._bootstrap>", line 991 in _find_and_load
2485    File "C:/projects/lief/tests/elf/elf_test.py", line 3 in <module>
2486  
2487          Start 182: ELF_PYTHON_add_section
2488

The two messages contradict each other: "_PyInterpreterState_Get(): no current thread state", then the fault handler reports "Python runtime state: initialized". This could happen if there were multiple copies of the interpreter state present.

On Python 3.8 extensions shouldn't be linked to libpython anymore. I'm not sure how this affects Windows but I wonder if it is possible that LIEF links with libpython3.8 on Windows and this causes duplicate symbols (like the global thread state).

@lkollar
Copy link
Contributor Author

lkollar commented Nov 10, 2019

I tried modifying the CMake configuration to avoid linking with libpython, but it didn't help. I don't use Windows so I'm pretty lost trying to debug this... Any tips are welcome.

I'll be away for a week so I won't be able to work on this for a while.

@romainthomas
Copy link
Member

Same for me, I don't work on windows. Btw, I started to update the version of Pybind11 (v2.4.3). I still need to fix some issues related to enums.

@lkollar lkollar closed this Nov 11, 2019
@lkollar lkollar reopened this Nov 11, 2019
@romainthomas
Copy link
Member

Commit 934d84f updates the Pybind11 version (cc @wisk)

Enable Travis and AppVeyor builds on 3.8.
@lkollar
Copy link
Contributor Author

lkollar commented Nov 19, 2019

I rebased the branch on top of the latest master but the Windows build is still failing of Python 3.8.

@romainthomas
Copy link
Member

I merged the the PR in commits 5f865a8 and 42ee417. I keep Python 3.8 disabled on AppVeyor while there is this error.

@lkollar
Copy link
Contributor Author

lkollar commented Nov 23, 2019

Great, thanks @romainthomas!

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.

3 participants