building openTTD

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
hamei
Posts: 10433
Joined: Tue Feb 24, 2004 4:10 pm
Location: over the rainbow

building openTTD

Unread postby hamei » Mon Oct 05, 2015 9:30 pm

Just did a quick look to see if it would be reasonably simple,

Code: Select all

gort 13% ./configure --prefix=/opt/testbox
checking awk... awk
detecting OS... none detected
I couldn't detect your OS. Please use --os=OS to force one
Allowed values are: UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, HPUX, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, DOS, WINCE, and PSP

gort 14% ./configure --prefix=/opt/testbox --os=UNIX
checking awk... awk
forcing OS... UNIX
checking build system type... c99 unusable
the CC environment variable is set, but it doesn't seem to be a gcc binary
please redefine the CC/CXX environment to a gcc binary

Sooooo .... afaiac, these ignorant little chimpanzees can place their program twixt their cheeks then pound it home with a wooden mallet.

And this is why gcc is so repugnant. Not because of gcc itself but because of the worthless, mentally-retarded twats who use it.
I spent a fortune on booze, birds, and fast cars ... the rest I just squandered

User avatar
Trippynet
Donor
Donor
Posts: 783
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby Trippynet » Tue Oct 06, 2015 1:08 am

Well you got further than me. I quickly tried it and was greeted with a syntax error on line 133 of the Makefile. Didn't have time to dig any further at that point, might try this weekend perhaps.

Note that I originally tried to compile version 0.5.3, seeing as joerg had successfully compiled this version before - and given my lack of experience with compiling/porting, I thought the less unknown variables the better!
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30

User avatar
necron2600
Posts: 260
Joined: Tue May 26, 2015 10:38 pm
Location: Boston

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby necron2600 » Tue Oct 06, 2015 10:39 am

Syntax error on line 133 of Makefile for OpenTransport Tycoon is from ./configure calling /sbin/make instead of gmake. To get around it (unless someone else knows a more elegant way) move /sbin/make binary out of the way and create a symlink in its orig place to /usr/nekoware/bin/gmake. Restore the orig binary after your done compiling. I guess you could try to find and alter where make is being called when run by ./configure, or ensure /usr/nekoware/bin is in your PATH before /sbin/ , etc..

I also had to disable networking as an error came up during compiling that part.
I was able to compile openttd-0.5.3-RC2 successfully (without networking).. using nekoware's GCC4.7.
./configure --without-network
gmake

User avatar
ClassicHasClass
Donor
Donor
Posts: 2071
Joined: Wed Jul 25, 2012 7:12 pm
Location: Sunny So Cal
Contact:

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby ClassicHasClass » Tue Oct 06, 2015 6:34 pm

You know, with the number of Mac OS 9 machines here, I'd be a Open Transport Tycoon too.





I'll get my coat.
smit happens.

:Fuel: bigred, 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy, 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze, 175MHz R10000, Solid IMPACT
probably posted from Image bruce, Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...

User avatar
Krokodil
Donor
Donor
Posts: 477
Joined: Fri Apr 17, 2015 2:32 pm
Location: The House of Particular Individuals

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby Krokodil » Tue Oct 06, 2015 6:53 pm

Trippynet wrote:It's possible it'll run in SoftWindows, but you'll need a very beefy system for that. My experiences have found that SoftWindows is OK for a few things, but tends to struggle even with some earlier DOS games when running them on my Fuel (general stuttering, skipping audio, that sort of thing).


Figures eh? SoftWindows isn't magic I guess.Oh well. Let's just get OpenTTD going again in the meantime. Be nice to have some more games for my Octane. :)
:Octane2: - :O2: - :Octane: - :Indigo2IMP:

User avatar
Trippynet
Donor
Donor
Posts: 783
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby Trippynet » Wed Oct 07, 2015 1:22 am

necron2600 wrote:Syntax error on line 133 of Makefile for OpenTransport Tycoon is from ./configure calling /sbin/make instead of gmake. To get around it (unless someone else knows a more elegant way) move /sbin/make binary out of the way and create a symlink in its orig place to /usr/nekoware/bin/gmake. Restore the orig binary after your done compiling. I guess you could try to find and alter where make is being called when run by ./configure, or ensure /usr/nekoware/bin is in your PATH before /sbin/ , etc..

I also had to disable networking as an error came up during compiling that part.
I was able to compile openttd-0.5.3-RC2 successfully (without networking).. using nekoware's GCC4.7.
./configure --without-network
gmake


Ahh, thanks! I'll have a play with that when I get chance. I'm not bothered about the networking side of OpenTTD. If 0.5.3 compiles OK, it'll be interesting to see how a later version works!
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30

User avatar
Trippynet
Donor
Donor
Posts: 783
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby Trippynet » Wed Oct 07, 2015 12:15 pm

Hmm, getting different errors now annoyingly.

./configure throws a lot of "/bin/sh: -dumpversion: not found" notices.

Then compiling throws a few more, before bombing with:

/bin/sh: -O2: not found
/bin/sh: -dumpversion: not found
gmake: *** No rule to make target 'strgen/strgen', needed by 'lang/romanian.lng'. Stop.

So, what am I doing dumb? :(
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30

User avatar
hamei
Posts: 10433
Joined: Tue Feb 24, 2004 4:10 pm
Location: over the rainbow

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby hamei » Wed Oct 07, 2015 8:13 pm

Trippynet wrote:So, what am I doing dumb? :(

Wasting your time on these idiots, I think :( Grabbed the tarfile again, looked into it a little. Sometimes they just hardwire gcc into the Makefile, you can just remove it. Sloppy, lazy, ignorant, careless. But not evil.

But in this case, they buried that gcc garbage nine feet deep into a "config" library. They put a lot of effort into creating a non-portable piece of crap. 'Free' as in 'free to do what we say.'

It's just shit. Disgusting worthless shit created by disgusting worthless people :( .
I spent a fortune on booze, birds, and fast cars ... the rest I just squandered

User avatar
Trippynet
Donor
Donor
Posts: 783
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby Trippynet » Thu Oct 08, 2015 3:14 am

It's frustrating that it cannot be compiled easily with MIPSPro, but to be honest I'll take a GCC compilation over no compilation at all. As necron has been able to compile it relatively painlessly, I'm thinking that there must be something set up wrongly with my environment.

I found that I actually had an earlier version of GCC installed, so I've popped on GCC 4.71 from Nekoware and set up the symlinks so that gcc and g++ commands call the correct GCC version, but alas this hasn't fixed it :(
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30

User avatar
hamei
Posts: 10433
Joined: Tue Feb 24, 2004 4:10 pm
Location: over the rainbow

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby hamei » Thu Oct 08, 2015 5:47 am

Trippynet wrote:It's frustrating that it cannot be compiled easily with MIPSPro ...

I wish you luck. My experience has been that when something is written badly, it's REALLY bad, and won't build easily with anything besides their Approved Three Versions Of Loonix.

I'm not that sure it even builds easily on the three approved versions, hence the rise of the 'package manager'.

Sad.
I spent a fortune on booze, birds, and fast cars ... the rest I just squandered

jpstewart
Donor
Donor
Posts: 429
Joined: Tue Sep 21, 2010 3:31 pm
Location: Southwestern Ontario, Canada

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby jpstewart » Thu Oct 08, 2015 8:16 am

Trippynet wrote:Hmm, getting different errors now annoyingly.

./configure throws a lot of "/bin/sh: -dumpversion: not found" notices.

Then compiling throws a few more, before bombing with:

/bin/sh: -O2: not found
/bin/sh: -dumpversion: not found

Both "-O2" and "-dumpversion" are options that are meant to be passed to GCC. But it's /bin/sh which is complaining about them being "not found" as if they're command names themselves, rather than command options.

Just a guess, but somewhere in a Makefile (or maybe a shell script), there must be a call to something like:

Code: Select all

$CC -dumpversion
$CC -O2 ...

But your CC variable must be empty to produce the given errors. So the build system is either not finding your GCC installation or it's being overridden by an (incorrectly set) environment variable. Check your environment variables (with 'printenv') and make sure that either CC points to gcc or there is no CC environment variable. If CC is present but empty, that would be the problem. (And 'unset CC' should fix it.)

Of course, it's also quite possible that everything you can control is set correctly. A badly written Makefile or shell script could be trashing your environment variables, overwriting your supplied value with an empty string.
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500, T5240
HP C8000

User avatar
hamei
Posts: 10433
Joined: Tue Feb 24, 2004 4:10 pm
Location: over the rainbow

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby hamei » Thu Oct 08, 2015 6:17 pm

jpstewart wrote:Of course, it's also quite possible that everything you can control is set correctly. A badly written Makefile or shell script could be trashing your environment variables, overwriting your supplied value with an empty string.

You would know much more than me, but this thing has a "configure.lib" that it uses in some manner to create the Makefile.

It's a mess.
I spent a fortune on booze, birds, and fast cars ... the rest I just squandered

User avatar
necron2600
Posts: 260
Joined: Tue May 26, 2015 10:38 pm
Location: Boston

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby necron2600 » Fri Oct 09, 2015 8:56 am

My environment settings that were used to build OpenTTD:
# BASH env: GCC 4.7 build env
export CC=gcc
export CXX=g++
export CXXFLAGS="-mabi=n32 -I/usr/nekoware/include -I/usr/include"
export CPPFLAGS="-mabi=n32 -I/usr/nekoware/include -I/usr/include"
export PATH="/usr/nekoware/bin:$PATH"
export MANPATH="/usr/nekoware/man:$MANPATH"
export CFLAGS="-mabi=n32 -I/usr/nekoware/include -I/usr/include"
export LDFLAGS="-L/usr/nekoware/lib -L/usr/lib32"
export LD_LIBRARY_PATH="/usr/nekoware/lib:/usr/lib32"
export PATH=/usr/nekoware/gcc-4.7/bin:$PATH

and use 'gmake' instead of make.

I have attached a tarball of openttd compiled with GCC-4.7
It works nicely (on an O2 R5k) but i did not test for very long.
Place the real game data under data/ (find/buy a Windows CD version of the game.. seems to work than others)
Place the windows version of the game's music under gm/
and your good to go running ./openttd
NOTE: Compiled without networking
Attachments
openttd-irix.tar.gz
OpenTTD for IRIX
(3.98 MiB) Downloaded 22 times

User avatar
Krokodil
Donor
Donor
Posts: 477
Joined: Fri Apr 17, 2015 2:32 pm
Location: The House of Particular Individuals

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby Krokodil » Fri Oct 09, 2015 9:43 am

So it actually officially works now? That's cool. I'll have to give that a shot.
:Octane2: - :O2: - :Octane: - :Indigo2IMP:

User avatar
Trippynet
Donor
Donor
Posts: 783
Joined: Thu Aug 15, 2013 6:22 am
Location: Aberdeen, Scotland, UK

Re: Open Transport Tycon Deluxe - openTTD for IRIX

Unread postby Trippynet » Fri Oct 09, 2015 12:30 pm

I'm an idiot.

When you finally figure out the issue, it's always something stupid that makes you want to bang your head off a wall.

In this case, in trying to set the compiler to GCC through the environment variables so it'd compile, I used "setenv CC=gcc" and "setenv CXX=g++".

Anyone spot the problem there?

Result? printenv shows CC=gcc= and CXX=g++=. And I didn't notice it.

So, one big slap on the forehead and a two second fix later (and a tweak to the CFLAGS variables to remove the plain -n32), and suddenly it's compiling away happily.

Granted it eventually failed once it reached "threads.c", so I'll need to research why, but definitely a lot more progress this time.

Thanks necron for the pointers plus the compiled version, and also to hamei for the encouragement (and colourful abuse of the OpenTTD devs)! Still I'm sick of leeching off everyone else all the time by using their compilations and hence not learning anything. I want to succeed and compile this bugger myself for once :)
Systems in use:
:Indigo2IMP: - Nitrogen: R10000 195MHz CPU, 384MB RAM, SolidIMPACT Graphics, 36GB 15k HDD & 300GB 10k HDD, 100Mb/s NIC, New/quiet fans, IRIX 6.5.22
:Fuel: - Lithium: R14000 600MHz CPU, 4GB RAM, V10 Graphics, 72GB 15k HDD & 300GB 10k HDD, 1Gb/s NIC, New/quiet fans, IRIX 6.5.30
Other system in storage: :O2: R5000 200MHz, 224MB RAM, 72GB 15k HDD, PSU fan mod, IRIX 6.5.30


Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 2 guests