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

Set asmjit to be linked statically on Windows #481

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Microno95
Copy link

Description

Fixes the issue of loading mitsuba in python on Windows when loading separate modules that depend on a different version of asmjit. Windows does not support loading of multiple versions of a shared library within one process.

Fixes #411

asmjit is statically compiled whenever mitsuba is compiled under Windows.

Testing

Tested that both pytorch and mitsuba can now be imported simultaneously in python on Windows, specifically python 3.8 with pytorch==1.9.0.

Code successfully compiles for all non-double and non-polarized modes on Windows and Ubuntu 20.04. I am unable to compile double modes regardless of the changes in this PR hence I could not test them.

Checklist:

  • My code follows the style guidelines of this project
  • My changes generate no new warnings
  • My code also compiles for gpu_* and packet_* variants. If you can't test this, please leave below
  • I have commented my code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I cleaned the commit history and removed any "Merge" commits
  • I give permission that the Mitsuba 2 project may redistribute my contributions under the terms of its license

Notes:

All but 171 tests passed on Ubuntu, many of the errors were one of the following:

  • [Sampler] Assertion "m_sample_index < (m_sample_count / m_samples_per_wavefront)" failed in...
  • TypeError: unsupported operand type(s) for &: 'enoki.dynamic.Vector3m' and 'enoki.scalar.Vector3m'
  • Error while loading "<string>" (near line 1, col 1): could not instantiate shape plugin of type "ply"

Similar failures in Windows. Of note, the test in src/samplers/tests/test_orthogonal.py::test02_orthogonal_wavefront gave the error Windows fatal exception: stack overflow.

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.

Can't import mitsuba in a conda environment with openexr installed [🐛 bug report]
1 participant