Opened 8 years ago

Closed 4 years ago

#49610 closed defect (wontfix)

sbcl 1.3 fails to build

Reported by: glen@… Owned by: easye
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: elcapitan Cc: mp@…
Port: sbcl

Description

sbcl 1.3 fails to build on Mac Pro (Late 2013), OS X 10.11.1. Log file is attached.

Attachments (1)

main.log (1.2 MB) - added by glen@… 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by glen@…

Attachment: main.log added

comment:1 Changed 8 years ago by glen@…

Note that the same port builds fine on my Macbook Air (13 inch, mid-2013), which is running the same OS and Xcode versions.

Note also that this appears to be a continuation of #49132, but that it has persisted through three port upgrades and two OS versions.

comment:2 Changed 8 years ago by glen@…

The pertinent section of the log file indicates that the self test for sb-concurrency, which is part of the (default) +fancy variant, failed:

:info:build * echo "(defsystem :sb-sprof :class require-system)" > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.3.0/obj/sbcl-home/contrib//sb-sprof.asd
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.3.0/src/runtime/sbcl --noinform --core /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.3.0/output/sbcl.core --lose-on-corruption --disable-debugger --no-sysinit --no-userinit --eval '(load (format nil "SYS:CONTRIB;~:@(~A~);TEST.LISP" "sb-sprof"))' </dev/null
:info:build ; disassembly for CONSALOT
:info:build ; Size: 180 bytes. Origin: #x1003D978C8
:info:build ; 8C8:       498B4C2460       MOV RCX, [R12+96]               ; thread.binding-stack-pointer
:info:build                                                               ; no-arg-parsing entry point
:info:build ; 8CD:       48894DF8         MOV [RBP-8], RCX
:info:build ; 8D1:       BA17001020       MOV EDX, 537919511
:info:build ; 8D6:       BB204E0000       MOV EBX, 20000
:info:build ; 8DB:       E96F000000       JMP L5
:info:build ; 8E0: L0:   4883EB02         SUB RBX, 2
:info:build ; 8E4:       49896C2440       MOV [R12+64], RBP               ; thread.pseudo-atomic-bits
:info:build ; 8E9:       4D8B5C2418       MOV R11, [R12+24]               ; thread.alloc-region
:info:build ; 8EE:       498D7360         LEA RSI, [R11+96]
:info:build ; 8F2:       493B742420       CMP RSI, [R12+32]
:info:build ; 8F7:       7764             JNBE L6
:info:build ; 8F9:       4989742418       MOV [R12+24], RSI               ; thread.alloc-region
:info:build ; 8FE:       498D730F         LEA RSI, [R11+15]
:info:build ; 902: L1:   48C746F1D9000000 MOV QWORD PTR [RSI-15], 217
:info:build ; 90A:       48C746F914000000 MOV QWORD PTR [RSI-7], 20
:info:build ; 912:       49316C2440       XOR [R12+64], RBP               ; thread.pseudo-atomic-bits
:info:build ; 917:       7403             JEQ L2
:info:build ; 919:       0F0B09           BREAK 9                         ; pending interrupt trap
:info:build ; 91C: L2:   49896C2440       MOV [R12+64], RBP               ; thread.pseudo-atomic-bits
:info:build ; 921:       4D8B5C2418       MOV R11, [R12+24]               ; thread.alloc-region
:info:build ; 926:       498D4B10         LEA RCX, [R11+16]
:info:build ; 92A:       493B4C2420       CMP RCX, [R12+32]
:info:build ; 92F:       773C             JNBE L7
:info:build ; 931:       49894C2418       MOV [R12+24], RCX               ; thread.alloc-region
:info:build ; 936:       498D4B07         LEA RCX, [R11+7]
:info:build ; 93A: L3:   49316C2440       XOR [R12+64], RBP               ; thread.pseudo-atomic-bits
:info:build ; 93F:       7403             JEQ L4
:info:build ; 941:       0F0B09           BREAK 9                         ; pending interrupt trap
:info:build ; 944: L4:   488971F9         MOV [RCX-7], RSI
:info:build ; 948:       48895101         MOV [RCX+1], RDX
:info:build ; 94C:       488BD1           MOV RDX, RCX
:info:build ; 94F: L5:   4885DB           TEST RBX, RBX
:info:build ; 952:       7F8C             JNLE L0
:info:build ; 954:       488BE5           MOV RSP, RBP
:info:build ; 957:       F8               CLC
:info:build ; 958:       5D               POP RBP
:info:build ; 959:       C3               RET
:info:build ; 95A:       0F0B10           BREAK 16                        ; Invalid argument count trap
:info:build ; 95D: L6:   6A60             PUSH 96
:info:build ; 95F:       BEF0B01100       MOV ESI, 1159408                ; alloc_tramp
:info:build ; 964:       FFD6             CALL RSI
:info:build ; 966:       5E               POP RSI
:info:build ; 967:       4080CE0F         OR SIL, 15
:info:build ; 96B:       EB95             JMP L1
:info:build ; 96D: L7:   6A10             PUSH 16
:info:build ; 96F:       B9F0B01100       MOV ECX, 1159408                ; alloc_tramp
:info:build ; 974:       FFD1             CALL RCX
:info:build ; 976:       59               POP RCX
:info:build ; 977:       80C907           OR CL, 7
:info:build ; 97A:       EBBE             JMP L3
:info:build * 
:info:build WARNING! Some of the contrib modules did not build successfully or pass
:info:build their self-tests. Failed contribs:"
:info:build   sb-concurrency
:info:build Command failed: ulimit -s 8192 && unset LD_PREBIND && unset LD_PREBIND_ALLOW_OVERLAP && cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.3.0 && export CC && CC=/usr/bin/clang && export CXX && CXX=/usr/bin/clang++ && export CPP && CPP==/usr/bin/cpp && sh ./make.sh --fancy --prefix=/opt/local --xc-host="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.0.55-x86-darwin/src/runtime/sbcl --core /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.0.55-x86-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null" 
:info:build Exit code: 1
:error:build org.macports.build for port sbcl returned: command execution failed
:debug:build Error code: NONE
:debug:build Backtrace: command execution failed
    while executing
"proc-org.macports.build-build-0 org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for sbcl: org.macports.install org.macports.build org.macports.destroot
:notice:build Please see the log file for port sbcl for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/main.log

comment:3 Changed 8 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to easieste@…

In the future, please Cc the port maintainers (port info --maintainers sbcl), if any.

comment:4 Changed 8 years ago by mp@…

Cc: mp@… added

Cc Me!

comment:5 Changed 8 years ago by glen@…

Please be aware that I have found a fix for this bug. The fix is described here:

https://bugs.gentoo.org/show_bug.cgi?id=468482

Apparently the failure results from a timeout when testing FRLOCK. The test timeout is, by default, 60 seconds. For some reason, on the MacBook it completes in this time but is slower on my Mac Pro. Manually editing the files as described below:

  • improving the timeout value in

sbcl-1.1.7/contrib/sb-concurrency/tests/test-frlock.lisp line 85 from 60 to 240, and

  • decreasing the reader-count, read-count and write-count in the same file,

lines 20 and 22 to half of the values given.

fixes the problem.

I am not savvy enough to create a patch file for this fix, but editing it by hand and then continuing the port install process allows the port to build and install correctly.

comment:6 Changed 8 years ago by glen@…

More information on this bug - either the OSX Yosemite default settings for Unix sockets, buffers, locks, mutexes, etc. are poorly optimized, or something was screwy regarding these settings for my personal machine, as making such system calls on my 2.4 GHz 12 core Mac Pro is clearly far slower than even on my 1.7 GHz Macbook Air. In any case, creating an /etc/sysctl.conf and using the optimized settings from the following website:

https://rolande.wordpress.com/2014/05/17/performance-tuning-the-network-stack-on-mac-os-x-part-2/

not only completely clears up the sbcl build problem, but the build actually completes several minutes faster now than on the Macbook Pro. This is presumably because the more than 1 million locking mutex system calls that are generated by sbcl's sb-concurrency self tests can now complete without tripping the 60-second watchdog timer.

Last edited 8 years ago by glen@… (previous) (diff)

comment:7 Changed 4 years ago by easye

Resolution: wontfix
Status: newclosed

sbcl-2.0.3 builds in MacPorts, building sbcl-1.3.x is not currently supported.

Note: See TracTickets for help on using tickets.