Set asmjit to be linked statically on Windows #481
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andmitsuba
can now be imported simultaneously in python on Windows, specifically python 3.8 withpytorch==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:
gpu_*
andpacket_*
variants. If you can't test this, please leave belowNotes:
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 errorWindows fatal exception: stack overflow
.