aardvark-platform / aardvark.base

Aardvark.Base is the foundation of the open-source Aardvark Platform for visual computing, real-time graphics, and visualization.
https://aardvarkians.com/
Apache License 2.0
153 stars 9 forks source link

Native dependency unpacking not robust when switching architecture #81

Closed haraldsteinlechner closed 2 months ago

haraldsteinlechner commented 8 months ago

This is a corner-case when different processor architectures are used in the same system (which is not that of a rare case on apple silicon macs). Native dependency unpacking will unpack the current architecture, the next run will skip unpacking since the target library is already there leading to dlopen failures when switching between architectures (which can happen accidentally). See: https://github.com/aardvark-platform/aardvark.base/blob/89e5d12cd53ec713bba05887008abf704d316544/src/Aardvark.Base/Introspection/Introspection.cs#L1389

My suggestion is to add the architecture to the directory name (as opposed to just the library name). Does somebody see problems with this approach?