Re: Compiling for containers

2016-12-14 Thread David Bloom
This is also my fault. That error message "java: not found" is really
stupid.
I've changed it to some better diagnostics.

- Alex


Don't be so hard on yourself.  I'd truly rather deal with a rare instance
of ambiguous error messages (but with help from the community) than all of
the other issues involved with our languages.  We're all grateful for your
work on and free license of picoLisp.

-David


Re: Compiling for containers

2016-12-13 Thread Alexander Burger
On Tue, Dec 13, 2016 at 07:18:11AM +0100, Alexander Burger wrote:
> Hi David,
> 
> > w.l sym.l subr.l big.l io.l db.l net.l err.l sys/x86-64.linux.code.l
> > ./ersatz/pil: exec: line 5: java: not found
> > Makefile:159: recipe for target 'x86-64.linux.base.s' failed
> > make: *** [x86-64.linux.base.s] Error 2
> 
> This is an indication that script 'src64/mkAsm' cannot find an executable
> picolisp binary to bootstrap the build.

This is also my fault. That error message "java: not found" is really stupid.
I've changed it to some better diagnostics.

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


Re: Compiling for containers

2016-12-13 Thread David Bloom
Thank you both Mr. Williams and Mr. Burger!  How noobish of me to miss the
bootstrap in the INSTALL...RTFM FTW.  Tinycore 64-bit picoLisp container
updated to 16.6 available with a simple:

docker pull docker-tinycore-picolisp

More directions available at:
https://hub.docker.com/r/progit/docker-tinycore-picolisp/

  I really love this community and language, thanks again for your help and
your patience.

All The Best,
David


Re: Compiling for containers

2016-12-12 Thread Alexander Burger
Hi David,

> w.l sym.l subr.l big.l io.l db.l net.l err.l sys/x86-64.linux.code.l
> ./ersatz/pil: exec: line 5: java: not found
> Makefile:159: recipe for target 'x86-64.linux.base.s' failed
> make: *** [x86-64.linux.base.s] Error 2

This is an indication that script 'src64/mkAsm' cannot find an executable
picolisp binary to bootstrap the build.

The solutions are either to build 32 bit first, install Java or download
pre-built *.s files. See the 'INSTALL' file.

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


Re: Compiling for containers

2016-12-12 Thread David Bloom
Hi Alexander and thanks for getting back to me so quickly.  In a 64-bit
Tinycore container  "tatsushid/tinycore 7.2-x86_64"
 I edited the Makefile line and tried without success.  Even after trying a
fresh download of the source and adding the "-nopie" to the appropriate
line (#71) I get:

/tmp $ cd picoLisp/src64/
/tmp/picoLisp/src64 $ vi Makefile
/tmp/picoLisp/src64 $ make
/mkAsm x86-64 ".linux" .s Linux base "" ../lib/map  version.l glob.l
main.l gc.l apply.l flo
w.l sym.l subr.l big.l io.l db.l net.l err.l sys/x86-64.linux.code.l
./ersatz/pil: exec: line 5: java: not found
Makefile:159: recipe for target 'x86-64.linux.base.s' failed
make: *** [x86-64.linux.base.s] Error 2

What do you make of this?

On Mon, Dec 12, 2016 at 6:35 AM, Alexander Williams 
wrote:

> Hi David,
>
> For the stubs-32.h thing.. typically on Debian you would need libc6-i386,
> but that isn't available for 64-bit TinyCore.
>
> For Alpine Linux, you should know that it uses musl not libc, so the
> PicoLisp binary will NOT run on TinyCore if you build it on Alpine (unless
> you have musl.so on Debian..ugh?). To compile/link on Alpine with musl,
> similarly to TinyCore, you'll need to use the 64-bit OS (it exists) for the
> 64-bit binary, and the 32-bit OS for the 32-bit binary.
>
> Anyways for musl (Alpine Linux), just add '-nopie' option to the build
> options in src64/Makefile, ex:
>
> LD-MAIN = -Wl,--no-as-needed -rdynamic -lc -lm -ldl -nopie
>
> That's literally all I changed to compile picoLisp 64-bit on Alpine Linux
> 64-bit. Probably the same option for 32-bit.. let me know ;)
>
> Good luck!
>
>
> AW
> *https://aw.github.io/picolisp *
>
>
> On Sun, Dec 11, 2016 at 5:41 PM, David Bloom  wrote:
>
>> Hello list.  I should have come here sooner looking for someone with more
>> C compiling experience than I have.  I used to compile picoLisp in a
>> Tinycore linux container with ease following these steps:
>>
>> - tce-load compiletc  (this adds gcc, make, etc. so we can compile)
>> - copy picolisp source tarball into container
>> - compile PicoLisp
>> - remove build files
>> - tce-audit builddb
>> - tce-audit delete compiletc
>>
>> A Dockerfile would then copy in the pre-compiled picolisp, add
>> appropriate links for global installation resulting in a tidy, small image.
>>
>> For some time now, following the same process I get this:
>>
>> /tmp/picoLisp/src $ cd ../src64/
>> /tmp/picoLisp/src64 $ make
>> ./mkAsm x86-64 ".linux" .s Linux base "" ../lib/map  version.l glob.l
>> main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l
>> sys/x86-64.linux.code.l
>> ../ersatz/pil: exec: line 5: java: not found
>> Makefile:159: recipe for target 'x86-64.linux.base.s' failed
>> make: *** [x86-64.linux.base.s] Error 2
>>
>> And this
>>
>> /tmp $ cd picoLisp/src
>> /tmp/picoLisp/src $ make
>> gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer
>> -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat
>> -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE  -D_FILE_OFFS
>> ET_BITS=64 -m32 -D_OS='"Linux"' main.c
>> In file included from /usr/include/features.h:389:0,
>> from /usr/include/stdio.h:27,
>> from pico.h:5,
>> from main.c:5:
>> /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file
>> or directory
>> compilation terminated.
>> Makefile:129: recipe for target 'main.o' failed
>> make: *** [main.o] Error 1
>> /tmp/picoLisp/src $
>>
>> A cursory search led to missing 32-bit libraries in the 64-bit Tinycore
>> image.  No big deal, what if I tried in a Alpine linux container (only
>> 32-bit but small and gaining popularity) similarly:
>>
>> https://jpst.it/QgPQ (Using a paste service due to verbose output)
>>
>> picolisp compiles easily on Netrunner (based on Manjaro based on Arch)
>> which I'm typing this from.  Any C gurus that can make more sense of this
>> is greatly appreciated.  Thanks for reading my short novel and any pointers.
>>
>> -David
>>
>
>


Re: Compiling for containers

2016-12-12 Thread Alexander Williams
Hi David,

For the stubs-32.h thing.. typically on Debian you would need libc6-i386,
but that isn't available for 64-bit TinyCore.

For Alpine Linux, you should know that it uses musl not libc, so the
PicoLisp binary will NOT run on TinyCore if you build it on Alpine (unless
you have musl.so on Debian..ugh?). To compile/link on Alpine with musl,
similarly to TinyCore, you'll need to use the 64-bit OS (it exists) for the
64-bit binary, and the 32-bit OS for the 32-bit binary.

Anyways for musl (Alpine Linux), just add '-nopie' option to the build
options in src64/Makefile, ex:

LD-MAIN = -Wl,--no-as-needed -rdynamic -lc -lm -ldl -nopie

That's literally all I changed to compile picoLisp 64-bit on Alpine Linux
64-bit. Probably the same option for 32-bit.. let me know ;)

Good luck!


AW
*https://aw.github.io/picolisp *


On Sun, Dec 11, 2016 at 5:41 PM, David Bloom  wrote:

> Hello list.  I should have come here sooner looking for someone with more
> C compiling experience than I have.  I used to compile picoLisp in a
> Tinycore linux container with ease following these steps:
>
> - tce-load compiletc  (this adds gcc, make, etc. so we can compile)
> - copy picolisp source tarball into container
> - compile PicoLisp
> - remove build files
> - tce-audit builddb
> - tce-audit delete compiletc
>
> A Dockerfile would then copy in the pre-compiled picolisp, add appropriate
> links for global installation resulting in a tidy, small image.
>
> For some time now, following the same process I get this:
>
> /tmp/picoLisp/src $ cd ../src64/
> /tmp/picoLisp/src64 $ make
> ./mkAsm x86-64 ".linux" .s Linux base "" ../lib/map  version.l glob.l
> main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l
> sys/x86-64.linux.code.l
> ../ersatz/pil: exec: line 5: java: not found
> Makefile:159: recipe for target 'x86-64.linux.base.s' failed
> make: *** [x86-64.linux.base.s] Error 2
>
> And this
>
> /tmp $ cd picoLisp/src
> /tmp/picoLisp/src $ make
> gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer
> -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat
> -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE  -D_FILE_OFFS
> ET_BITS=64 -m32 -D_OS='"Linux"' main.c
> In file included from /usr/include/features.h:389:0,
> from /usr/include/stdio.h:27,
> from pico.h:5,
> from main.c:5:
> /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file
> or directory
> compilation terminated.
> Makefile:129: recipe for target 'main.o' failed
> make: *** [main.o] Error 1
> /tmp/picoLisp/src $
>
> A cursory search led to missing 32-bit libraries in the 64-bit Tinycore
> image.  No big deal, what if I tried in a Alpine linux container (only
> 32-bit but small and gaining popularity) similarly:
>
> https://jpst.it/QgPQ (Using a paste service due to verbose output)
>
> picolisp compiles easily on Netrunner (based on Manjaro based on Arch)
> which I'm typing this from.  Any C gurus that can make more sense of this
> is greatly appreciated.  Thanks for reading my short novel and any pointers.
>
> -David
>


Compiling for containers

2016-12-11 Thread David Bloom
Hello list.  I should have come here sooner looking for someone with more C
compiling experience than I have.  I used to compile picoLisp in a Tinycore
linux container with ease following these steps:

- tce-load compiletc  (this adds gcc, make, etc. so we can compile)
- copy picolisp source tarball into container
- compile PicoLisp
- remove build files
- tce-audit builddb
- tce-audit delete compiletc

A Dockerfile would then copy in the pre-compiled picolisp, add appropriate
links for global installation resulting in a tidy, small image.

For some time now, following the same process I get this:

/tmp/picoLisp/src $ cd ../src64/
/tmp/picoLisp/src64 $ make
/mkAsm x86-64 ".linux" .s Linux base "" ../lib/map  version.l glob.l
main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l
sys/x86-64.linux.code.l
./ersatz/pil: exec: line 5: java: not found
Makefile:159: recipe for target 'x86-64.linux.base.s' failed
make: *** [x86-64.linux.base.s] Error 2

And this

/tmp $ cd picoLisp/src
/tmp/picoLisp/src $ make
gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer
-fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat
-Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE  -D_FILE_OFFS
ET_BITS=64 -m32 -D_OS='"Linux"' main.c
In file included from /usr/include/features.h:389:0,
from /usr/include/stdio.h:27,
from pico.h:5,
from main.c:5:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or
directory
compilation terminated.
Makefile:129: recipe for target 'main.o' failed
make: *** [main.o] Error 1
/tmp/picoLisp/src $

A cursory search led to missing 32-bit libraries in the 64-bit Tinycore
image.  No big deal, what if I tried in a Alpine linux container (only
32-bit but small and gaining popularity) similarly:

https://jpst.it/QgPQ (Using a paste service due to verbose output)

picolisp compiles easily on Netrunner (based on Manjaro based on Arch)
which I'm typing this from.  Any C gurus that can make more sense of this
is greatly appreciated.  Thanks for reading my short novel and any pointers.

-David