Download raw body.
lang/sbcl - building and installing libsbcl.so ?
Cc semarie, who is MAINTAINER for lang/sbcl.
On Wed, 24 Apr 2024 14:20:46 +0100
Dima Pasechnik <dima@sagemath.org> wrote:
> Dear all,
> sbcl can be packaged into a dynamic library, something one needs for
> e.g. calling Lisp from C or Python,
> via sbcl-librarian https://github.com/quil-lang/sbcl-librarian
>
> Currently sbcl port does not build and install it, while it's quite easy
> at least in theory. Here is my incomplete attempt to fix the port;
> I do get libsbcl.so built, but not installed.
> (after "make install" it's left in /usr/ports/pobj/sbcl-2.4.3/fake-amd64/usr/local/lib)
>
> Could someone tell me what's missing?
> Thanks
> Dima
Try running "make update-plist" to add new files like libsbcl.so.0.0
from the fake to the package.
I can't apply your diff, because something changed your tabs into
spaces. I suggest that you send your next diff as an attachment, or
from a mail client that preserves whitespace.
--gkoehler
> #--------------------------- # some magic is missing still?
> #
> --- a/lang/sbcl/Makefile
> +++ b/lang/sbcl/Makefile
> @@ -10,6 +10,8 @@ PKGNAME = sbcl-${V}
>
> CATEGORIES = lang
>
> +SHARED_LIBS += sbcl 0.0
> +
> HOMEPAGE = https://www.sbcl.org/
>
> MAINTAINER = Sebastien Marie <semarie@kapouay.eu.org>
> @@ -116,6 +118,8 @@ do-build:
> --with-sb-core-compression \
> --with-sb-xref-for-internals \
> ${EXTRA_PARAMS}
> + umask 022 && cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
> + /bin/sh ./make-shared-library.sh
> umask 022 && cd ${WRKSRC}/doc/manual/ && ${SETENV} ${MAKE_ENV} \
> ${GMAKE} info
>
> # add missing $(LDFLAGS) in $CC call in the Makefile
> #
> --- a/lang/sbcl/patches/patch-src_runtime_GNUmakefile
> +++ b/lang/sbcl/patches/patch-src_runtime_GNUmakefile
> @@ -13,3 +13,12 @@ Index: src/runtime/GNUmakefile
> ASFLAGS += $(CFLAGS)
> CPPFLAGS += -I.
>
> +@@ -133,7 +133,7 @@ libsbcl.a: $(OBJS)
> +
> + PIC_OBJS = $(subst .o,.pic.o,$(OBJS))
> + libsbcl.so: $(PIC_OBJS)
> +- $(CC) -shared -o $@ $^ $(LIBS) $(SOFLAGS)
> ++ $(CC) -shared -o $@ $^ $(LDFLAGS) $(LIBS) $(SOFLAGS)
> + # for this to work, you must have with-gcc-tls in your build features already.
> + # can't define it here because then it conflicts if you have it in both places.
> + %.pic.o: %.c
>
>
lang/sbcl - building and installing libsbcl.so ?