Greetings,
I am too lazy to do bare metal, but found a very light weight Linux distro which uses Musl and Busybox. Thought was to get basic port up using XFCE desktop then switch to direct framebuffer and not use the desktop. Let someone else do usb and net drivers et al.
Unfortunately, I gave away all my C references and it has been a couple of decades since I did anything serious in C.
I added -D_GNU_SOURCES to the CFLAGS but am getting a wierd (to me) error.
Apparently FILE is #defined as some kind of opaque type?
Anyway, breakage in platforms/Cross/vm/sqVirtualMachine.c
for pushOutputFile()
Can some kind soul help me out with a workaround for this?
Thanks a bunch! -KenD
On 03/12/19 3:50 AM, ken.dickey@whidbey.com wrote:
^ /home/kend/Opensmalltalk-vm/platforms/Cross/vm/sqVirtualMachine.c: At top level: /home/kend/Opensmalltalk-vm/platforms/Cross/vm/sqVirtualMachine.c:555:13: error: array type has incomplete element type 'FILE' {aka 'struct _IO_FILE'} static FILE stdoutStack[STDOUT_STACK_SZ];
ostvm code compiles with gcc/glibc but may need tweaking for musl. See
https://www.musl-libc.org/faq.html (from "Is musl compatible with glibc")
FILE is a type defined in stdio.h and its structure in libio.h. stdio.h is so basic that I am surprised it is not being picked up. Are you able to compile and run hello world example on this distro?
Regards .. Subbu
On Mon, Dec 02, 2019 at 02:20:08PM -0800, ken.dickey@whidbey.com wrote:
I am too lazy to do bare metal, but found a very light weight Linux distro which uses Musl and Busybox.
I've built pharo.cog.spur.minheadless on Alpine Linux x86_64. Check out https://github.com/PierceNg/opensmalltalk-vm/tree/pierce_alpine. This is using the cmake build system.
And these are the pre-requisite packages:
build-base git bash perl curl linux-headers libexecinfo-dev util-linux-dev cmake clang clang-dev
I'm using this to work towards the smallest possible Docker image for Pharo for running headless, batch and server-side applications: https://github.com/pharo-contributions/Docker-Alpine
Pierce
hi Ken,
On Mon, Dec 2, 2019 at 2:21 PM ken.dickey@whidbey.com wrote:
Greetings,
I am too lazy to do bare metal, but found a very light weight Linux distro which uses Musl and Busybox. Thought was to get basic port up using XFCE desktop then switch to direct framebuffer and not use the desktop. Let someone else do usb and net drivers et al.
Unfortunately, I gave away all my C references and it has been a couple of decades since I did anything serious in C.
I added -D_GNU_SOURCES to the CFLAGS but am getting a wierd (to me) error.
Apparently FILE is #defined as some kind of opaque type?
Anyway, breakage in platforms/Cross/vm/sqVirtualMachine.c
for pushOutputFile()
Can some kind soul help me out with a workaround for this?
I would try two things. One is to find out where FILE is defined by searching the system's include files. There has to be some kind of definition because e.g. open answers a FILE *. So one /has/ to be able to write e.g. FILE *f = open("foo.txt",...
and that's all the code is doing, trying to declare a small array of FILE *'s.
The second thing would be to commit a change to swVirtualMachine.c which simply ifdef's out push/popOutputFile if some manifest constant, such as CANT_USE_FILE_STAR or DONT_USE_FILE_STAR is defined in the makefile (so that files are compiled with -DDONT_USE_FILE_STAR=1 or some such).
Thanks a bunch! -KenD
Hi Ken,
oops. Ignore the part about having to be able to declare FILE *. I wasn't understanding. Just develop the work around.
On Mon, Dec 2, 2019 at 2:21 PM ken.dickey@whidbey.com wrote:
Greetings,
I am too lazy to do bare metal, but found a very light weight Linux distro which uses Musl and Busybox. Thought was to get basic port up using XFCE desktop then switch to direct framebuffer and not use the desktop. Let someone else do usb and net drivers et al.
Unfortunately, I gave away all my C references and it has been a couple of decades since I did anything serious in C.
I added -D_GNU_SOURCES to the CFLAGS but am getting a wierd (to me) error.
Apparently FILE is #defined as some kind of opaque type?
Anyway, breakage in platforms/Cross/vm/sqVirtualMachine.c
for pushOutputFile()
Can some kind soul help me out with a workaround for this?
Thanks a bunch! -KenD
vm-dev@lists.squeakfoundation.org