Better Linux Install Experience?

Problems installing on other platforms
Post Reply
Timmy
Member
Posts: 135
Joined: Sat Mar 10, 2012 4:18 pm

Better Linux Install Experience?

Post by Timmy »

Well, it seems my posts was missing in migration, so I decided to make a new topic instead. :cool:

Anyway, I was trying to get more people on WoS* to play more with z88dk, and I got a reaction that z88dk is very user-unfriendly to install on Linux.

So I tried this on my old, slow, and not a lot of internet, formerly vista, but now linux computer, and see how it works.

And it got stopped at a point where the installation asks to be online to access the sdcc svn server.

Is there anyway to just download that part in advance so that I don't have to do this on my old computer? My poor computer can't handle such a large slow download and I don't really want it to be online.

I don't even use the sdcc part, so if I can skip it altogether, that's fine too.

Also, any chance to add a test to detect the wrong z80asm program if someone has it installed and then tell the user to change it?

Maybe a binary version too, but I think I'd rather build myself. The Windows version is just so much easier to work with.

*Anyway, here's the link on WoS: https://worldofspectrum.org/forums/disc ... rial-z88dk (don't mind the poor quality code, i might fix it later)
User avatar
dom
Well known member
Posts: 1188
Joined: Sun Jul 15, 2007 10:01 pm

Re: Better Linux Install Experience?

Post by dom »

Thanks Timmy - I'm glad you've posted, sorry that your posts went missing - I took a snapshot of the db on Monday since it all seemed quiet. Hopefully there's not too much else missing.

The sdcc bit: Paulo did some tweaks a few weeks ago: https://github.com/z88dk/z88dk/pull/1562 so by default it won't compile sdcc so that one is already sorted! If you're running from the last release, the easiest thing to do is to "touch bin/zsdcc" which will prevent it from being built.

The wrong z80asm issue is a bit of a pain and I've come across it a few times, the "best" fix would be to rename z80asm to z88dk-z80asm as I did for quite a few of the other tools, however doing that will probably break quite a few 3rd party build scripts. So we're left with a couple of other solutions:

1. Do a check for the right z80asm as you suggest
2. Create a wrapper script z88dk-z80asm which then invokes z80asm in the same directory (only on unix)

I think 2. gets the best of both worlds: if you're invoking directly then you should know what z80asm is in your path, and if you're not then it's transparently handled for you.

Regarding binaries, I suppose these days creating a snap is the best way to do this? I'd need to look into the steps needed though and whether I can outsource the building/storage to something I don't have to pay for - I've got 221gb of nightly builds stored on the build machine.

On the other hand, a docker image is produced nightly: https://hub.docker.com/r/z88dk/z88dk (instructions here: https://github.com/z88dk/z88dk/wiki/Docker-Usage) which might be a good stop-gap or alternative.
Timmy
Member
Posts: 135
Joined: Sat Mar 10, 2012 4:18 pm

Re: Better Linux Install Experience?

Post by Timmy »

No problem, it's definitely different although it seems I can't change the colours on this new forums. (I used to have a different stylesheet when logged in, to remind me that I have been logged in on the forums.)

But erm, I think I got a lot further now with my build, using "touch bin/sdcc".

It now ends with:

Code: Select all

make -C testsuite
make[1]: Entering directory `/root/z88dk/testsuite'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/z88dk/testsuite'
make: Entering directory `/root/z88dk/libsrc'
/bin/sh: line 2: @make: command not found
/bin/sh: line 2: @make: command not found
/bin/sh: line 2: @make: command not found
/bin/sh: line 2: @make: command not found
make[1]: *** [subdirs-clean] Error 127
make: *** [classic-clean] Error 2
make: Leaving directory `/root/z88dk/libsrc'
I can build dstar (i think, for the spectrum) but not the program i wrote earlier, with these errors:

Code: Select all

Error at file 'zx_screenstr_callee.asm' line 35: symbol 'zx_cyx2saddr_callee' not defined
Error at file 'zx_screenstr_callee.asm' line 35: symbol 'ASMDISP_ZX_CYX2SADDR_CALLEE' not defined
Errors in source file /root/z88dk/lib/config/../..//lib/target/zx/classic/spec_crt0.asm:
Error at file 'zx_screenstr_callee.asm' line 35: symbol 'zx_cyx2saddr_callee' not defined
Error at file 'zx_screenstr_callee.asm' line 35: symbol 'ASMDISP_ZX_CYX2SADDR_CALLEE' not defined
I think I am still missing some stuff. But I have no clue what is missing.
I have tried building some system specific libraries after that (i don't need most of the other systems like aquarius) but I still got this error. Maybe I have to build all of them but I feel like that takes a while, and it was 3AM in the morning, so I didn't try.

Your question on binaries/snap, I must say I have no answer for you (yet).
And as for z88dk-z80asm... I do see a lot of other z88dk- prefixed binaries in the bin directory.
User avatar
dom
Well known member
Posts: 1188
Joined: Sun Jul 15, 2007 10:01 pm

Re: Better Linux Install Experience?

Post by dom »

I've no idea at this point what's going on with your build - it looks like a bit of the makefile is being treated as a shell script but I've no idea what part of clean is causing it.

So, back to basics! What Linux are you running and did you install the prequisites here: https://github.com/z88dk/z88dk/wiki/ins ... inux--unix

The linking error is a "me" problem, a while back I switched from the classic ZX screen routines to the newlib ones. Unfortunately the xy coordinates are swapped round in newlib so the assembler written zx_screenstr didn't pick up the macro fudge. I'll fix it up.

With regard to the binary question, it looks like snapcraft will build and host automatically when I set up the project so I'll spend some time figuring out the syntax and setup.
Timmy
Member
Posts: 135
Joined: Sat Mar 10, 2012 4:18 pm

Re: Better Linux Install Experience?

Post by Timmy »

Lemme see... I've installed most of it, except sdcc of course. Today I've also installed everything (still except sdcc) but now also with libboost (which is just a huge install but doesn't seem to do anything).

The installation still got stuck there.

With the "build.sh -k" option I've installed everything now.

There were still some stuff like:

Code: Select all

--- Building Gameboy Library ---

make[1]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
TARGET=gb TYPE=gbz80 z80asm -d -I/root/z88dk/lib/config//../ -mgbz80 -DFORgb -DSTANDARDESCAPECHARS -x/root/z88dk/libsrc//gb_clib @./gb.lst

--- Building Hübler/Evert-MC Library ---

make[1]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
TARGET=hemc TYPE=z80 z80asm -d -I/root/z88dk/lib/config//../ -DSTANDARDESCAPECHARS -DFORhemc -x/root/z88dk/libsrc//hemc_clib @./hemc.lst
But that might be because I don't have sdcc installed.

As for the other problem, zx_screenstr() seems to work now.
But, functions using zx_cyx2saddr() are not working well any more.

This means that all of the old spectrum codes that used to use zx_cyx2saddr() (and other similar functions) are now obsolete (and broken).
I understand that it's an interesting idea. But all the documentation still use the old functions.
I feel like this is a big change, and it probably means that I have to rewrite my code examples to have my own version of zx_cyx2saddr() code instead.
Because it seems easier for me to support a tutorial that doesn't have to depend on the nightly version before or after september 2020.

Still, I'm glad that I managed to install it now, even if it was a bit complcated. :)
User avatar
dom
Well known member
Posts: 1188
Joined: Sun Jul 15, 2007 10:01 pm

Re: Better Linux Install Experience?

Post by dom »

Timmy wrote: Mon Sep 21, 2020 5:19 pm Lemme see... I've installed most of it, except sdcc of course. Today I've also installed everything (still except sdcc) but now also with libboost (which is just a huge install but doesn't seem to do anything).
Yeah, boost is just needed for sdcc so no problems.
The installation still got stuck there.
What version of Linux are you using? The build machines are obviously Linux based and run through the same script so I'm going to need to reproduce from the start.
There were still some stuff like:

Code: Select all

--- Building Gameboy Library ---

make[1]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
TARGET=gb TYPE=gbz80 z80asm -d -I/root/z88dk/lib/config//../ -mgbz80 -DFORgb -DSTANDARDESCAPECHARS -x/root/z88dk/libsrc//gb_clib @./gb.lst
That's good stuff - libraries building! So no problems there.
As for the other problem, zx_screenstr() seems to work now.
But, functions using zx_cyx2saddr() are not working well any more.

This means that all of the old spectrum codes that used to use zx_cyx2saddr() (and other similar functions) are now obsolete (and broken).
I understand that it's an interesting idea. But all the documentation still use the old functions.
I feel like this is a big change, and it probably means that I have to rewrite my code examples to have my own version of zx_cyx2saddr() code instead.
Because it seems easier for me to support a tutorial that doesn't have to depend on the nightly version before or after september 2020.
No, it's a cock-up, the compatibility #define had the arguments reversed, just for that function! The intention wasn't to break anything or cause any compatibility issues, just to reduce duplicate code.
Timmy
Member
Posts: 135
Joined: Sat Mar 10, 2012 4:18 pm

Re: Better Linux Install Experience?

Post by Timmy »

dom wrote: Mon Sep 21, 2020 5:52 pm
The installation still got stuck there.
What version of Linux are you using? The build machines are obviously Linux based and run through the same script so I'm going to need to reproduce from the start.
I use a version of Puppy Linux on this machine (because it's an old computer). So I don't think you should replicate that on your computer. That's why you see a lot of "/root" usage there. :D
That's good stuff - libraries building! So no problems there.
Yes, this works only after I used the "-k" option, but it works, and I can get things work now. Without the -k I would still be stuck just before the libraries being compiled. Also, if I set the z88dk path then I could have go to the libsrc directory and build myself, but it stopped if I used ./build.sh .
As for the other problem, zx_screenstr() seems to work now.
But, functions using zx_cyx2saddr() are not working well any more.
No, it's a cock-up, the compatibility #define had the arguments reversed, just for that function! The intention wasn't to break anything or cause any compatibility issues, just to reduce duplicate code.
So, do I need to download again? But for me, the version of yesterday (=current nightly), zx_cyx2saddr() had their parameters reversed. Note that this is cyx, and not the cxy version.
User avatar
dom
Well known member
Posts: 1188
Joined: Sun Jul 15, 2007 10:01 pm

Re: Better Linux Install Experience?

Post by dom »

Timmy wrote: Mon Sep 21, 2020 6:26 pmI use a version of Puppy Linux on this machine (because it's an old computer). So I don't think you should replicate that on your computer. That's why you see a lot of "/root" usage there. :D
I think you might win the "oldest hardware still in use" award, well apart form all those z80 machines! I've not used Puppy but since it's based off Ubuntu it should work...I'll see if I can set up a VM.
So, do I need to download again? But for me, the version of yesterday (=current nightly), zx_cyx2saddr() had their parameters reversed. Note that this is cyx, and not the cxy version.
The change is small: https://github.com/z88dk/z88dk/commit/a ... 7920f5f7f8 so just apply it manually yourself.
Timmy
Member
Posts: 135
Joined: Sat Mar 10, 2012 4:18 pm

Re: Better Linux Install Experience?

Post by Timmy »

dom wrote: Mon Sep 21, 2020 6:37 pm
So, do I need to download again? But for me, the version of yesterday (=current nightly), zx_cyx2saddr() had their parameters reversed. Note that this is cyx, and not the cxy version.
The change is small: https://github.com/z88dk/z88dk/commit/a ... 7920f5f7f8 so just apply it manually yourself.
Just a quick post to say that with this game, my code works again.
User avatar
dom
Well known member
Posts: 1188
Joined: Sun Jul 15, 2007 10:01 pm

Re: Better Linux Install Experience?

Post by dom »

Glad it's working again. Me and my fat fingers!

As an update:

- zcc now invokes z88dk-z80asm instead of z80asm, this should solve all the clash problems
- The bin/ folder after building now contains z88dk-z80asm and z80asm for compatibility reasons

In terms of the snap package, I've got devmode working with a bit of jiggery-pokery, the remaining things to do are:

- Move off devmode
- Build and include zsdcc
- Automatically register zcc, z88dk-z80asm, z88dk-tics as aliases
- Publish automatically
User avatar
dom
Well known member
Posts: 1188
Joined: Sun Jul 15, 2007 10:01 pm

Re: Better Linux Install Experience?

Post by dom »

I've managed to get a build working on most platforms, so there's an experimental snap file available at the snap-store: https://snapcraft.io/z88dk

I've not registered the aliases yet - but an end user can do that easily: https://github.com/z88dk/z88dk/wiki/Snap-usage

It's not going to help on Puppy unfortunately.
cborn
Member
Posts: 10
Joined: Tue Oct 06, 2020 7:45 pm

Re: Better Linux Install Experience?

Post by cborn »

Hi,
2 points:
it works for me on debian10
and
i am on the forum now so boardindex is working too !
so my experience realy got much better
thank you for providing z88dk!
User avatar
dom
Well known member
Posts: 1188
Joined: Sun Jul 15, 2007 10:01 pm

Re: Better Linux Install Experience?

Post by dom »

That's great - did you build it yourself or take the easy route out with a snap package?

Yes, apologies for that, the migration created two groups for "newly registered users", and I'd setup the permissions on the one that wasn't used.
Post Reply