appleseed Users Forum

appleseed as a shared lib, link conflicts?


I’m currently evaluating raytracing engines for potential inclusion in a larger program (linked or runtime loaded). One worry I have is subtle load/link errors when Appleseed uses a different version of a library than the one I use in the main program. I’ve run into some very difficult bugs in the past where code in a plugin used its own allocator but a deallocator in the main program due to version conflicts.

When I look at the precompiled release, the windows Appleseed dll only seems to export its own symbols (checked with dependency walker). But on mac, each dependency has its own .so file. My tech knowledge on mac is much weaker than on windows, doesn’t this open the door for dependency hell problems? I know Appleseed is used in a lot of big projects so I feel this issue should have been solved and I’m probably missing something.

Can someone confirm that on Mac (and Linux), it’s safe to use the Appleseed shared library with other code that uses different versions of the same dependencies?

Thanks in advance,

1 Like

Hi Stefaan,

welcome to our forum!
In general, using different version of shared libraries under Linux and macOS is not safe. This is not appleseed specific but affects all libraries.

That is why the VFX Reference Platform exist for Linux, a common standard for CG related libraries to avoid exactly the conflicts you mentioned.

One thing you can do to reduce the problems is build appleseed with statically linked libraries as it is documented on our Wiki:

1 Like

Hi Stefaan!

Thanks @Mango3 for the answer.

Worth noting that in practice we are able to load the shared library version of appleseed in Maya on both Linux and macOS.

Thanks Mango3D and Franz! So the safest approach would be to build a shared appleseed library with all dependencies statically linked in, correct?

I had hoped for a less work-intensive solution, but I’ll give it a shot.