Re: pil21 on macOS Catalina

2020-02-18 Thread Alexander Burger
On Tue, Feb 18, 2020 at 08:53:40PM +0900, Makoto Kimura wrote:
> ... in the Apple world.  Though I didn’t do much, I’ll just describe what I 
> did:

Cool! Thanks a lot Mak!

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


pil21 on macOS Catalina

2020-02-18 Thread Makoto Kimura
Hi guys,

Alex want me to share my experience with pil21 on macOS to this list, and he 
says this is the first version of pil21 in the Apple world.  Though I didn’t do 
much, I’ll just describe what I did:

On my MacBook Pro (Retina, 15-inch, Mid 2014) running macOS Catalina (Version 
10.15.3) with up-to-date homebrew,

(1) Simply grabbed his archive and untarred it somewhere:

$ wget https://software-lab.de/pil21.tgz

(2) Installed clang, llvm, pkg-config

$ brew install clang llvm pkg-config

(3) Installed libffi from its source code, because my brew doesn’t seem to know 
about it:

$ git clone https://github.com/libffi/libffi.git
$ cd libffi
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

Note: I tried,
$ brew install libffi
later again, and it seems to work.  I don’t know why...


(4) Follwing his advice, I modified pil21/src/Makefile to avoid build error on 
exp.so:

all: $(BIN)/picolisp # $(LIB)/ext.so

According to Alex, this shared library is used only when called from 
applications.

(5) Then just built pil21:

$ cd pil21/src
$ make

(6) Tested bin/picolisp:

$ ../bin/picolisp
: (+ 1 2 3)   
-> 6
: (de fib (n) (if (>= n 2) (+ (fib (- n 1)) (fib (- n 2))) 1))
-> fib
: (fib 22)
-> 28657

FYI, I tried two different clangs and both seem to produce working picolisp:

(1) clang installed by homebrew (brew install clang)
clang version 9.0.1 
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

(2) clang bundled with Xcode Version 11.3.1 (11C504)
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

That’s almost all I did.
I might try pil21 on iOS, though it’s a whole different story.

Cheers,

__Mak


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Subscribe

2020-02-18 Thread Makoto Kimura
Hello Makoto Kimura  :-)
You are now subscribed



-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe