Sunday, January 30, 2022

Re: [maintainer update] ecl-21.2.1

Omar Polo <op@openbsd.org> [2022-01-21, 23:51 +0100]:

> Timo Myyrä <timo.myyra@bittivirhe.fi> writes:
>
>> Timo Myyrä <timo.myyra@bittivirhe.fi> [2021-12-21, 13:08 +0200]:
>>
>> ping ping...
>>
>>> Ping
>>>
>>> On Sat, Dec 11, 2021, at 18:34, Timo Myyrä wrote:
>>>> Hi,
>>>>
>>>> Here's an bump to bring ecl to latest version.
>>>> Lightly tested on amd64.
>>>>
>>>> Timo
>>>>
>>>> [...]
>
> Hello,
>
> I finally found some time to test the diff! :)
>
> The port builds fine, the diff looks good, the majority of the test are
> also passing (18013 pass and 84 fail, the failings seems to be mostly
> from math stuff.)
>
> There's only one issue I can see and even if it's not introduced by the
> diff I think we should fix it: the symlink /usr/loclal/lib/libecl.so ->
> libecl.so.0.8 should be removed.
>
> The situation with the dependencies is:
>
> - math/maxima: builds and the majority of the tests are passing, but I
> don't use the software so I can't really comment
> - math/wxMaxima: marked as broken, so doesn't count
> - net/clic: I don't know if I'm doing something wrong but it's failing
> at runtime:
>
> % clic
> ;;; Loading #P"/usr/local/lib/ecl/asdf.fas"
> clic:/usr/local/lib/libecl.so.8.0: /usr/local/lib/libecl.so.7.0 : WARNING: symbol(cl_symbols) size mismatch, relink your program
>
> Condition of type: SEGMENTATION-VIOLATION
> Detected access to an invalid or protected memory address.
> Available restarts:
>
> 1. (CONTINUE) Ignore signal
>
> Top level in: #<process TOP-LEVEL 0xa2b98645f80>.
>>
>
> which I don't understand, as I've rebuilt the package *after* installing
> the ecl update which bumps the library.
>
> - sysutils/reed-alert: I don't use it and it doesn't have tests
>
> I'll look more deeply into this two issues (the symlink and net/clic) in
> a couple of days, I just wanted to let you know I'm interested in seeing
> ecl updated and that the email wasn't lost :)

Here is updated diff which removes the symlink. Note that with this we
need to patch the ecl source as it checks library directory based on the
libecl.so location. Added simple patch to fix it by skipping the symlink
check.

timo

diff 94718e017cf91b90185b8b806a67911b82f46d66 /usr/ports
blob - 49c2de291af99891af2eab90692315ae9b00654f
file + lang/ecl/Makefile
--- lang/ecl/Makefile
+++ lang/ecl/Makefile
@@ -3,9 +3,9 @@
COMMENT = embeddable common-lisp
CATEGORIES = lang

-V = 20.4.24
+V = 21.2.1
DISTNAME = ecl-$V
-SHARED_LIBS += ecl 7.0
+SHARED_LIBS += ecl 8.0

HOMEPAGE = https://common-lisp.net/project/ecl/
MAINTAINER = Timo Myyra <timo.myyra@bittivirhe.fi>
@@ -46,9 +46,7 @@ LIB_DEPENDS += devel/gmp \
devel/libffi

TEST_DEPENDS = ${BASE_PKGPATH}
+TEST_ENV = "ECL=${WRKDIST}/build/bin/ecl" \
+ "TEST_IMAGE=${WRKDIST}/build/bin/ecl"

-# XXX: Workaround for missing Copyright file
-post-configure:
- @cp ${WRKSRC}/{LICENSE,Copyright}
-
.include <bsd.port.mk>
blob - 5c3377469374e1eefeb7900f2d30b5660b4c9528
file + lang/ecl/distinfo
--- lang/ecl/distinfo
+++ lang/ecl/distinfo
@@ -1,2 +1,2 @@
-SHA256 (ecl-20.4.24.tgz) = Zwg47fJYqTa1Iv22INozbefldaoNJ+NIQXJyUnJtDwc=
-SIZE (ecl-20.4.24.tgz) = 7815444
+SHA256 (ecl-21.2.1.tgz) = sVp13PhLj2LmhyDMqxOT+WEcB4/NOv3WOaEIbK0BCQA=
+SIZE (ecl-21.2.1.tgz) = 7875088
blob - b44246b9b8d755df5784e6b4dd04570657feb031
file + lang/ecl/patches/patch-src_Makefile_in
--- lang/ecl/patches/patch-src_Makefile_in
+++ lang/ecl/patches/patch-src_Makefile_in
@@ -2,11 +2,9 @@ $OpenBSD: patch-src_Makefile_in,v 1.7 2020/08/24 21:38
Index: src/Makefile.in
--- src/Makefile.in.orig
+++ src/Makefile.in
-@@ -212,30 +212,15 @@ install:
- for i in `(cd ecl && find . -name '*.h')`; do echo $$i; \
+@@ -213,29 +213,13 @@ install:
$(INSTALL_DATA) ecl/$$i $(DESTDIR)$(includedir)/ecl/$$i; \
done
-+ $(INSTALL_DATA) help.doc $(DESTDIR)$(ecldir)
$(INSTALL_SCRIPT) bin/ecl-config $(DESTDIR)$(bindir)
- for i in build-stamp help.doc TAGS ; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(ecldir); \
@@ -26,8 +24,8 @@ Index: src/Makefile.in
- $(LN_S) @SONAME3@ @SONAME1@ && \
- $(LN_S) @SONAME3@ @SONAME@ ) \
- fi
++ $(INSTALL_DATA) help.doc $(DESTDIR)$(ecldir)
+ ${INSTALL_LIBRARY} libecl.so $(DESTDIR)$(libdir)/$(LSP_LIBRARIES)
-+ cd $(DESTDIR)$(libdir) && ln -sf $(LSP_LIBRARIES) libecl.so
$(INSTALL_PROGRAM) c/$(DPP) $(DESTDIR)$(ecldir)
$(INSTALL_PROGRAM) $(ECL_MIN) $(DESTDIR)$(ecldir)
for i in `cat modules`; do \
blob - 510d663817b8a3936ee24c14411001f61c030bbf
file + /dev/null
--- lang/ecl/patches/patch-src_c_package_d
+++ /dev/null
@@ -1,26 +0,0 @@
-$OpenBSD: patch-src_c_package_d,v 1.1 2020/08/24 21:38:06 gkoehler Exp $
-
-Work around a SIGSEGV on 64-bit big-endian platforms
-(mips64, powerpc64, sparc64), from Daniel Kochmaski,
-https://gitlab.com/embeddable-common-lisp/ecl/-/issues/604#note_388147381
-
-Index: src/c/package.d
---- src/c/package.d.orig
-+++ src/c/package.d
-@@ -327,10 +327,12 @@ ecl_find_package_nolock(cl_object name)
- return name;
- name = cl_string(name);
-
-- p = ecl_symbol_value(@'*package*');
-- if (ECL_PACKAGEP(p)) {
-- p = ecl_assoc(name, p->pack.local_nicknames);
-- if (!Null(p)) return ECL_CONS_CDR(p);
-+ if (ecl_option_values[ECL_OPT_BOOTED]) {
-+ p = ecl_symbol_value(@'*package*');
-+ if (ECL_PACKAGEP(p)) {
-+ p = ecl_assoc(name, p->pack.local_nicknames);
-+ if (!Null(p)) return ECL_CONS_CDR(p);
-+ }
- }
-
- l = cl_core.packages;
blob - /dev/null
file + lang/ecl/patches/patch-src_cmp_cmpmain_lsp
--- /dev/null
+++ lang/ecl/patches/patch-src_cmp_cmpmain_lsp
@@ -0,0 +1,22 @@
+$OpenBSD$
+
+Override system library detection to just use *ecl-library-directory*.
+The original check fails now that library symlink is removed.
+
+Index: src/cmp/cmpmain.lsp
+--- src/cmp/cmpmain.lsp.orig
++++ src/cmp/cmpmain.lsp
+@@ -960,12 +960,7 @@ from the C language code. NIL means \"do not create t
+
+ (defun ecl-library-directory ()
+ "Finds the directory in which the ECL core library was installed."
+- (cond ((and *ecl-library-directory*
+- (probe-file (merge-pathnames (compile-file-pathname "ecl" :type
+- #+dlopen :shared-library
+- #-dlopen :static-library)
+- *ecl-library-directory*)))
+- *ecl-library-directory*)
++ (cond ((and *ecl-library-directory* *ecl-library-directory*))
+ ((probe-file "SYS:BUILD-STAMP")
+ (setf *ecl-library-directory* (namestring (translate-logical-pathname "SYS:"))))
+ ((error "Unable to find library directory"))))
blob - 0920e55a097eab197813321666184d4c1aaa17bc
file + lang/ecl/patches/patch-src_compile_lsp_in
--- lang/ecl/patches/patch-src_compile_lsp_in
+++ lang/ecl/patches/patch-src_compile_lsp_in
@@ -1,7 +1,8 @@
$OpenBSD: patch-src_compile_lsp_in,v 1.4 2016/12/20 20:12:29 juanfra Exp $
---- src/compile.lsp.in.orig Mon Dec 19 21:27:57 2016
-+++ src/compile.lsp.in Mon Dec 19 21:29:57 2016
-@@ -74,19 +74,19 @@
+Index: src/compile.lsp.in
+--- src/compile.lsp.in.orig
++++ src/compile.lsp.in
+@@ -91,19 +91,19 @@
"@LDFLAGS@ @LIBPREFIX@ecl.@LIBEXT@ @CORE_LIBS@ @FASL_LIBS@ @LIBS@")
#+(and :wants-dlopen (not nonstop))
(setf c::*ld-flags*
blob - 1f720b8258ab12e59b9c01b247cf29641de99555
file + lang/ecl/patches/patch-src_configure
--- lang/ecl/patches/patch-src_configure
+++ lang/ecl/patches/patch-src_configure
@@ -2,7 +2,7 @@ $OpenBSD: patch-src_configure,v 1.9 2020/08/24 21:38:0
Index: src/configure
--- src/configure.orig
+++ src/configure
-@@ -5050,7 +5050,7 @@ LSP_FEATURES="(cons :android ${LSP_FEATURES})"
+@@ -5240,7 +5240,7 @@ LSP_FEATURES="(cons :android ${LSP_FEATURES})"
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
ECL_LDRPATH="-Wl,--rpath,~A"
clibs="-lpthread ${clibs}"
@@ -11,7 +11,7 @@ Index: src/configure
SONAME_LDFLAGS="-Wl,-soname,SONAME"
;;
solaris*)
-@@ -9682,7 +9682,7 @@ if test ${enable_shared} = "yes"; then
+@@ -9910,7 +9910,7 @@ if test ${enable_shared} = "yes"; then

$as_echo "#define ENABLE_DLOPEN 1" >>confdefs.h

blob - aaa872a968b99a07f318f3b31e3a8bf0ebbfea40
file + lang/ecl/pkg/PLIST
--- lang/ecl/pkg/PLIST
+++ lang/ecl/pkg/PLIST
@@ -29,7 +29,6 @@ include/ecl/object.h
include/ecl/page.h
include/ecl/stack-resize.h
include/ecl/stacks.h
-info/ecl.info.gz
lib/ecl/
lib/ecl/COPYING
lib/ecl/LICENSE
@@ -227,7 +226,6 @@ lib/ecl/serve-event.asd
@bin lib/ecl/serve-event.fas
lib/ecl/sockets.asd
@bin lib/ecl/sockets.fas
-@so lib/libecl.so
@lib lib/libecl.so.${LIBecl_VERSION}
@man man/man1/ecl-config.1
@man man/man1/ecl.1

No comments:

Post a Comment