[z88dk-dev] guthub zsdcc

Bridge to the z88dk-developers mailing list
Post Reply
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

[z88dk-dev] guthub zsdcc

Post by alvin »

I found that the sdcc svn repository is being reflected onto github so I created another project zsdcc:
https://github.com/z88dk/zsdcc



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
thricenightly
Member
Posts: 28
Joined: Thu Jun 01, 2017 5:46 pm

Post by thricenightly »

I found that the sdcc svn repository is being reflected onto github so I created another project zsdcc:
https://github.com/z88dk/zsdcc

Is this now the recommended place to get zsdcc for Linux users? I've spent the evening trying to patch and build it following the instructions here:

https://www.z88dk.org/wiki/doku.php?id=temp:front#sdcc1

I failed. I found this post in my search for clues.

Should I be using this z88dk/zsdcc project? If so, when will build instructions appear for it?


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

Should I be using this z88dk/zsdcc project? If so, when will build instructions appear for it?
https://github.com/z88dk/z88dk/issues/217
Eventually z88dk/zsdcc will be the preferred source for the build but that hasn't been done yet. The z88dk/zsdcc branch is a reflection of my windows machine directory and I'm sure it needs to be sanitized to compile for anything else.

So the build method for linux is still as described in https://www.z88dk.org/wiki/doku.php?id=temp:front#sdcc1
using the current patch https://github.com/z88dk/z88dk/blob/mas ... _patch.zip

Sometimes a change at sdcc causes a conflict in the patch and someone reported this yesterday so I'm trying a linux build from scratch now to make sure it still compiles for me.
I'll let you know if it works for me in a bit.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

Sometimes a change at sdcc causes a conflict in the patch and someone reported this yesterday so I'm trying a linux build from scratch now to make sure it still compiles for me.
I'll let you know if it works for me in a bit.
I successfully compiled zsdcc on my linux laptop from scratch following the instructions.

The first "./configure" complained about missing gputils but instead of looking for that I just disabled the pic support with "./configure --disable-pic14-port --disable-pic16-port".

make will fail while trying to build some of the device libraries. This is fine. We're only interested in the sdcc and sdcpp binaries. If those are there, you're successful. Copy them to the z88dk/bin directory and rename them "zsdcc" and "zsdcpp" and you're done.

A "zsdcc -v" should show "build 3.6.6 #9921" which is the current version of sdcc.

I test compiled the "BlackStar" example in z88dk/libsrc/_DEVELOPMENT/EXAMPLES/zx/demo_sp1/BlackStar using the zsdcc instructions in the README.md. Because the optimization level is high, the compile does take a while. That's just something we have to live with when using sdcc. If you want to see asm produced by the compiler, you can add "--list" to the compile line and have a look at the *.c.asm source files afterward.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
thricenightly
Member
Posts: 28
Joined: Thu Jun 01, 2017 5:46 pm

Post by thricenightly »

I successfully compiled zsdcc on my linux laptop from scratch following the instructions.

The first "./configure" complained about missing gputils but instead of looking for that I just disabled the pic support with "./configure --disable-pic14-port --disable-pic16-port".

make will fail while trying to build some of the device libraries. This is fine. We're only interested in the sdcc and sdcpp binaries. If those are there, you're successful. Copy them to the z88dk/bin directory and rename them "zsdcc" and "zsdcpp" and you're done.
I started afresh this morning with a clear head and a lot less frustration. I still ended up at the same place as I did last night.

<Time passes...>

I found the problem. The sdcc compile was hitting what looked like warnings on texinfo:

configure: WARNING:
*** Makeinfo is missing. Info documentation will not be built.

WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.

I was ignoring those because they're rarely relevant and the build seemed to barrel on regardless. But it never produced the sdcc and sdcpp files in the bin directory:

>ls bin/
README sdcclib sdcdb

I tried with make -k and ended up with:

>ls bin/
as2gbmap packihx README sdas390 sdas6808 sdas8051 sdasgb sdasrab sdasstm8 sdastlcs90 sdasz80 sdcclib sdcdb sdld sdld6808 sdldgb sdldstm8 sdldz80

Closer, but still no cigar.

On a whim, I installed the texinfo tools, cleaned it all out and started again. This time it got a lot further before an obvious looking compilation failure, at which point I found the sdcc and sdcpp where there. I then got Blackstar to build without further problems.

So I think I'm good. Thanks for your help. :)



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

On a whim, I installed the texinfo tools, cleaned it all out and started again. This time it got a lot further before an obvious looking compilation failure, at which point I found the sdcc and sdcpp where there. I then got Blackstar to build without further problems.

So I think I'm good. Thanks for your help. :)
Thanks thrice. I added a short section on compile problems that includes the texinfo bit you solved.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Post Reply