Installing z88dk via Snap-Store on Raspberry Pi 32bit Legacy ( Pi 2B+ )

Problems installing on other platforms
Post Reply
Zetr0
Member
Posts: 63
Joined: Mon Aug 22, 2011 12:38 pm

Installing z88dk via Snap-Store on Raspberry Pi 32bit Legacy ( Pi 2B+ )

Post by Zetr0 »

Greeting fellow z88dk'ers

Yes I know the title reads as though I am somewhat of a masochist, and while this might be true, it does have a reason... I promise...

Recently refreshing an old build of my Pi 2B+ - despite all of the SBC's I have this one kinda... well calls me... even if I have a Zero 2 / +3A / CM4 / Pi 400 and Radxa CM3 as well as an incomming Pi 5 in the next couple of weeks.... this Pi 2B+ .... Quad Core Arm v7 .... 1gb ram... theres just something...

Anyway I have been refreshing the OS / Apps on the device and upgrading to a 64GB card - however... upon installing NeoFetch / Fuse and Snap Store... there seems to be a problem when installing Z88dk from the Snap-Store - in that when I attempt to compile an existing / hello world project - I am met with a clueless bash that doesn't know anything about ZCC

Code: Select all

zetr0@raspberrypi:~ $ zcc
bash: zcc: command not found
tried

Code: Select all

export PATH=${PATH}:${HOME}/z88dk/bin
export ZCCCFG=${HOME}/z88dk/lib/config
sadly, made no difference

Figured it was a snap-store issue and decided to "wget" and compile it on the Pi - I followed these ( probably out of date instructions )
https://www.retrocompute.co.uk/compilin ... pberry-pi/

And it terminated with an error during compilation

Code: Select all

gcc -g -O2 -Wall -std=gnu11 -MMD -pedantic -I../common    -c -o ti8xk.o ti8xk.c
ti8xk.c:20:10: fatal error: gmp.h: no such file or directory
    20 | #include <gmp.h> // not much you can do about he GNU multi-percision library  

compilation terminated
interestingly I have this working on my old uSD card with codium (vs Code ) and fuse spectrum emulator... so I know its possible so - what have I done wrong... or is there something else at play....

Any ideas as to how to get this to work again would be appreciated...... this something about setting up a Dev Environment on an SBC...

Thanks for reading.
User avatar
dom
Well known member
Posts: 2317
Joined: Sun Jul 15, 2007 10:01 pm

Re: Installing z88dk via Snap-Store on Raspberry Pi 32bit Legacy ( Pi 2B+ )

Post by dom »

I've just checked and the snap build has been broken for a while due to the same problem you ran into when compiling! I've pushed a fix which should clear it up. However, I do think there might be a test failure on armhf so even after that push it may not be up-to-date.

Snap commands are namespaced so you have to setup some aliases, details here: https://github.com/z88dk/z88dk/wiki/Snap-usage

Dependencies for building from source are here: https://github.com/z88dk/z88dk/wiki/installation - the one you're missing is libgmp3-dev
Zetr0
Member
Posts: 63
Joined: Mon Aug 22, 2011 12:38 pm

Re: Installing z88dk via Snap-Store on Raspberry Pi 32bit Legacy ( Pi 2B+ )

Post by Zetr0 »

Thanks for the reply DOM,

As with all things you truly are a Hero!

I started a new Raspbian OS 32bit (legacy) on a uSD card - and installed SNAP / SNAP-STORE, then Fuse and finally I then installed the SNAP store --edge z88dk

setup the Assigns as linked in your post, and then the libraries linked in the post as well...

wrote a very quick hello world

Code: Select all

#include <stdio.h>


int main ( void )
{
	printf(" Greetings out there ");
	
	return 0;
}

I hit the compile line with a make script of

Code: Select all

#!/bin/bash
z88dk.zcc +zx -lp3 -DPLUS3 -lm -create-app hello.c > build.txt
and was presented with

Code: Select all

zetr0@raspberrypi:~/code/projects/hello $ ./make.sh
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
LOL, there was a lot "ignored" ERROR: ld.so objects

However it did create a BIN and TAP file - so I loaded them up into Fuse .... and they worked!!!!!!

So now I am wondering what is wrong, perhaps missing with the Raspbian install
Post Reply