Installing Bergman with CLisp 2.49.93+

Bergman is a noncommutative Groebner basis calculator. I encountered some strange problems while trying to install it and I thought I’d share my solutions in case anyone else has a similar problem.

First, the website that I linked has the software, but the links on the page don’t do anything when clicked. I had to right click on the link, copy it to my clipboard, paste it into my address bar, and hit enter.

I then started following this installation guide (although there area also some instructions that come with the download). I installed CLisp using my normal package manager, dnf (I am on Fedora 39), and it installed “CLisp 2.49.93+”, last updated in 2018. I then navigated to the scripts directory and executed mkbergman -auto. The output was:

Using Common Lisp command line: [/usr/bin/clisp]
Step 1 of 12: Setting the environment
Step 2 of 12: Checking CLISP version
The necessary version of CLISP is at least 2.39
You use version 2.49.93+ (2018-02-18) (built on 6fcfb74db1964280be7b7eea00fd3b5d [127.0.0.2])
*** - READ: input stream # has reached its end

Please upgrade your CLISP version at least to 2.39 (2006-07-16)

After poking around in the install script, I figured out that this error was generated by prelisp.lsp in the directory bergman1.001/auxil/clisp (replace bergman1.001 with whatever it was titled when you unzipped). This script checks the version number, and appears to not be able to deal with sub-version numbers (i.e., it would have worked if my CLisp version number was 2.49 but not if it’s 2.49.93 – I think the + also causes its own issue.) Rather than try to rewrite the regexp that checks version number, I just brute forced around this. Here’s how:

In the file prelisp.lsp, line 8 is version-string ((lisp-implementation-version))). Each time subsequently in the script when version-string is called, (lisp-implementation-version) is executed, so it doesn’t work to just set version-string equal to the string "2.39". Instead, I commented this line out, and found all subsequent calls to version-string throughout the file. These were on lines 11, 13, 24, and 26. I replaced version-string in each of these locations with the example given in the script of a version string produced by 2.39, specifically, I replaced it with this text:
"2.39 (2006-07-16) (built on stnt067 [192.168.0.1])".

After saving the file and rerunning the installation command mkbergman -auto from the scripts directory, everything installed just fine and calling bergman from Macaulay2 also worked fine.

Hope this helps someone!

Leave a Reply

Your email address will not be published. Required fields are marked *