Awesome suggestions! I'm tinkering with the LD_PRELOAD tactic. Here's the skinny on this morning's activities:
I built a recent version of libffi from source and installed it locally. I suspect that OpenBSD's version from /usr/ports will work but the installed name is libffi.so.0.0 - quicklisp/dists/quicklisp/software/cffi_0.11.2/libffi/init.lisp expects a different name:
Code: Select all
(:unix (:or "libffi.so.6" "libffi32.so.6" "libffi.so.5" "libffi32.so.5"))
Easy enough to fix/look-into later but for this morning I stuck with the locally installed recent version. Here's what happened:
Code: Select all
$ export LD_LIBRARY_PATH=/home/hanzer/opt/lib
$ export CPATH=/home/hanzer/opt/lib/libffi-3.0.13/include
$ LD_PRELOAD=/usr/lib/libpthread.so.17.0 sbcl --load quicklisp.lisp
* (load "/home/hanzer/quicklisp/setup.lisp")
* (ql:quickload "gsll")
The LD_PRELOAD of libpthread solved the undefined symbol errors. Woohoo! The compilation proceeded a bit further then:
Code: Select all
[package cl+ssl].
debugger invoked on a CFFI:LOAD-FOREIGN-LIBRARY-ERROR:
Unable to load any of the alternatives:
("libcrypto.so.21.0" "libcrypto.so.20.1" "libcrypto.so.19.0"
"libcrypto.so.18.0")
In OpenBSD-5.3 it is libcrypto.so.22.0. After a little tweak to quicklisp/dists/quicklisp/software/cl+ssl-20130420-git/reload.lisp
Code: Select all
(progn
(cffi:define-foreign-library libcrypto
(:openbsd (:or "libcrypto.so.22.0"
"libcrypto.so.21.0"
"libcrypto.so.20.1"
"libcrypto.so.19.0"
"libcrypto.so.18.0")))
(cffi:use-foreign-library libcrypto))
Try again and the compilation gets a little further then:
Code: Select all
; caught ERROR:
; READ error during COMPILE-FILE:
;
; :ASCII stream decoding error on
; #<SB-SYS:FD-STREAM
; for "file /home/hanzer/quicklisp/dists/quicklisp/software/antik-20130720-git/init/generic.lisp"
; {41EC9219}>:
;
; the octet sequence #(194) cannot be decoded.
;
; (in form starting at line: 192, column: 18, file-position: 6849)
I haven't really looked into this error yet. Actually, there is a FreeBSD-9.2-RC4 installation DVD sitting in the drive of my OpenBSD development machine; it's just waiting for a reboot. I went through the SBCL build process on OpenBSD last night. It wouldn't run many of the regression tests and seemed to fail some of those it did run. It would be nice to see SBCL build on OpenBSD with the --fancy options and pass all of the regression tests. Working toward that goal might be an interesting way to learn and explore. Although, pressing the reset button and getting on with it would also be fairly gratifying.
