uxlfoundation/oneTBB

Loading tbb12.dll fails if its dependencies are located in `LOAD_LIBRARY_SEARCH_USER_DIRS` directories

Opened this issue · 1 comments

Summary

I am building python module dependent in tbb, and when packing it I pack libraries into special folder. When importing module dll load fails (on loading msvc140.dll if it is not in common location but it user specified dll search path (it worked in oneTBB 2021.11.0)).

Version

oneTBB 2021.13.0

Environment

Windows 11
python 3.11
MSVC

Observed Behavior

Library does not load

Expected Behavior

Library loads

Steps To Reproduce

Please have a look at related issue adang1345/delvewheel#49

There are several important steps to see the problem:

  1. One should repair dll using https://pypi.org/project/delvewheel/ or any other similar tool (it is important not to load dependencies from system locations)
  2. Dependencies and tbb12 should be located in user added dll search path (not system one)
  3. Load tbb12.dll

It turned out that while loading tbb12.dll it changes system dlls search path and cannot find msvc140.dll that in my case located right near tbb12.dll

I think the reason is v2021.11.0...v2021.13.0#diff-01fb64c473f1e70ed71d0d37e62daa12d13f2bd487df508e550a80f8ead82f9bR38 this change. But is it expected to affect dependencies?

Fedr commented

The issue appears since #1330