Good day Abu, list -
Thanks for PicoLisp, fast becoming my favorite scripting language!
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 :
$ llc --version
LLVM (http://llvm.org/):
LLVM version 12.0.1
...
and passes test suite : 'pil @lib/test.l +' OK, once the links
/usr/bin/{pil,picolisp} /usr/lib/picolisp are setup.
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
...
and I get build errors - after commenting out only '.SILENT' in Makefile :
$ make 2>&1 | tee make.log
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
opt: base.ll:1:1: error: expected top-level entity
source_filename = "base.l"
^
make: *** [base.bc] Error 1
yes, OK, I need to build a later LLVM & install in /usr/local/bin -
there is no pre-packaged build of a later LLVM available for CentOS EL7 AFAICS
.
What minimum LLVM version do you recommend ?
I guess LLVM 11 ?
But it would be nice if either the Makefile or 'INSTALL' had told me this!
The llvm version is not mentioned in INSTALL - it really should be!
Also, now the make has bombed out at that error, a 'make clean'
does not work - I have to remove 'pil21', and reinstall the source tar,
to get back to where I started from and reproduce the error, even
after 'make clean' .
So hence here is patch to Makefile to fix these issues - please
let me know best setting of $(MIN_LLVM_VERSION_RE) for this updated
Makefile.
Thanks & Best Regards,
Jason Vas Dias
Software Engineer, West Cork, Ireland
Makefile Patch:
3c3
< .SILENT:
---
> # .SILENT:
22a23,32
> MIN_LLVM_VERSION_RE:=^[1-9][0-9]\..*$$
>
> LLVM_VERSION:=$(strip $(shell $(LLC) --version | sed -rn '/^[[:space:]]+LLVM[[:space:]]+version[[:space:]]/{s/^[[:space:]]+LLVM[[:space:]]+version[[:space:]]+//;s/[[:space:]].*$$//;p}'))
>
> LLVM_VERSION_OK:=$(strip $(shell if [[ "$(LLVM_VERSION)" =~ $(MIN_LLVM_VERSION_RE) ]]; then echo -n OK; fi))
>
> ifneq ($(LLVM_VERSION_OK),OK)
> $(error Sorry, your LLVM version ($(LLVM_VERSION)) is not sufficient - it must match RE: '$(MIN_LLVM_VERSION_RE)'.)
> endif
>
88c98,99
< rm -f *.ll *.bc *.s
---
> set +f; rm -vf *.ll *.bc *.s $(BIN)/picolisp $(LIB)/sysdefs $(LIB)/ext.so $(LIB)/ht.so $(BIN)/balance $(BIN)/ssl $(BIN)/httpGate
>