lem icon indicating copy to clipboard operation
lem copied to clipboard

Remove binary files

Open mldulaney opened this issue 5 months ago • 4 comments

Open source software should, by definition, not be distributing binary files. Given the xz backdoor, these increase distrust.

mldulaney avatar Sep 18 '25 17:09 mldulaney

Hello there, fellow Gentoo stage 1 user?

psionic-k avatar Sep 19 '25 00:09 psionic-k

thanks, we will merge this.

I'll wait a bit and look at our options to automate the build.

(Anyone is welcome to help)

vindarel avatar Sep 19 '25 15:09 vindarel

thanks, we will merge this.

I'll wait a bit and look at our options to automate the build.

(Anyone is welcome to help)

hi, how are these binaries built? i'd be happy to help set them up to build with the rest of lem at build time

mldulaney avatar Sep 20 '25 11:09 mldulaney

@mldulaney hey thanks for proposing.

Here's a lisp snippet that builds the binary:

;; thanks to April & May on Discord
(let* ((source (asdf:system-relative-pathname :lem-terminal "terminal.c"))
       (lib (asdf:system-relative-pathname
             :lem-terminal (format nil
                                   "~(lib/~A/~A/terminal.so~)"
                                   (uiop:operating-system)
                                   (uiop:architecture)))))
  (unless (probe-file lib)
    (ensure-directories-exist lib)
    #+darwin
    (uiop:run-program (format nil "cc ~A -I/opt/homebrew/include -L/opt/homebrew/lib -lvterm -o ~A -shared -fPIC" 
                              source lib))
    #-darwin
    (uiop:run-program (format nil "cc ~A -lvterm -o ~A -shared -fPIC" source lib))))

(it fails on my machine so it's a bit more difficult to test for me)

Example invocation:

cc /home/vindarel/lisp-projects/lem/extensions/terminal/terminal.c -lvterm -o /home/vindarel/lisp-projects/lem/extensions/terminal/lib/linux/x64/terminal.so -shared -fPIC

terminal.c:297:34: error: ‘VTermScreenCellAttrs’ has no member named ‘conceal’
  297 |   return terminal->lastCell.attrs.conceal;
[…]

vindarel avatar Oct 14 '25 16:10 vindarel