freenode/#lisp - IRC Chatlog
Search
23:26:55
etimmons
There are really two ways to do it. There's supposedly a way to do it with the static shrinkwrapping recipe in the SBCL repo, but that does some low level assembly stuff and currently only works on amd64.
23:27:49
etimmons
I have also yet to get a good explanation from Doug Katzman on how to get rid of the requirement on libdl with that route (but it seems he/Google has a way)
23:29:07
etimmons
The second route is with my patches. They should work on any arch, but require two compilations of your code: one with a dynamic SBCL to record the needed foreign symbols, and then one with a static SBCL to dump the final executable
23:33:47
etimmons
Yes, I'm aware of that. I had some nasty recipes in the past that used that as a starting point.
23:34:53
etimmons
The issue is SBCL's linkage table. It records all the C addresses of the foreign symbols and uses dlopen/dlsym at runtime to populate it.
23:35:34
etimmons
I'm sure you could get the symbols needed for SBCL's runtime from sbcl.o, but that won't tell you what user code needs (if it uses CFFI)
23:38:03
etimmons
The shrinkwrapping recipe rewrites a core so that the system's dynamic linker populates the linkage table for SBCL at runtime. My set of patches instead generates a C file that needs to be compiled into the core. That's how I get away with doing this knowing ~zero assembly
23:39:57
ralt
phoe: what's "multi images"? https://mobile.twitter.com/peterseibel/status/1346226308506796034
23:42:27
etimmons
ralt: shameless self plug; if you're into Docker I maintain a set of Docker images for SBCL, including Alpine based ones. They used to be at daewok/sbcl, but I'm working with the CLF to move them to a more community owned space for longevity.
23:42:52
no-defun-allowed
Netfarm is for mostly-untrusted replicated object storage, and you do not want to use it for distributed computation. You want something more like lfarm for computing.
23:43:40
no-defun-allowed
Hey, same, the GitLab CI stuff aeth and I use uses daewok/lisp or something like that.
23:43:51
scymtym
phoe: interesting news indeed. i don't have a working twitter account, but i would suggest hyperlinking and syntax highlighting as in this example: https://techfak.de/~jmoringe/pcl-highlighting-example/12-they-called-it-lisp-for-a-reason-list-processing.html
23:46:25
no-defun-allowed
ralt: I seriously don't give a fuck, and I hope you don't act on that desire.
23:47:31
ralt
etimmons: anyway, I'm going away now, please look at your PMs, I sent you my email because I'll disconnect from irc, I really want static binaries :P
23:48:16
ralt
no-defun-allowed: by mainframe, I mean a "lisp process" that never dies, no matter what the underlying hardware does
1:24:30
fiddlerwoaroof
You have to build sbcl like this: https://github.com/fiddlerwoaroof/sbcl-workspace/blob/master/setup/build
1:25:17
fiddlerwoaroof
And then this will do the rest: https://github.com/fiddlerwoaroof/daydreamer/blob/master/build.lisp
1:26:00
fiddlerwoaroof
The only problem is that certain libraries insist on causing problems here: I go out of my way to avoid depending on osicat because of this
1:26:42
fiddlerwoaroof
Or, patch it something like this: https://gitlab.com/fiddlerwoaroof/osicat/-/commit/b56f924c5dafa92e6da1f2a91a6b7f133cbd69fa
3:54:50
fiddlerwoaroof
It sounds like a defconstant is being evaluated/compiled twice with values that aren't EQL
3:56:15
charles`
Yes it says constant NAME is being redefined from "string" to "string". I know it happens when I try to reevaluate the defconstant, but It sometimes happens after I restart the image
3:59:10
fiddlerwoaroof
It sounds like your startup sequence is evaluating a defconstant twice, but you aren't really providing enough context
8:08:39
ralt
fiddlerwoaroof: right. See linux-packaging for something that uses static-program-op, with osicat that is statically linked as well.
8:52:41
flip214
drmeister: at the end of https://drmeister.wordpress.com/2014/10/08/debugging-with-the-clasp-debugger/ you talk about generating dwarf data, but I can't find a follow-up post.
8:53:43
flip214
I'd like to generate dwarf output for function start/end addresses in SBCL, so that perf can report the stack correctly
10:42:20
ralt
etimmons: I managed to build a static binary with musl but yeah, I'm back to the issue with the foreign symbols that your patch should help with.
10:42:47
ralt
one annoying thing is that sbcl recently stopped building the sbcl.o file with the _main symbol, though, so I had to build it manually.