Open f34rther34pr opened 3 months ago
Firstly there already is a pre-built version under https://github.com/tenox7/micropolis/releases.
Secondly try gnu make (gmake) instead of aix make. I had some issues with order of includes.
I think I also had to tweak some stuff in tclx/makefile, let me see if I can dig it out.
Alright! I did try with gmake and I got the same error above, first running make clean and then using gmake. And yep that binary does work for me, but I wanted to try it on my 7012-350 and I wasn't sure if the binary would work since it uses the older power1 cpu(can't try it directly atm).
Interesting. I will try that later and tell you how I built mine. Probably add a makefile for aix or something like that.
I also tried to build it as a statically linked binary but didn't work too well.
I just compiled on AIX 5.1 with the standard makefile.
Can you try to build it from tclx/src/ folder using gmake?
Sorry for the late reply to this. I did try with gmake from tclx/src but it still errored out at the same place. I was able to get it built successfully after some tweaking and sorting out some missing libraries!
In tclxgdat.y, I moved this section at the very bottom
void
yyerror(msg)
char *msg;
{
}
to below this section at the very top-
%token ID MONTH DAY MERIDIAN NUMBER UNIT MUNIT SUNIT ZONE DAYZONE AGO
%{
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <ctype.h>
#include <time.h>
so it looks like-
%token ID MONTH DAY MERIDIAN NUMBER UNIT MUNIT SUNIT ZONE DAYZONE AGO
%{
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <ctype.h>
#include <time.h>
void
yyerror(msg)
const char *msg;
{
}
#ifndef NULL
# define NULL 0
#endif
It built fine after that, and the game seems to work fine for me. I'll have some time later to test it out further, but that seemed to produce a binary that at least gets into gameplay.
I had something very similar. Although I ended up building Bison 1.6 as this seems to want something more SYSV/Ancient?
`diff -ruN micropolis/src/tclx/src/tclxgdat.y ../micropolis/src/tclx/src/tclxgdat.y --- micropolis/src/tclx/src/tclxgdat.y 2024-10-24 11:11:58.000000000 +0100 +++ ../micropolis/src/tclx/src/tclxgdat.y 2024-10-24 12:02:17.241085207 +0100 @@ -228,7 +228,7 @@
static char *lptr;
-static +//static yylex() {
If it helps I processed this file with Bison 1.16 & it compiled for me. Although I just found out it only runs on 1/8bit displays so I haven't been able to actually test it yet.
I'm sorry if this is a really simple thing, but I tried to build from source on AIX 4.3.3 on my 43p-140 with GCC 3.4.3 and I get this error-
That happens when I run make from the
micropolis-src/src
directory. Do I need to build it a different way, or is installing xlc the best way to build it on aix?