Opened 2 years ago

Closed 17 months ago

#66002 closed defect (fixed)

sbcl @2.3.2: build fails on all systems < 10.14

Reported by: snowflake (Dave Evans) Owned by: easye
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: sbcl

Description

The fix to sbcl to make it build on Monterey appears to have broken the build on older versions of MacOS, as verified by the buildbots.

Here's the log

--->  Building sbcl
DEBUG: Executing org.macports.build (sbcl)
DEBUG: system -W /opt/local/var/macports/build/_Users_davidevans_macports_sources_github.com_macports_macports-ports_lang_sbcl/sbcl/work/sbcl-2.2.9: SBCL_MACOSX_VERSION_MIN=10.11 CC=/usr/bin/clang CXX=/usr/bin/clang++ CPP=/usr/bin/cpp sh ./make.sh --fancy --prefix=/opt/local --xc-host="/opt/local/var/macports/build/_Users_davidevans_macports_sources_github.com_macports_macports-ports_lang_sbcl/sbcl/work/sbcl-2.2.9-x86-64-darwin/src/runtime/sbcl --core /opt/local/var/macports/build/_Users_davidevans_macports_sources_github.com_macports_macports-ports_lang_sbcl/sbcl/work/sbcl-2.2.9-x86-64-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null" 
make-config.sh: line 244: 41231 Done                    echo '(lisp-implementation-type)'
     41232 Segmentation fault: 11  | $SBCL_TEST_HOST
No working host Common Lisp implementation.
See ./INSTALL, the "SOURCE DISTRIBUTION" section
Command failed: SBCL_MACOSX_VERSION_MIN=10.11 CC=/usr/bin/clang CXX=/usr/bin/clang++ CPP=/usr/bin/cpp sh ./make.sh --fancy --prefix=/opt/local --xc-host="/opt/local/var/macports/build/_Users_davidevans_macports_sources_github.com_macports_macports-ports_lang_sbcl/sbcl/work/sbcl-2.2.9-x86-64-darwin/src/runtime/sbcl --core /opt/local/var/macports/build/_Users_davidevans_macports_sources_github.com_macports_macports-ports_lang_sbcl/sbcl/work/sbcl-2.2.9-x86-64-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null" 
Exit code: 1
Error: Failed to build sbcl: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: command execution failed
DEBUG:     while executing
DEBUG: "$procedure $targetname"
Error: See /opt/local/var/macports/logs/_Users_davidevans_macports_sources_github.com_macports_macports-ports_lang_sbcl/sbcl/main.log for details.

Change History (3)

comment:1 Changed 2 years ago by tomio-arisaka (Tomio Arisaka)

I think SBCL @2.2.9 port has two issues:

(1) I guess that sbcl-2.2.9-x86-64-darwin-binary.tar.bz2 was built on Monterey.

$ otool -L ./sbcl-2.2.9-x86-64-darwin/src/runtime/sbcl
./sbcl-2.2.9-x86-64-darwin/src/runtime/sbcl:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)

So it is not compatible with earlier versions of macOS (earlier than 10.12).

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.11.6
BuildVersion:	15G22010
$ 
$ ./sbcl-2.2.9-x86-64-darwin/src/runtime/sbcl --core ./sbcl-2.2.9-x86-64-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null
Segmentation fault: 11

Because earlier versions of macOS don't support CLOCK_REALTIME. #61384

(2) Earlier versions of clang don't know __builtin_cpu_init.

This issue has been introduced since SBCL-2.2.6 due to including sb-simd.

:info:build /usr/bin/clang -I../src/runtime     avx2.c   -o avx2
:info:build avx2.c:2:3: error: use of unknown builtin '__builtin_cpu_init' [-Wimplicit-function-declaration]
:info:build   __builtin_cpu_init();
:info:build   ^
:info:build 1 error generated.
$ xcodebuild -version
Xcode 8.2.1
Build version 8C1002
$ 
$ clang --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Last edited 20 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 21 months ago by kencu (Ken)

Summary: sbcl @2.2.9_0 build SEG FAULT while building on El Capitansbcl @2.3.2: build fails on all systems < 10.14
Version: 2.7.992.8.1

comment:3 Changed 17 months ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: assignedclosed

In a3cf7fd3e526e62a9437521c1b34228447249293/macports-ports (master):

sbcl: update to 2.3.5; pin for old macOS; add myself as co-maintainer

I also fixed build on old macOS

Closes: #61717
Closes: #65188
Closes: #65484
Closes: #66002

Note: See TracTickets for help on using tickets.