This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch AOO42X in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 7a4fcd539866a8278e8ab381e588c14450294c18 Author: Jim Jagielski <[email protected]> AuthorDate: Thu Jun 11 16:52:24 2026 -0400 coinmp: link sub-libraries explicitly on macOS (fixes arm64 link) On Apple Silicon the CoinMP build fails linking libOsi.dylib: Undefined symbols for architecture arm64: "CoinFinite(double)", ... (and many more CoinUtils symbols) ld: symbol(s) not found for architecture arm64 The objects are correctly arm64; the problem is that each CoinMP sub- library (Osi, Clp, Cgl, Cbc, CoinMP) is built as a .dylib that references symbols defined in a sibling library (CoinUtils, ...) without listing that sibling on its link line. On Linux those undefined symbols resolve at load time, but macOS's two-level namespace rejects them at link time. CoinMP's bundled 2013-era libtool papers over this on Darwin with '-undefined dynamic_lookup', but only for MACOSX_DEPLOYMENT_TARGET=10.x; the version case falls through for 11.0+ (our Apple Silicon baseline), leaving allow_undefined_flag empty. Rather than re-add the dynamic_lookup hack, pass --enable-dependency-linking (macOS only) so configure adds the inter-library dependencies ($COINUTILS_LIBS etc.) to each library's LIBADD and sets -no-undefined -- the correct, namespace-clean fix. Verified by a full local arm64 build at MACOSX_DEPLOYMENT_TARGET=11.0: libOsi/libOsiClp/.../libCoinMP all link, and otool -L shows libOsi now records libCoinUtils as an explicit dependency. --- ext_libraries/coinmp/makefile.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ext_libraries/coinmp/makefile.mk b/ext_libraries/coinmp/makefile.mk index 32189f1a4f..197557d254 100644 --- a/ext_libraries/coinmp/makefile.mk +++ b/ext_libraries/coinmp/makefile.mk @@ -56,6 +56,17 @@ BUILD_ACTION=$(COMPATH)$/vcpackages$/vcbuild.exe -useenv CoinMP\\MSVisualStudio\ CONFIGURE_ACTION=./configure #CONFIGURE_FLAGS=--disable-pkg-config --disable-bzlib --disable-zlib CC='$(CC) $(ARCH_FLAGS)' CXX='$(CXX) $(ARCH_FLAGS)' CFLAGS='$(ARCH_FLAGS) -Wc,-arch -Wc,i386' CPPFLAGS='$(ARCH_FLAGS)' LDFLAGS='$(ARCH_FLAGS)' compiler_flags='$(ARCH_FLAGS)' CONFIGURE_FLAGS=--disable-pkg-config --with-blas=BUILD --with-lapack=BUILD --disable-bzlib --disable-zlib CC='$(CC) $(ARCH_FLAGS)' CXX='$(CXX) $(ARCH_FLAGS)' +.IF "$(OS)"=="MACOSX" +# Each CoinMP sub-library (Osi, Clp, ...) depends on symbols from its siblings +# (CoinUtils, ...). CoinMP's bundled 2013-era libtool only adds the Darwin +# "-undefined dynamic_lookup" escape hatch for MACOSX_DEPLOYMENT_TARGET=10.x; +# at 11.0+ (Apple Silicon baseline) that case falls through, leaving the flag +# empty, so each .dylib is linked with unresolved sibling symbols and the +# two-level-namespace linker rejects it ("symbol(s) not found for arm64"). +# --enable-dependency-linking makes the inter-library dependencies explicit on +# each link line (and sets -no-undefined), which is the correct fix. +CONFIGURE_FLAGS+=--enable-dependency-linking +.ENDIF #BUILD_ACTION= CC="$(CC) $(ARCH_FLAGS)" CPP="$(CXX) $(ARCH_FLAGS)" $(GNUMAKE) -j8 BUILD_ACTION= $(GNUMAKE) -j$(MAXPROCESS) .ENDIF
