I downloaded the LO 7.1.2 SDK and attempted to build several of the DevelopersGuide examples on macOS Big Sur 11.2.3. The Java examples seemed to build and run fine. But when I try to build and run the ProfUnoLifetime.runexe C++ example, I get this error:
Hematite:Lifetime chucko$ make ProfUnoLifetime.runexe
mkdir -p /Users/chucko/bin/LibreOffice7.1_SDK/MACOSXexample.out/misc
rm -f /Users/chucko/bin/LibreOffice7.1_SDK/MACOSXexample.out/misc/oosdk_cpp_types.flag
“/opt/LibreOffice/SDK/LibreOffice7.1_SDK/bin/cppumaker” -Gc -O/Users/chucko/bin/LibreOffice7.1_SDK/MACOSXexample.out/inc “/Applications/LibreOffice.app/Contents/Resources/ure/share/misc/types.rdb” “/Applications/LibreOffice.app/Contents/MacOS/…/Resources/types/offapi.rdb”
dyld: Library not loaded: @VIA_LIBRARY_PATH/libunoidllo.dylib
Referenced from: /opt/LibreOffice/SDK/LibreOffice7.1_SDK/bin/cppumaker
Reason: unsafe use of relative rpath @VIA_LIBRARY_PATH/libunoidllo.dylib in /opt/LibreOffice/SDK/LibreOffice7.1_SDK/bin/cppumaker with restricted binary
make: *** [/Users/chucko/bin/LibreOffice7.1_SDK/MACOSXexample.out/misc/oosdk_cpp_types.flag] Abort trap: 6
Hematite:Lifetime chucko$
At first I thought this was an environment issue; the setsdkenv_unix script was setting DYLD_LIBRARY_PATH, but the subshell it spawned didn’t inherit that variable. So I explicitly set it myself. But the problem didn’t change.
I tried to fix the references to the libraries with install_name_tool, but it warned me that this would invalidate the code signature.
I can’t see a way to fix this myself with Apple’s security policies in place, except maybe by building LO and the SDK from source.
It seems of the executables in the LibreOffice7.1_SDK/bin directory, cppumaker, idlc, javamaker, uno-skeletonmaker, and unoidl-check all refer to libraries in the library path. That suggests it will be impossible to do anything with Uno IDL on macOS.
Does anyone have a way around this problem? (Other than switching to Linux, that is.)