Bug 168185 - Review Request: z88dk - Z80 cross compiler
Review Request: z88dk - Z80 cross compiler
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Howarth
David Lawrence
http://z88dk.sourceforge.net
:
Depends On:
Blocks: FE-ACCEPT
  Show dependency treegraph
 
Reported: 2005-09-13 06:36 EDT by Paul F. Johnson
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-12 21:21:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch mentioned in previous comment (2.58 KB, patch)
2005-10-17 13:02 EDT, Paul Howarth
no flags Details | Diff

  None (edit)
Description Paul F. Johnson 2005-09-13 06:36:47 EDT
Spec Name or Url: http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk.spec
SRPM Name or Url: http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk-1.6-1.src.rpm
Description: Z88DK is a Z80 cross compiler. It is able to target many Z80 based computers (such as the ZX-Spectrum, ZX81, various Casio calculators, the Amstrad CPC 464 etc)

There are a couple of problems currently with the spec file (such as the licence and needed a -devel branch), but I'm working on this.
Comment 1 Paul F. Johnson 2005-09-14 12:11:09 EDT
Updated spec

http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk.spec

Updated srpm

http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk-1.6-4.src.rpm

The spec file has been fixed and my evil hacks to the makefile have been
relegated to a patch. I've tested the compiler on the spectrum examples and the
file produced checked out under Fuse

If this and the fuse emulator (with associated libs and fuse-utils) can be
approved, I'd appreciate it.

The rpm will not check out against rpmlint due to static libraries being present
(nothing I can do about it either)
Comment 2 Paul Howarth 2005-10-17 11:26:17 EDT
You can get rid of all rpmlint warnings except the
devel-file-in-non-devel-package ones) by adding the following to %prep:

/usr/bin/find doc examples src -type f -exec %{__sed} -i -e 's/\r*$//' {} \;
/usr/bin/find doc examples src -type f -exec %{__chmod} 644 {} \;

The rpmlint warnings about devel-file-in-non-devel-package can IMHO be ignored
because they are all warnings about header files that are directly used by the
compiler itself, much like the header files included in the regular gcc package.

There are also some duplicate files amongst the examples (e.g.
/usr/share/doc/z88dk-1.6/examples/z88/dstar.h &
/usr/share/doc/z88dk-1.6/examples/z88/app/dstar.h); replacing the duplicates
with symlinks would only save around 100k in the target filesystem so I'm not
convinced it's worth the hassle of doing this (unless someone knows of a symlink
equivalent of the "/usr/sbin/hardlink" program, which would make it easy).

I'll do a proper review after some working URLs are posted for Bug 166960 so
that I can try out the compiler for myself.
Comment 3 Paul F. Johnson 2005-10-17 11:41:58 EDT
Updated spec

http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk.spec

Updated srpm

http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk-1.6-5.src.rpm

I'll updated 166960 shortly (just rebuilding)
Comment 4 Paul Howarth 2005-10-17 12:59:59 EDT
The upstream download page
(http://sourceforge.net/project/showfiles.php?group_id=2917) does not offer a
.tar.gz file (as per the spec), but there is a z88dk-src-1.6.tgz file. This file
is different from the z88dk-src-1.6.tar.gz file in the SRPM. The
z88dk-src-1.6.tgz file expands to directory z88dk, whereas your
z88dk-src-1.6.tar.gz file expands to directory z88dk-1.6.

I shall attach a patch for the spec file that:
- uses a full URL for the z88dk-src-1.6.tgz tarball
- changes %%prep to account for the directory name change
- changes %{_bindir}/find to /usr/bin/find (see Bug 170506 for discussion)

The resulting package will build ok on FC4 i386.

However, I tried building the package on RHEL3 (x64_64) - the only x86_64 box I
have access to - and it failed:

--- Building Z88 Library  ---

cd fcntl ; /usr/bin/make lz88
make[2]: Entering directory `/usr/src/redhat/BUILD/z88dk/libsrc/fcntl'
cd z88 ; /usr/bin/make z88_fcntl
make[3]: Entering directory `/usr/src/redhat/BUILD/z88dk/libsrc/fcntl/z88'
zcc -vn -make-lib close.c
zcc -vn -make-lib creat.c
zcc -vn -make-lib lseek.c
zcc -vn -make-lib open.c
zcc -vn -make-lib open_z88.c
zcc -vn -make-lib nropen.c
zcc -vn -make-lib read.c
zcc -vn -make-lib write.c
zcc -vn -make-lib writebyte.c
zcc -vn -make-lib readbyte.c
zcc -vn -make-lib stat.c
1 errors occurred during assembly
Errors in source file stat.c:
File '/tmp/tmpXXXqUXdi.opt', Module 'STAT', at line 26, Integer out of range
make[3]: *** [stat.o] Error 1
make[3]: Leaving directory `/usr/src/redhat/BUILD/z88dk/libsrc/fcntl/z88'
make[2]: *** [lz88] Error 2
make[2]: Leaving directory `/usr/src/redhat/BUILD/z88dk/libsrc/fcntl'
make[1]: *** [z88_clib.lib] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/z88dk/libsrc'
make: *** [libs] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.28544 (%build)

You may need to use ExclusiveArch or ExcludeArch whilst this is being fixed -
hopefully upstream (see http://fedoraproject.org/wiki/PackageReviewGuidelines
regarding packages that don't build on all architectures, if this problem
happens on Fedora).
Comment 5 Paul Howarth 2005-10-17 13:02:06 EDT
Created attachment 120064 [details]
Patch mentioned in previous comment
Comment 6 Paul F. Johnson 2005-10-17 18:30:57 EDT
Thanks. I've rebuilt using your mods and also included the ExcludeArch.

Updated spec

http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk.spec

Updated srpm

http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk-1.6-7.src.rpm

166960 has also been completely rebuilt with Tom's recommendations. As I don't
have an x86_64 box, I can't g/tee they will build on the architecture. They do
work very nicely on an x86 box though :-)

Comment 7 Paul Howarth 2005-10-18 05:29:06 EDT
I'd leave out the ExcludeArch until after trying a build on the Extras
buildsystem. You'll then know which architectures it builds on (x86_64 may not
be the only problem, or in fact Fedora x86_64 may not have the same problem that
RHEL3 x86_64 does). You'll need to raise a bug on the package for each excluded
architecture, and should try to get it fixed, preferably upstream.

See http://rpm.org/max-rpm-snapshot/s1-rpm-multi-platform-dependent-tags.html
for how to exclude architectures (the way you tried to do it isn't the right way).

Comment 8 Paul F. Johnson 2005-10-18 05:52:22 EDT
Spec Name or Url: http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk.spec
SRPM Name or Url:
http://www.all-the-johnsons.co.uk/emulation/downloads/z88dk-1.6-8.src.rpm

I've removed the excludearch as suggested and see about getting the bug fixed
upstream. Thanks for the url on the multiplatform exclusions.
Comment 9 Paul Howarth 2005-10-26 11:22:20 EDT
I'm virtually at the point of approving this package but can't figure out how to
test some of the examples in the fuse emulator. Any hints?
Comment 10 Paul F. Johnson 2005-10-26 11:34:00 EDT
Sorry - mad busy (bloomin' employer!).

Compile using the SDK, target the Spectrum [zcc +zx] (those instructions are in
the package docs). Go into Fuse. File->Open binary data, select the compiled
file. In the window which opens, type 32768 for the start address.

The window closes

Next press T, ctrl + shift (the cursor changes to an E), L 32768 (the screen
will say RANDOMIZE USR 32768). Press return.

Job done.

I'm not sure which package these instructions should be in though. To me, both
could do with them! 
Comment 11 Paul Howarth 2005-10-26 11:47:27 EDT
Review:

- rpmlint issues only warnings (see below)
- package and spec naming OK
- package meets guidelines
- license is Artistic, matches spec, text included
- spec file written in English and is legible
- source matches upstream
- no explicit BR's
- package builds ok in mock for FC4 (i386)
- no locales, libraries, subpackages or pkgconfigs to worry about
- not relocatable
- no directory ownership or permissions issues
- there are a few duplicate files within the examples (same header file for
  different target platforms for example); since they add up to less than 100k
  bytes, I'm inclined to ignore this but you might consider replacing them
  with symlinks
- %clean section present and correct
- macro usage is consistent
- code, not content
- it's debatable whether the documentation is "large" or not; I'd be inclined
  to split off a "-examples" subpackage but I think this is a borderline case
  and I'll leave it up to you
- docs don't affect runtime
- no desktop entry needed
- no scriptlets
- tested a couple of the spectrum examples in the fuse emulator and they
  worked

Notes:

- rpmlint output:
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz700/ozserial.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/stdlib.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/MemoDB.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/float.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz700/oztime.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/rex.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/Database.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/register.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/zxvgs.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/syscall.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/spectrum.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/socket.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/z88.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/help0.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/zsockerrs.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/help6.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/debug.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/help4.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/zsfiles.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/TextInfDB.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/gray.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/application.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/resolv.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/ti.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/help2.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/tftp.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/device.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/math.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/stdio.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/sys/types.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/command5.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/resolver.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/command3.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/cpm.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/command1.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/command7.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/dor.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/z88stdio.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/string.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/iso646.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/time.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/StatusDB.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/strings.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/tcpsock.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rs232.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz700/ozgfx.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/malloc.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/setjmp.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/library.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz700/ozmisc.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/graphics.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz700/ozscreen.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz700/ozint.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz700/ozfont.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/stdio.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/conio.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/zxinterface1.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/help1.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/help7.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/gui.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/sys/stat.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz700/ozinput.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/inet.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/games.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/help5.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/fcntl.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/netstats.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/package.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/struct.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/telnet.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/command4.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/message.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/ctype.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/misc.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/syscallEx.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/command2.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/help3.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/zxlowgfx.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/command0.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz/command6.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/CalendarDB.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/sound.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/lib3d.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/limits.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/rex/TaskDB.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/stdarg.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/oz700/scaldate.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/assert.h
W: z88dk devel-file-in-non-devel-package /usr/share/z88dk/include/net/hton.h
  These warnings can IMHO be ignored because they are all warnings about header
  files that are directly used by the compiler itself, much like the header
  files included in the regular gcc package

- the package does not build on RHEL3 x86_64; if there are similar issues for
  Fedora then a bug will need to be raised for each excluded architecture

- Adding a README.fuse-emulator describing how to run some of the examples in
  the emulator would be useful

Approved.
Comment 12 Paul F. Johnson 2005-10-26 11:55:20 EDT
I'll add in the README.fuse-emulator.

What do I need to do next? Without fuse though, the cross compiler possibly has
a limited appeal.
Comment 13 Paul Howarth 2005-10-26 12:10:55 EDT
(In reply to comment #12)
> What do I need to do next? Without fuse though, the cross compiler possibly has
> a limited appeal.

Are you an existing Fedora Extras contributor? You didn't mention needing a sponsor.

Spot's already the reviewer for the fuse-emulator package (Bug 166960) and I'll
leave that to him. You should though split off the library dependencies into
separate review requests and I'll be happy to look at those.
Comment 14 Paul F. Johnson 2005-10-26 12:31:58 EDT
I'll split them off shortly and yes, I need a sponsor.
Comment 15 Paul Howarth 2005-10-26 12:46:21 EDT
OK, I'll sponsor you; you'll need to sign up on the accounts system as described
at http://fedoraproject.org/wiki/Extras/Contributors

CD Editor of Acorn User eh? I don't recall having any CDs when I used to get
that. Probably 'cause I was a Beeb user and never had an Arc.
Comment 16 Paul F. Johnson 2005-10-26 12:51:48 EDT
CD editor was years ago! Whizz over to ebay and pick up a RiscPC cheap. Nice to
play with :-)

I'll sign up for an account.
Comment 17 Paul Howarth 2006-03-07 12:07:51 EST
Still awaiting a build of this package...
Comment 18 Paul F. Johnson 2006-03-07 13:42:22 EST
It's in the i386 repository - I've filed a bug upstream about 64 bit, but there
isn't much activity.
Comment 19 Paul Howarth 2006-03-07 13:47:26 EST
(In reply to comment #18)
> It's in the i386 repository

Where? I can't see it at
http://download.fedora.redhat.com/pub/fedora/linux/extras/development/i386/

Comment 20 Paul F. Johnson 2006-03-07 19:27:18 EST
Given the lack of movement upstream (it goes on and off), I'm fixing for x86_64,
but it's slow. In the meantime, I'll rebuild on the laptop and add ExArch=ia64,
x86_64 to the spec

Note You need to log in before you can comment on or make changes to this bug.