Compiling TTDPatch under Lubuntu
Moderator: TTDPatch Moderators
Compiling TTDPatch under Lubuntu
I think I have all the packages required. When I set up my PATH environment variable, I presume I can leave out the Cygwin path as I am on Linux? I will likely post more questions as we go.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
Re: Compiling TTDPatch under Lubuntu
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Compiling TTDPatch under Lubuntu
Don't hold your breath, I still have a lot to learn but I do plan on tweaking (ie no brand new features for a while) TTDP once I can compile.wallyweb wrote:
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
Re: Compiling TTDPatch under Lubuntu
Agreed. If I held my breath, my face would turn colours that would break both the DOS and Windows pallets. The bows were for your brave attempt. More to come if you are successful.roboboy wrote:Don't hold your breath, I still have a lot to learn but I do plan on tweaking (ie no brand new features for a while) TTDP once I can compile.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
- orudge
- Administrator
- Posts: 25148
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: Compiling TTDPatch under Lubuntu
I would just give it a shot. I just tried to build TTDPatch on my Debian server, but it's running on an x86_64 system and it seems to be coming up with some errors trying to cross-compile. May need to either a) attempt to adjust the build system or b) built it on a 32-bit OS/chroot instead.
Re: Compiling TTDPatch under Lubuntu
Well, I just tried and I get
When I type make win into the terminal in the root of my source dir. I presume that means I am missing a package or I have the wrong version of a package. I got my list of packages from http://www.tt-wiki.net/wiki/CompilingTT ... f_TTDPatch and http://projects.tt-forums.net/projects/ ... ompile.txt. Of course if wanted, I can post screenies of the package manager showing which packages are installed if needed.
My path is:
Code: Select all
[CC DEP] mkptinc.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] mkpttxt.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] codepage.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] switches.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] makelang.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] windows.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] auxfiles.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] checkexe.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] loadlng.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] grep.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] error.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] ttdpatch.o.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] dos.obj.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] auxfiles.obj.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] checkexe.obj.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] loadlng.obj.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] switches.obj.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] grep.obj.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] error.obj.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC DEP] ttdpatch.obj.d
gcc: error: unrecognized command line option ‘-mno-cygwin’
[CC] non-asm/cwrap.wpo
cc1: error: -MG may only be used with -M or -MM
make: *** [non-asm/cwrap.wpo] Error 1
My path is:
Code: Select all
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/user/Documents/TTDPatch/TTDPatch-nightly-r2366/NASM:/user/Documents/TTDPatch/TTDPatch-nightly-r2366/BIN
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
Re: Compiling TTDPatch under Lubuntu
You may have all the need packages, but you've got the newest versions Read this for a start:
Another read. And another.
Code: Select all
Not yet, but it is coming. for now, explicitly use 'gcc-3 -mno-cygwin'
or switch your default gcc to version 3.x by using
/usr/bin/set-gcc-default-3.sh
Re: Compiling TTDPatch under Lubuntu
I fear this may not be possible as if I search in my package manager for gcc-3 I only get the current release which is 4.6.3. I am gloing to go looking for a copy of gcc-3 to use. I would preferably like it pre-built which it seems I'm not going to get.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
Re: Compiling TTDPatch under Lubuntu
I believe I am supposed to have /usr/bin/set-gcc-default-3.sh, but I can find that script anywhere even though I have installed gcc-3.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
Re: Compiling TTDPatch under Lubuntu
Have you changed the following lines in "makefile.local", by default it assumes Cygwin not cross compiling if you haven't. Hense the '-mno-cygwin' flag being wrongly applied.
[Edit] You might also need to uncomment the cross-compiler prefix line, so it finds the right compiler on Lubunbu.
Though that'll only provide capcity for compiling the Windows version of the patch.
~ Lakie
Code: Select all
WINCC := CROSS
HOST := INTEL
Though that'll only provide capcity for compiling the Windows version of the patch.
~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
Re: Compiling TTDPatch under Lubuntu
I just tried changing those lines. I now get the following outputLakie wrote:Have you changed the following lines in "makefile.local", by default it assumes Cygwin not cross compiling if you haven't. Hense the '-mno-cygwin' flag being wrongly applied.[Edit] You might also need to uncomment the cross-compiler prefix line, so it finds the right compiler on Lubunbu.Code: Select all
WINCC := CROSS HOST := INTEL
Though that'll only provide capcity for compiling the Windows version of the patch.
~ Lakie
Code: Select all
[HOSTCC DEP] host/mkptinc.o.d
[HOSTCC DEP] host/mkpttxt.o.d
[NASM DEP] host/texts.o.d
[HOSTCC DEP] host/codepage.o.d
[HOSTCC DEP] host/switches.o.d
[HOSTCC DEP] host/makelang.o.d
[HOSTCC DEP] host/windows.o.d
[HOSTCC DEP] host/auxfiles.o.d
[HOSTCC DEP] host/checkexe.o.d
[HOSTCC DEP] host/loadlng.o.d
[HOSTCC DEP] host/grep.o.d
[HOSTCC DEP] host/error.o.d
[HOSTCC DEP] host/ttdpatch.o.d
[CC DEP] mkptinc.o.d
[CC DEP] mkpttxt.o.d
[CC DEP] codepage.o.d
[CC DEP] switches.o.d
[CC DEP] makelang.o.d
[CC DEP] windows.o.d
[CC DEP] auxfiles.o.d
[CC DEP] checkexe.o.d
[CC DEP] loadlng.o.d
[CC DEP] grep.o.d
[CC DEP] error.o.d
[CC DEP] ttdpatch.o.d
[CC DEP] dos.obj.d
[CC DEP] auxfiles.obj.d
[CC DEP] checkexe.obj.d
[CC DEP] loadlng.obj.d
[CC DEP] switches.obj.d
[CC DEP] grep.obj.d
[CC DEP] error.obj.d
[CC DEP] ttdpatch.obj.d
[CC] non-asm/cwrap.wpo
[CC] non-asm/enhguic.wpo
[CC] non-asm/gridArray.wpo
[CC] non-asm/md5sum.wpo
[CC] non-asm/themes.wpo
[CC] reloc.o
[DLLTOOL] reloc.a
[LDEXP] ttdprotw.pe
i586-mingw32msvc-ld: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
patch.ld:103: undefined symbol `__recordversiondata' referenced in expression
make: *** [ttdprotw.pe] Error 1
make: *** [ttdprotw.pe] Deleting file `ttdprotw.map'
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
Re: Compiling TTDPatch under Lubuntu
Did you run the following command after changing the makefile.local?
If you didn't it's possible that some of the erroneous dependency / compiled files still existed, breaking the compile.
[edit] Have you also replaced the 'nasm' binary with the one from the TTDPatch nasm folder?
~ Lakie
Code: Select all
make mrproper
[edit] Have you also replaced the 'nasm' binary with the one from the TTDPatch nasm folder?
~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
Re: Compiling TTDPatch under Lubuntu
I replaced the nasm binary with the one from my source dir/nasm and ran ¨make mrproper".
I now get the below errors:
I know some of them aren't errors but I copied from the first error down to the end.
I now get the below errors:
Code: Select all
i586-mingw32msvc-ld: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
[OBJCOPY/GZIP] ttdprotw.bin
[OBJCOPY/OBJDUMP] ttdprotw.lst
[CC] ttdpatch.o
[CC] error.o
[CC] grep.o
[PERL] bitnames.h
[PERL] sw_lists.h
[CC] switches.o
switches.c: In function ‘processswitch’:
switches.c:798: warning: ‘parvalue’ may be used uninitialized in this function
switches.c:798: note: ‘parvalue’ was declared here
[CC] loadlng.o
[CP] versions/20110016.ver
[CP] versions/20110018.ver
[CP] versions/20110024.ver
[CP] versions/20110042.ver
[CP] versions/20110044.ver
[CC] checkexe.o
In file included from checkexe.c:25:
loadver.h:32: warning: dereferencing type-punned pointer will break strict-aliasing rules
loadver.h:33: warning: dereferencing type-punned pointer will break strict-aliasing rules
loadver.h:34: warning: dereferencing type-punned pointer will break strict-aliasing rules
loadver.h:35: warning: dereferencing type-punned pointer will break strict-aliasing rules
loadver.h:37: warning: dereferencing type-punned pointer will break strict-aliasing rules
checkexe.c: In function ‘loadingamestrings’:
checkexe.c:115: warning: pointer targets in passing argument 5 of ‘langinfo_readingamestrings’ differ in signedness
checkexe.c:123: warning: pointer targets in passing argument 5 of ‘langinfo_readingamestrings’ differ in signedness
[CC] auxfiles.o
[CC] windows.o
[CC] codepage.o
[WINDRES] ttdpatchw.res
[PERL] langerr.h
[HOSTCC] host/makelang.o
[HOSTCC] host/switches.o
switches.c: In function ‘getswitchline’:
switches.c:1261:3: warning: format not a string literal and no format arguments [-Wformat-security]
switches.c:1261:3: warning: format not a string literal and no format arguments [-Wformat-security]
switches.c: In function ‘showtheswitches’:
switches.c:1527:3: warning: format not a string literal and no format arguments [-Wformat-security]
switches.c:1530:3: warning: format not a string literal and no format arguments [-Wformat-security]
switches.c:1600:3: warning: format not a string literal and no format arguments [-Wformat-security]
[HOSTCC] host/codepage.o
[PERL] inc/ourtext.h
[HOSTCC] host/mkptinc.o
[HOSTLD] host/mkptinc
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make: *** [host/mkptinc] Error 1
rm ttdprotw.pe
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
- orudge
- Administrator
- Posts: 25148
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: Compiling TTDPatch under Lubuntu
You need the zlib development files available by the look of it. Whether that's a cross-compiled version or a native version you need I'm not sure, I'd guess the former.
Re: Compiling TTDPatch under Lubuntu
Lakie suggested similar to me. Will double check my lib packages in the morning and post screen shots of what I have.orudge wrote:You need the zlib development files available by the look of it. Whether that's a cross-compiled version or a native version you need I'm not sure, I'd guess the former.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
Re: Compiling TTDPatch under Lubuntu
Woopsie. I had installed what I thought was zlib, but was a different package. So it compiled, now to get it out of my VM as VMWare's shared folder's don't seem to be working. Or I may install wine and set up TTD using it.
Well it started after getting TTD installed. I was getting extra output though that I don't normally see on Windows with a copy from the compile farm. Will post that extra output later.
Edit:
I get these two extra lines:
and I managed to get it out of my VM into windows. I presume the reason it says r0 in the title is because I downloaded the zip from http://nightlies.ttdpatch.net rather than via SVN.
Edit: when I run 'svn checkout http://projects.tt-forums.net/projects/ ... repository ./' I get:
I was pointed to 'http://projects.tt-forums.net/projects/ ... repository' when I tried to run 'svn checkout http://svn.ttdpatch.net ./'
Well it started after getting TTD installed. I was getting extra output though that I don't normally see on Windows with a copy from the compile farm. Will post that extra output later.
Edit:
I get these two extra lines:
Code: Select all
- dplay.dll FIX DEBUG FileLocation: 1B478
- dplay.dll FIX DEBUG OriginalFirstThunk: 232D8
Edit: when I run 'svn checkout http://projects.tt-forums.net/projects/ ... repository ./' I get:
Code: Select all
svn: E175002: Unable to connect to a repository at URL 'http://projects.tt-forums.net/projects/ttdpatch/repository'
svn: E175002: Server sent unexpected return value (405 Method Not Allowed) in response to OPTIONS request for 'http://projects.tt-forums.net/projects/ttdpatch/repository'
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
- orudge
- Administrator
- Posts: 25148
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: Compiling TTDPatch under Lubuntu
You need to do svn checkout svn://svn.ttdpatch.net/trunk/, rather than http. Possibly I can detect the Subversion client and redirect it to svn://svn.ttdpatch.net/trunk/ though.
EDIT: Done, the command line svn client at least will show the correct URL if you try to access svn.ttdpatch.net via HTTP.
EDIT: Done, the command line svn client at least will show the correct URL if you try to access svn.ttdpatch.net via HTTP.
Re: Compiling TTDPatch under Lubuntu
Woohoo. I can now build TTDP from svn and apply diffs. Thank you Lakie and orudge
Now to start meddling with the source.
Now to start meddling with the source.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
- orudge
- Administrator
- Posts: 25148
- Joined: 26 Jan 2001 20:18
- Skype: orudge
- Location: Banchory, UK
- Contact:
Re: Compiling TTDPatch under Lubuntu
If or when you start producing patches, I can give you commit access to the SVN repository.
Who is online
Users browsing this forum: No registered users and 1 guest