compile problem ubuntu 11.04

Problems installing on other platforms
Post Reply
utz
New member
Posts: 3
Joined: Thu Feb 02, 2012 4:53 pm

compile problem ubuntu 11.04

Post by utz »

apologies for opening yet another thread with a similar problem. i've read the others but found no solution for my case. anyway i'm having trouble installing the nightly build (31-01) in ubuntu 11.04 (32bit). ran config.sh before running build. tried the local build, too, didn't seem to work either.

i'm getting a

Cannot open zcc_opt.def: File in use?
make[1]: *** [get_task.o] Fehler 1

during make install and on make libs there are several errors of type

Can't open config file /usr/local/lib/z88dk/lib/config/test.cfg

and sure enough there are no config present files at this path. they all seem to exist in the source folder though.

could someone please explain in easy steps how i can fix this? *nix n00b at work here ;)
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

The first step is to run ./configure.sh, it should happen automatically if you run 'make' in the main folder.
Make also sure you do set the ZCCCFG and Z80_OZFILES environment variables, as explained here:
http://www.z88dk.org/wiki/doku.php?id=i ... _variables

Another common problem is due to file write read permissions, in short the temp zcc_opt.def file needs to be writable in order to have a working 'zcc' compiler.
utz
New member
Posts: 3
Joined: Thu Feb 02, 2012 4:53 pm

Post by utz »

sorry, but that doesn't help me.

i don't see a configure.sh script - only config.sh and as i said i did run that.

can't set r/w permissions for zcc_opt.def since the file does not exist. i even tried running the whole install as root so permissions shouldn't be a problem.

as for setting the environment vars, i don't understand the documentation. what's supposed to be the "application root"? i'm trying to do a system-wide install after all... just to be sure i tried setting them to /usr/local/lib/z88dk/.. but it didn't help. as for the local build, is it supposed to be set relative to source folder, relative to user main directory, or to absolute path on the hard drive? tried the first two options, didn't work.

anway here's a build log, it seems there are problems during make. for this one i tried running build.sh as normal user, but i'm getting the same errors when running it as root. http://home.arcor.de/ipcore/log.txt

again sorry, i'm really no expert in these things.
utz
New member
Posts: 3
Joined: Thu Feb 02, 2012 4:53 pm

Post by utz »

could someone be kind enough to answer my question? i would really like to use a recent version instead of the ancient build from the ubuntu repositories.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

First of all sorry for the misunderstanding.. yes I was referring to 'config.sh'; it should build all the 'cfg' files in {z88dk}/lib/clibs starting from the templates bringing the '.lnx' name extension.

Be aware that the Ubuntu mantainer wanted to keep z88dk compliant to the common Ubuntu directory standards and had to avoid name conflicts (i.e. AFAIK z80asm is available in two flavours, the original one and the z88dk improved one).

So you should first choose what to do, either removing the z88dk packages or to 'patch' them.
The only benefit from your second choice is that you have the environment variables set.. I don't think an icon or a special menu entry exists :)
Let's assume you're crazy enough, it helps understanding a little more the how this compiler works.
ZCCCFG points to the 'config' files we were talking about, in a vanilla z88dk env it points to {z88dk}/lib/config but in your case it will most probably point to '/usr/share/z88dk/lib/config' or something similar, please verify it. You could compare the cfg files, and add the missing ones, then edit what you have added and hand-adjust the path comparing to an existing file, but it will make you get even more crazy, so at first just update all the '/usr/share/z88dk/lib' folder and subfolders with the new one.
Bring 'config.sh' and Makefile in '/usr/share/z88dk' and run 'make config' in that position.. it should create/update all the 'cfg' files.

Go back to your source tree.. if missing, create the {z88dk}/bin folder, then move in {z88dk}/src and make all.. reneme and overwrite the Ubuntu binaries according to what you have in /usr/bin; the target names should be:

/usr/bin/z88dk-appmake
/usr/bin/z88dk-sccz80
/usr/bin/z88dk-zcpp
/usr/bin/z88dk-copt
/usr/bin/z88dk-zcc
/usr/bin/z88dk-z80asm

Now copy the {z88dk}/include folder and subfolder to (I think) /usr/share/z88dk

Last but not least, let's rebuild the libraries.
Move in {z88dk}/libsrc and launch 'make'; if everything goes fine you should have (almost) all the main libraries in the libsrc folder; now:

mv *.lib /usr/share/z88dk/lib


This should be all.


- - - - -
For the record, we should dig into the distros more often, it is a goldmine of hints for us :)
https://buildd.debian.org/~brlink/packages/z/z88dk.html
Post Reply