pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: pkgsrc
Am Wed, 25 Feb 2026 11:08:33 +0100
schrieb Adam <adam%viamedium.pl@localhost>:
> This fails to build on macOS:
>
> 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'
Refernces:
https://github.com/OpenMathLib/OpenBLAS/issues/5473
https://github.com/OpenMathLib/OpenBLAS/issues/5202
There is this code in Makefile.system:
ifeq ($(shell [ $(XCVER) -ge 16 ] && echo yes),yes)
override CEXTRALIB := $(filter-out(-lto_library, $(CEXTRALIB)))
endif
Seems like this check doesn't work for you? I see discussion mentioning
that the XCVER could be empty. Maybe this should be turned into opt-in
… or just unconditionally filter-out.
Adam, can you test this?
The full block:
ifeq ($(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 guess we want it to read
ifeq ($(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
# Always remove troublesome LTO linking option.
#ifeq ($(shell [ $(XCVER) -ge 16 ] && echo yes),yes)
override CEXTRALIB := $(filter-out(-lto_library, $(CEXTRALIB)))
#endif
endif
But maybe you can figure out a better check and submit that upstream.
Alrighty then,
Thomas
--
Dr. Thomas Orgis
HPC @ Universität Hamburg
Home |
Main Index |
Thread Index |
Old Index