Make ANSI Common Lisp available on Haiku (again)

Doesn’t mean we can dig around a bit still :wink:

From syslog when running the tests (adding it to the LIBS doesn’t solve anything, but maybe just add it)?

KERN: runtime_loader: Cannot open file libpcre.so (needed by /Share/wip/clisp/src/lisp.run): No such file or directory````
1 Like

Strange, libpcre.so is not listed among dependencies. And if I understand it correctly, Lisp has a better ppcre then Perl. But of course, we can try. I am a bit overwhelmed by now.

How can I produce .hpkg from .recipe? Should I install HaikuPorter?

EDIT: The downloaded tarball from Git contains sacla-tests folder, which contain some more tests and can be run with:
make check-sacla-tests.
I believe, the most relevant tests are ANSI compliance tests, which can be invoked with:
make check-ansi-tests
but I do not see the folder with them, it needs to be downloaded separately, it seems.

It’s not just haikuporter, you also need to clone “haikuports”, wrote a small note about it here:

The recipe should go to: dev-lisp/clisp (as we follow Gentoo’s layout).

1 Like

Looking at the others via repology I don’t see libpcre listed there too, libxcrypt but we don’t have that one (and probably don’t need it). So for now just ignore my message on it. :slight_smile:

Found in unix/INSTALL file the following information:

Dependencies: each package “clisp-modname” depends on “clisp” and, maybe, on an external library to which it interfaces, e.g., postgresql or pcre. It does not depend on any development tool (gcc, libffcall, pcre-dev).

So, libpcre.so is a real shared library expected for some CLISP module.

2 Likes

Today, there are 2 news for CLIPS:

  1. We have an answer from CLISP team. They will be happy to accept Haiku specific patches and kindly offered support for their production.
  2. The preliminary recipe for CLISP is prepared.

The recipe is not working however, most probably because I do not know how to use haikuporter. It says:

Warning: Port clisp-2.50 is unsupported on this architecture.
Continue (y/n + enter)? y
 ok
'Port' object has no attribute 'recipeKeys'

The recipe can be downloaded here.

First thing I noticed was missing BUILD_PREREQUIRES:

BUILD_PREREQUIRES="
	cmd:awk
	cmd:cmp
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:msgfmt
	"
1 Like

Is there a new release? The tags I used were too old and needed “libtoolize -fci” in the src directory.

EDIT, the 2.50 branch is OK, no need for libtoolize there.

Git repository contains the branch clisp-2.50 whose latest commit is 1 year old, compared with clisp-master with latest commit 3 month ago, So I think 2.50 release was about that time. I believe sourceforge page is not maintained since ~2010, but I can ask CLISP team of course.

1 Like

To call the devel packages (requirements), you call:

devel:libfoo$secondaryArchSuffix

Not:

lib:libfoo${secondaryArchSuffix}_devel

EDIT, don’t call runConfigure, it will error out on several options not being available, directories to set are prefix/bindir/datarootdir and docdir.

For config.lisp take a look here:

What name did you gave the recipe?

The 2.50 branch shows the wrong version in Terminal :slight_smile:

~> clisp
  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Welcome to GNU CLISP 2.49.92 (2018-02-18) <http://clisp.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992-1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2018

Type :h and hit Enter for context help.

[1]> 

On that note, in COPYRIGHT, don’t use the word “Copyright (c)”, use it like:

1992-1993 Bruno Haible, Michael Stoll

Oh, you are right @Begasus. So, the recipe name would be clisp-2.49.recipe, not clisp-2.50.recipe.

This was also suggestion from CLISP team. I prepared and sent them cfghaiku.lisp, which hopefully will be available soon.

1 Like

No :slight_smile: recipe should be named “clisp-2.50.recipe” as that is the source it’s pulling in (otherwise $portVersion would be wrong here).

On that note, last commit on that 2.50 has been from January last year, that is also imported (backported?) to the master branch, that since then seen several commits (master), so in my eyes master branch is more up to date then the 2.50 (outdated) one.

At repology there not that much 2.50 versions mentioned also. My 2 cents would go for the latest commit on master and use “clisp-2.49.93~git.recipe” as it’s name?

EDIT: I can’t seem to run any tests on the 2.50 archive, no matter what I tried, on the master commit the tests run fine?

It seems haikuporter starts doing something helpful (i.e. not only complains). The .hpkg built is way too small (837 bytes) and probably is empty (clisp executable alone is 20 KB). First, haikuporter cannot find the following inside BUILD_REQUIRES:

  • devel:ffcall$secondaryArchSuffix
  • devel:gettext_libintl$secondaryArchSuffix
  • devel:readline$secondaryArchSuffix
  • devel:ncurses6$secondaryArchSuffix

Inside BUILD_PREREQUIRES the following is not found:

  • cmd:msgfmt

Where these prerequirements come from?

The build seems to follow the full process however.

Can you elaborate on this? For now I just removed runConfigure and did nothing for setting prefix/bindir/datarootdir and docdir. Maybe this is the problem why the generated .hpkg is so small?

Package here is over 8MB

The recipe deffinitly needs those devel packages listed in BUILD_REQUIRES (you didn’t forget the ‘R’ in REQUIRES?)

cmd:msgfmt is part of the gettext base package, if not installed (which would supprise me) it should complain with an error, could you post that?

When using runConfigure you would get errors like these when the build starts:

./configure: invalid argument --sysconfdir=/packages/clisp-2.49.93~git-1/.settings

Sorry, it was a typo in my post (not in recipe). Otherwise other packages would not be find as well :slight_smile:

The .hpkg is indeed empty:

.

For now, the operational art of recipe is as following:

PROVIDES="
	clisp$secondaryArchSuffix = $portVersion
	cmd:clisp$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libsigsegv$secondaryArchSuffix
	#devel:ffcall$secondaryArchSuffix
	devel:libiconv$secondaryArchSuffix
	devel:libunistring$secondaryArchSuffix
	#devel:gettext_libintl$secondaryArchSuffix
	#devel:readline$secondaryArchSuffix
	#devel:ncurses6$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	cmd:awk
	cmd:cmp
	cmd:gcc$secondaryArchSuffix
	cmd:make
	#cmd:msgfmt
	"

BUILD()
{
	export FORCE_UNSAFE_CONFIGURE=1 # Haiku user has root privileges
	#cd clisp-clisp-$portVersion
	./configure \
		--with-included-regex \
		--prefix=/boot/home/config/non-packaged
	# TODO To patch src/config.lisp
	make
}

INSTALL()
{
	make install
	make distclean
}

TEST()
{
	make check-tests
	# make check-recompile # Probably not necessary
	# make check-sacla-tests # This seems to be helpful
	# make check-ansi-tests #Did not find it
}

Could you past your “current” recipe content somewhere like bpa.st again, could compare that then to what I already have, ps in my screenshot I saw that the manpages are installed in the wrong place, so probably need that to the list in BUILD also :slight_smile:

Latest content is here: View paste N5IRM.

Yours:

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libsigsegv$secondaryArchSuffix
	#devel:ffcall$secondaryArchSuffix
	devel:libiconv$secondaryArchSuffix
	devel:libunistring$secondaryArchSuffix
	#devel:gettext_libintl$secondaryArchSuffix
	#devel:readline$secondaryArchSuffix
	#devel:ncurses6$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	cmd:awk
	cmd:cmp
	cmd:gcc$secondaryArchSuffix
	cmd:make
	#cmd:msgfmt
	"

Mine:

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libffcall$secondaryArchSuffix
	devel:libiconv$secondaryArchSuffix
	devel:libintl$secondaryArchSuffix
	devel:libncurses$secondaryArchSuffix
	devel:libpcre$secondaryArchSuffix
	devel:libreadline$secondaryArchSuffix >= 8
	devel:libsigsegv$secondaryArchSuffix
	devel:libunistring$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:awk
	cmd:cmp
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:msgfmt
	"

EDIT: don’t use ~/config/non-packaged for prefix, use variable $prefix for this (this created a virtual /system directory/container where everything is installed in).

--prefix=$prefix

EDIT2: my test cases here:

TEST()
{
	# make check-recompile -Csrc
	# make check-fresh-line -Csrc
	# make check-script -Csrc
	# make check-tests -Csrc
	# make check-sacla-tests -Csrc
	make bench -Csrc
	# make extracheck -Csrc
}