> > > > does usd has already been ported to OpenBSD ? it seems that this build > > assumes a Darwin option to be present (which is not and so fail). > > > > you might want to found from where the option "-Wl,-force_load" comes > > from. > > > I'm porting it. The build goes fine when I allow for separate shared libs > but that is not in accordance with how blender wants it. It expects a > single monolith library which is enabled with PXR_BUILD_MONOLITH. > > If required can this option be enabled in the ports llvm? I'll see if I can > do without it.
no. the option exists only on Darwin (MacOS). > I'm attaching the port below, if any one wants to take a look. The part > which contains that option is: thanks. I took a look at it. for others, we are speaking of https://github.com/PixarAnimationStudios/USD/ (v20.11, the latest). I looked at the commit which introduced "-force_load". it is commit 3598908bcd (https://github.com/PixarAnimationStudios/USD/commit/3598908bcd6307cb0a6ca0f78657bf4563152b33): For citing a part of the commit message: Each platform has a different way to link the entire contents of an archive library. On Linux it's "--whole-archive <lib> --no-whole-archive"; on Darwin it's "-force_load <lib>"; and on Windows it's "/WHOLEARCHIVE:<lib>". >From the CMake snippet you included, it seems that USD assumes that if the software is build with clang, it means it is Darwin, which is slightly inexact :) You should patch the CMake file to use '--whole-archive' stuff on OpenBSD (even if built with clang). If you want to upstream your changes, a generic approch should be taken, based on the OS (and not on the compiler used). For a local patch for OpenBSD port tree, it would be fine to just uses the right if-branch by removing the others (ports tree doesn't intent to be built on Windows or Darwin). But opening an issue on upstream would be fair to let's them know that BSD (or even Linux) could uses clang, and that -force_load is Darwin specific (and not clang specific). Thanks. -- Sebastien Marie