So finally I got llvm-9.0.1 built on CentOS-7, and installed under
/usr/local, with $PATH set to /usr/local/bin:/usr/bin and
LD_LIBRARY_PATH set to /usr/local/lib, only to discover that
a more recent version of readline-devel is required:

    $ make
    clang -w -D_OS='"Linux"' -D_CPU='"x86_64"' sysdefs.c  &&  ./a.out > 
../lib/sysdefs  &&  rm ./a.out
    opt -O3   -o base.bc base.ll
    clang -O3 -w -c -D_OS='"Linux"' -D_CPU='"x86_64"' `pkg-config --cflags 
libffi` -emit-llvm lib.c
    lib.c:121:4: error: use of undeclared identifier 'rl_input_available_hook'
    rl_input_available_hook = rlAvail;
    ^
    1 error generated.

You do mention readline-dev in INSTALL:
    INSTALL:   $ sudo apt install make clang llvm libreadline-dev libffi-dev 
libssl-dev pkg-config
but again not which version :-( .

Then I needed to build Clang 9.0.1 against the new LLVM 9.0.1 - it
does help if they are the same version !
 
So next I needed to build latest readline (8.1) under /usr/local too -
there needs to be a check for readline, openssl, and llvm / clang in
Makefile - I've added these to attached Makefile .

But now 'pil @lib/test.l +' works fine under CentOS 7 too!

Thanks, All the best,
Jason

Attachment: Makefile
Description: pil21 src/Makefile with version checking


On 13/11/2021, Alexander Burger <a...@software-lab.de> wrote:
> Hi Jason,
> 
>>  Thanks for PicoLisp, fast becoming my favorite scripting language!
> 
> Thank you! I'm glad to hear that :)
> 
> 
>>  Re: Latest pil21.tgz -
>>  It builds fine for me on my Fedora 34 Dell XPS 915 x86_64 3.8Ghz 12-core
>> laptop, with llvm version :
>>  ...
>>    LLVM version 12.0.1
> 
> OK
> 
> 
>>  Now I'd like to use it on a work machine, which is Centos RHEL7 8-core
>> 4Ghz intel box :
>>  $ llc --version
>>   LLVM (http://llvm.org/):
>>   LLVM version 3.4.2
>>  ...
>>  What minimum LLVM version do you recommend ?
> 
> As Mike Pechkin wrote, at least 7 is needed.
> 
> 
>>  The llvm version is not mentioned in INSTALL - it really should be!
> 
> You are right. But on the other hand, this problem will soon time out.
> Let's
> write it in the future, once a higher version should be necessary.
> 
> ☺/ A!ex
> 
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to