tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Please help testing/debugging math/openblas (and variants) on Darwin



Dear all,

I recently upgraded the math/openblas* packages to 0.3.31. I got one
report from Adam that this breaks the Darwin build. This was the error:

clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: -lto_library library filename must be 'libLTO.dylib'
ld: -lto_library library filename must be 'libLTO.dylib'
gmake[1]: *** [Makefile:450: test_bgemv] Error 1
gmake[1]: *** Waiting for unfinished jobs....
f951: note: unrecognized command-line option '-Wno-incompatible-function-pointer-types' may have been intended to silence earlier diagnostics
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
f951: note: unrecognized command-line option '-Wno-incompatible-function-pointer-types' may have been intended to silence earlier diagnostics
gmake[1]: *** [Makefile:447: test_bgemm] Error 1
gmake[1]: *** [Makefile:456: test_sbgemv] Error 1
ld: -lto_library library filename must be 'libLTO.dylib'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [Makefile:453: test_sbgemm] Error 1
f951: note: unrecognized command-line option '-Wno-incompatible-function-pointer-types' may have been intended to silence earlier diagnostics
f951: note: unrecognized command-line option '-Wno-incompatible-function-pointer-types' may have been intended to silence earlier diagnostics


This seems to be a known issue upstream, which is handled by this bit in Makefile.system:

feq ($(OSNAME), Darwin)
ifndef MACOSX_DEPLOYMENT_TARGET
ifeq ($(ARCH), arm64)
export MACOSX_DEPLOYMENT_TARGET=11.0
export NO_SVE = 1
# export NO_SME = 1
else
export MACOSX_DEPLOYMENT_TARGET=10.8
endif
endif
MD5SUM = md5 -r
XCVER = $(shell pkgutil --pkg-info=com.apple.pkg.Xcode |awk '/version:/ {print $2}'|cut -d: -f2|cut -f1 -d.)
ifeq (x$(XCVER)x,xx)
XCVER = $(shell pkgutil --pkg-info=com.apple.pkg.CLTools_Executables |awk '/version:/ {print $2}'|cut -d: -f2|cut -f1 -d.)
endif
ifeq (x$(XCVER), x 15)
CCOMMON_OPT += -Wl,-ld_classic
FCOMMON_OPT += -Wl,-ld_classic
endif
ifeq ($(shell [ $(XCVER) -ge 16 ] && echo yes),yes)
override CEXTRALIB := $(filter-out(-lto_library, $(CEXTRALIB)))
endif
endif

I do not know which relevant configurations do _not_ need -lto_library
filtered out. Upstream refined the above while fixing

https://github.com/OpenMathLib/OpenBLAS/issues/5473
https://github.com/OpenMathLib/OpenBLAS/issues/5202

But apparently this does not work on all pkgsrc platforms. In addition,
I see a build failure on arm64:

https://releng.netbsd.org/bulktracker/pkg/80553270
https://reports.pkgci.org/Darwin/14.5/arm64/20260227.1002/openblas-0.3.31/build.log

ld: library 'gfortran' not found
ld: library 'gfortran' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

So the toolchain setup is off here. I am not sure if it is my position
as math/openblas maintainer to do anything about it.

Can concerned devs here who run Darwin systems make sense out of the
failures? Should these hinder the presence of the upgrade from 0.3.26
to 0.3.31 in pkgsrc?


Alrighty then,

Thomas


-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg


Home | Main Index | Thread Index | Old Index