Lisp-Stat / cephes.cl

Wrapper for the Cephes Mathematical Library
https://lisp-stat.github.io/cephes.cl/
Microsoft Public License
15 stars 3 forks source link

The Makefile seems to have an incomplete list of dependencies #3

Closed foretspaisibles closed 1 year ago

foretspaisibles commented 1 year ago

After updating my system, CEPHES stopped to load. The probable reason is that the Makefile has an incomplete list of dependencies and will not rebuild when the limbd headers change.

I am not sure how to address that, especially with GNU Make.

System description:

Uname: Darwin
System: macOS 13.4
Architecture: arm64
Date: Tue Jun  6 21:39:49 CEST 2023
SBCL: /opt/local/bin/sbcl (SBCL 2.3.5)
Brew: :NOT-FOUND
MacPorts: /opt/local/bin/port
QuickLisp: T
snunez1 commented 1 year ago

On Mac and MS Windows, you shouldn't have to build the library, as one is included in the source directory. The ASDF system file should automatically load the binary when you load the system. If you want to change the header file, you'll need a working compiler toolchain for the platform.

What changes do you need to make to the header?

foretspaisibles commented 1 year ago

I was just wild guessing that the header library changed after upgrading the library (that's a typical miss-to-rebuild condition in Makefiles). I will have another look to understand what's happening.

What's the rationale behind shipping a pre-built library? I did not notice, because of the Makefile and has a lot of implications for users — many are not too happy running binary blobs they did not produce themselves, or not coming from institutional repositories.

I have so far not been working very deeply with ASDF build capabilities specifically and with shipping software for Common Lisp generally, so I must confess I do not have any profound thoughts to share here.

snunez1 commented 1 year ago

MS Windows and Mac users typically don't have compiler tools chains, and if they do there's too many variations for an auto-build system, at least a common lisp based one, so we include it.

Running binary blobs from ASDF isn't any more dangerous than using ASDF to load files; anything you can do from the binary you can do from lisp (or a binary fasl). I wish there was an easier auto-build for Windows and Mac, but in order to keep everything in sync it's easier just to ship a binary.

foretspaisibles commented 1 year ago

Actually pre-built binaries are a bit different because consumers cannot verify that they were produced the way they seem to. (Reproducible builds are not the norm.)

I was not able to reproduce the error in my case, and since I do not have a clear idea if what could be an undeniable improvement I'm fine with closing the issue, what do you think?

Maybe suggesting to rebuild the library if it does not load would be useful? In the error message or the restarts?

snunez1 commented 1 year ago

It will almost certainly load if found. The failure would happen at run time when a function is called. Whilst no doubt we could find a better way, it's probably not worth the bandwidth right now compared to raising an issue and we help them through it. I'll close, and thanks for the comments.