On Sun, Dec 09, 2018 at 12:20:09PM +0200, Timo Myyrä wrote: [snip] > >> I haven't tested this that much yet but tests seem to pass on amd64 at > >> least with it. > > > > As Solene noted, the build fails when clisp is used as the > > cross-compilation host. I've tracked down the breakage to sbcl > > revision 83bc16d48d70fdf1b1c0194a0e45753df1fbd480 but haven't made > > progress past that. > > > > I did few test builds with sbcl releases and 1.4.8 was latest to compile, > compiling 1.4.9 already failed with clisp with similar message as the > 1.4.14. Didn't have time yet to dig deeper myself.
Now fixed in 3c15424ebc0f694108924ca5077a197783358920 upstream. > Here's a new diff fixing some of the feedback. > > Compiles and compile tests pass on amd64 but when running actual tests 'make > test' I get following: > ::: UNEXPECTED-FAILURE :WITHOUT-INTERRUPTS+CONDITION-WAIT due to SIMPLE-ERROR: > "The assertion (THREAD-ALIVE-P THREAD) failed with THREAD = > #<THREAD ABORTED {10052E66C3}>." > > and a bit later it gets stuck on: > ::: Running :DEADLOCK-DETECTION.3 > > > What do you think about adding print/texinfo dependency and use it to generate > the info file. It complains about unknown UTF-8 encoding during the makeinfo > call: I would prefer not to add such a large dependency unless it's necessary. We used to do that and it was a burden when testing port updates. > /expanding variables in variables.texinfo > /creating encodings.texi-temp > makeinfo -I "docstrings/" -I "../../contrib/" asdf.texinfo > asdf.texinfo:2219: warning: @strong{Note...} produces a spurious > cross-reference in Info; reword to avoid that. > asdf.texinfo:2222: warning: @strong{Note...} produces a spurious > cross-reference in Info; reword to avoid that. > makeinfo -I "docstrings/" -I "../../contrib/" sbcl.texinfo > sbcl.texinfo:5: warning: unrecognized encoding name `UTF-8'. > > The ports versions should understand that but I'm not sure if the manuals > contain stuff which really requires UTF-8 encoding.. > > Once the clisp bootstrap is fixed the port would be ready for update without > the > futex stuff. The rest looks fine as far as I can tell. I think you should send the futex patch to the sbcl-devel list so someone more familiar with sbcl's futex code can look at it. > Timo > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/lang/sbcl/Makefile,v > retrieving revision 1.38 > diff -u -p -u -p -r1.38 Makefile > --- Makefile 24 Jun 2018 18:33:36 -0000 1.38 > +++ Makefile 9 Dec 2018 10:04:13 -0000 > @@ -6,7 +6,7 @@ USE_WXNEEDED = Yes > > COMMENT= compiler and runtime system for ANSI Common Lisp > > -V = 1.4.8 > +V = 1.4.14 > DISTNAME= sbcl-${V}-source > PKGNAME= sbcl-${V} > WRKDIST= ${WRKDIR}/sbcl-${V} > @@ -21,7 +21,7 @@ PERMIT_PACKAGE_CDROM= Yes > > MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sbcl/} > > -WANTLIB= c m util > +WANTLIB= c m util z > > PSEUDO_FLAVORS= native_bootstrap > > @@ -30,7 +30,7 @@ PSEUDO_FLAVORS= native_bootstrap > FLAVORS= threads > FLAVOR?= > > -EXTRA_PARAMS= > +EXTRA_PARAMS= --with-sb-core-compression > .if ${FLAVOR:Mthreads} > ONLY_FOR_ARCHS = amd64 > EXTRA_PARAMS+= --with-sb-thread --with-sb-futex > Index: distinfo > =================================================================== > RCS file: /cvs/ports/lang/sbcl/distinfo,v > retrieving revision 1.16 > diff -u -p -u -p -r1.16 distinfo > --- distinfo 24 Jun 2018 18:33:36 -0000 1.16 > +++ distinfo 9 Dec 2018 10:04:13 -0000 > @@ -1,2 +1,2 @@ > -SHA256 (sbcl-1.4.8-source.tar.bz2) = > ziS2K4hIJiHCKKT9bIAjUDMLYmPhsbmEYO60qB1/szU= > -SIZE (sbcl-1.4.8-source.tar.bz2) = 6040563 > +SHA256 (sbcl-1.4.14-source.tar.bz2) = > TfJu1E1FWAzuy/nhpunkCV3nPHaZxrlFu+jMhxAwHCw= > +SIZE (sbcl-1.4.14-source.tar.bz2) = 6187821 > Index: patches/patch-src_runtime_Config_generic-openbsd > =================================================================== > RCS file: > /cvs/ports/lang/sbcl/patches/patch-src_runtime_Config_generic-openbsd,v > retrieving revision 1.3 > diff -u -p -u -p -r1.3 patch-src_runtime_Config_generic-openbsd > --- patches/patch-src_runtime_Config_generic-openbsd 8 Mar 2018 15:17:39 > -0000 1.3 > +++ patches/patch-src_runtime_Config_generic-openbsd 9 Dec 2018 10:04:13 > -0000 > @@ -1,23 +1,11 @@ > $OpenBSD: patch-src_runtime_Config_generic-openbsd,v 1.3 2018/03/08 15:17:39 > sthen Exp $ > > -clang-5.0.0 doesn't pass -export-dynamic to the linker, instead it > -passes a bogus -e export-dynamic to ld(1). Just use -Wl,--export-dynamic. > - > Don't try to guess (wrong) with clang. Just assume we have pie > > Index: src/runtime/Config.generic-openbsd > --- src/runtime/Config.generic-openbsd.orig > +++ src/runtime/Config.generic-openbsd > -@@ -9,7 +9,7 @@ > - # provided with absolutely no warranty. See the COPYING and CREDITS > - # files for more information. > - > --LINKFLAGS += -export-dynamic -Wl,-z,wxneeded > -+LINKFLAGS += -Wl,--export-dynamic -Wl,-z,wxneeded > - OS_LIBS += -lutil > - > - ifdef LISP_FEATURE_SB_THREAD > -@@ -17,9 +17,7 @@ CFLAGS += -pthread > +@@ -17,9 +17,7 @@ CFLAGS += -pthread -DOS_THREAD_STACK > OS_LIBS += -pthread > endif > > Index: patches/patch-src_runtime_GNUmakefile > =================================================================== > RCS file: /cvs/ports/lang/sbcl/patches/patch-src_runtime_GNUmakefile,v > retrieving revision 1.8 > diff -u -p -u -p -r1.8 patch-src_runtime_GNUmakefile > --- patches/patch-src_runtime_GNUmakefile 8 Mar 2018 15:17:39 -0000 > 1.8 > +++ patches/patch-src_runtime_GNUmakefile 9 Dec 2018 10:04:13 -0000 > @@ -2,7 +2,7 @@ $OpenBSD: patch-src_runtime_GNUmakefile, > Index: src/runtime/GNUmakefile > --- src/runtime/GNUmakefile.orig > +++ src/runtime/GNUmakefile > -@@ -30,7 +30,7 @@ __LDFLAGS__ = > +@@ -34,7 +34,7 @@ __LDFLAGS__ = > > include ../../output/prefix.def > > Index: patches/patch-src_runtime_bsd-os_c > =================================================================== > RCS file: patches/patch-src_runtime_bsd-os_c > diff -N patches/patch-src_runtime_bsd-os_c > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-src_runtime_bsd-os_c 9 Dec 2018 10:04:13 -0000 > @@ -0,0 +1,53 @@ > +$OpenBSD$ > + > +add futex support for OpenBSD > + > +Index: src/runtime/bsd-os.c > +--- src/runtime/bsd-os.c.orig > ++++ src/runtime/bsd-os.c > +@@ -693,7 +693,45 @@ os_dlsym(void *handle, const char *symbol) > + return ret; > + } > + > ++#if defined(LISP_FEATURE_SB_THREAD) && defined(LISP_FEATURE_SB_FUTEX) \ > ++ && !defined(LISP_FEATURE_SB_PTHREAD_FUTEX) > ++ > ++#include <sys/time.h> > ++#include <sys/futex.h> > ++ > ++int > ++futex_wait(int *lock_word, int oldval, long sec, unsigned long usec) > ++{ > ++ struct timespec timeout; > ++ int t; > ++ > ++ if (sec < 0) { > ++ t = futex(lock_word, FUTEX_WAIT, oldval, NULL, NULL); > ++ } > ++ else { > ++ timeout.tv_sec = sec; > ++ timeout.tv_nsec = usec * 1000; > ++ t = futex(lock_word, FUTEX_WAIT, oldval, &timeout, NULL); > ++ } > ++ if (t == 0) > ++ return 0; > ++ else if (errno == ETIMEDOUT) > ++ return 1; > ++ else if (errno == EINTR) > ++ return 2; > ++ else > ++ /* EWOULDBLOCK and others, need to check the lock */ > ++ return -1; > ++} > ++ > ++int > ++futex_wake(int *lock_word, int n) > ++{ > ++ return (futex(lock_word, FUTEX_WAKE, n, NULL, NULL)); > ++} > ++ > + #endif > ++#endif /* __OpenBSD__ */ > + > + #if defined(LISP_FEATURE_SB_WTIMER) && !defined(LISP_FEATURE_DARWIN) > + /* > Index: patches/patch-src_runtime_run-program_c > =================================================================== > RCS file: /cvs/ports/lang/sbcl/patches/patch-src_runtime_run-program_c,v > retrieving revision 1.1 > diff -u -p -u -p -r1.1 patch-src_runtime_run-program_c > --- patches/patch-src_runtime_run-program_c 8 Mar 2018 15:17:39 -0000 > 1.1 > +++ patches/patch-src_runtime_run-program_c 9 Dec 2018 10:04:13 -0000 > @@ -6,7 +6,7 @@ copy of environ than libc. > Index: src/runtime/run-program.c > --- src/runtime/run-program.c.orig > +++ src/runtime/run-program.c > -@@ -200,14 +200,18 @@ int spawn(char *program, char *argv[], int sin, int so > +@@ -202,14 +202,18 @@ int spawn(char *program, char *argv[], int sin, int so > if (pwd && chdir(pwd) < 0) { > failure_code = 3; > } else { > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/ports/lang/sbcl/pkg/PLIST,v > retrieving revision 1.11 > diff -u -p -u -p -r1.11 PLIST > --- pkg/PLIST 8 Mar 2018 15:17:39 -0000 1.11 > +++ pkg/PLIST 9 Dec 2018 10:04:13 -0000 > @@ -9,6 +9,8 @@ lib/sbcl/contrib/sb-aclrepl.asd > lib/sbcl/contrib/sb-aclrepl.fasl > lib/sbcl/contrib/sb-bsd-sockets.asd > lib/sbcl/contrib/sb-bsd-sockets.fasl > +lib/sbcl/contrib/sb-capstone.asd > +lib/sbcl/contrib/sb-capstone.fasl > lib/sbcl/contrib/sb-cltl2.asd > lib/sbcl/contrib/sb-cltl2.fasl > lib/sbcl/contrib/sb-concurrency.asd