[re-unsolved] Mingw compiling problems

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Gremnon »

What exactly is the missing libicu for?
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Ammler »

> grep -n libicu readme.txt
428: - libicu: handling of right-to-left scripts (e.g. Arabic and Persian)
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Gremnon »

Something tells me I should have thought of that before I asked.
At least it's not something essential, unless of course you can't read anything that isn't and RTL language...
Nickel_Plate
Traffic Manager
Traffic Manager
Posts: 146
Joined: 27 Dec 2004 19:37
Location: Home of the Big Cat

Re: [re-unsolved] Mingw compiling problems

Post by Nickel_Plate »

Used Cygwin for a long time.

Having installed Mingw as per Terkhen instructions and installed SVN, can download Source and compile.
This is a method for getting a working MinGW/MSYS installation that is able to compile OpenTTD. It is just a step-by-step description of the method posted by Rubidium at the discussion page of the wiki. Once this gets tested I welcome anyone interested to complete this and update the wiki (which is not very helpful right now). Note that this method still misses libicu.
But when i try to patch source all i get is this. Have tried 2 or 3 different patchs and relevant source files. Have i Missed something.

(Stripping trailing CRs from patch.)
patching file src/vehicle_cmd.cpp
Hunk #1 FAILED at 419.
1 out of 1 hunk FAILED -- saving rejects to file src/vehicle_cmd.cpp.rej
(Stripping trailing CRs from patch.)
patching file src/vehicle_type.h
Hunk #1 FAILED at 65.
1 out of 1 hunk FAILED -- saving rejects to file src/vehicle_type.h.rej
(Stripping trailing CRs from patch.)
patching file src/viewport.cpp
Hunk #1 FAILED at 41.
Hunk #2 FAILED at 100.
Hunk #3 FAILED at 393.
Hunk #4 FAILED at 486.
Hunk #5 FAILED at 607.
Hunk #6 FAILED at 846.
Hunk #7 FAILED at 870.
Hunk #8 FAILED at 907.
Hunk #9 FAILED at 1007.
Hunk #10 FAILED at 1027.
Hunk #11 FAILED at 1057.
Hunk #12 FAILED at 1602.
Hunk #13 FAILED at 1901.
Hunk #14 FAILED at 1959.
Hunk #15 FAILED at 1984.
Hunk #16 FAILED at 2101.
Hunk #17 FAILED at 2381.
Hunk #18 FAILED at 2519.
Hunk #19 FAILED at 3159.
19 out of 19 hunks FAILED -- saving rejects to file src/viewport.cpp.rej
(Stripping trailing CRs from patch.)
patching file src/viewport_func.h
Hunk #1 FAILED at 20.
Hunk #2 FAILED at 71.
Hunk #3 FAILED at 90.
3 out of 3 hunks FAILED -- saving rejects to file src/viewport_func.h.rej
(Stripping trailing CRs from patch.)
patching file src/viewport_type.h
Hunk #1 FAILED at 14.
Hunk #2 FAILED at 78.
Hunk #3 FAILED at 99.
3 out of 3 hunks FAILED -- saving rejects to file src/viewport_type.h.rej
(Stripping trailing CRs from patch.)
patching file src/void_cmd.cpp
Hunk #1 FAILED at 13.
Hunk #2 FAILED at 41.
Hunk #3 FAILED at 69.
3 out of 3 hunks FAILED -- saving rejects to file src/void_cmd.cpp.rej
(Stripping trailing CRs from patch.)
patching file src/watch_gui.cpp
(Stripping trailing CRs from patch.)
patching file src/watch_gui.h
(Stripping trailing CRs from patch.)
patching file src/water_cmd.cpp
Hunk #1 FAILED at 860.
Hunk #2 FAILED at 877.
2 out of 2 hunks FAILED -- saving rejects to file src/water_cmd.cpp.rej
(Stripping trailing CRs from patch.)
patching file src/window.cpp
Hunk #1 FAILED at 2185.
1 out of 1 hunk FAILED -- saving rejects to file src/window.cpp.rej
(Stripping trailing CRs from patch.)
patching file src/window_type.h
Hunk #1 FAILED at 78.
Hunk #2 FAILED at 111.
2 out of 2 hunks FAILED -- saving rejects to file src/window_type.h.rej

Cyril@OFFICE-ONE ~/OTTDSource/Trunk
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Lord Aro »

Sounds like an old patch to me. What patch is it?
A bit odd that every single 'hunk' should fail though...
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Nickel_Plate
Traffic Manager
Traffic Manager
Posts: 146
Joined: 27 Dec 2004 19:37
Location: Home of the Big Cat

Re: [re-unsolved] Mingw compiling problems

Post by Nickel_Plate »

It was a Chillcore patch r20634
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Lord Aro »

Chillcores patch usually only works with the specific version that it's made for. I'm guessing that you're applying against the same version as the patch was made for?
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Nickel_Plate
Traffic Manager
Traffic Manager
Posts: 146
Joined: 27 Dec 2004 19:37
Location: Home of the Big Cat

Re: [re-unsolved] Mingw compiling problems

Post by Nickel_Plate »

Yes, I'm careful about that because of conflicts.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [re-unsolved] Mingw compiling problems

Post by Terkhen »

Nickel_Plate: Assuming that you are trying to patch the correct revision, I'm guessing that this is just msys version of patch being stupid about EOLs. Try to convert the patch to DOS EOL format before patching. For this you can use an editor such as Notepad++ or the command unix2dos (which IIRC is included under the msys-cygutils package, which you would need to install manually).

Edit: I'm not sure if DOS was the right one. If not, try to convert them to UNIX style too.

A few days ago, a new official installer for MinGW was released (mingw-get-inst). It can install and update installed packages very easily, and comes with a complete version of MinGW/MSYS (sadly, some packages are still not supported). I'll update the wiki adapting the posted method to this new installer along the weekend. If someone wants to try the new installer before this happens, any comments will be appreciated.
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Lord Aro »

Oh yes, i seem to remember the wiki saying that the latest version of msys comes witb a broken patch.exe
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Nickel_Plate
Traffic Manager
Traffic Manager
Posts: 146
Joined: 27 Dec 2004 19:37
Location: Home of the Big Cat

Re: [re-unsolved] Mingw compiling problems

Post by Nickel_Plate »

Have downloaded Notepad++ and converted to unix, still no good.

If the new installer still has broken PATCH.EXE then still will not work.

Anyone have previous PATCH.EXE they could e-mail me to try.

?( ?(
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Lord Aro »

I suggest downloading the copy of msys linked to from the wiki
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Nickel_Plate
Traffic Manager
Traffic Manager
Posts: 146
Joined: 27 Dec 2004 19:37
Location: Home of the Big Cat

Re: [re-unsolved] Mingw compiling problems

Post by Nickel_Plate »

Used PATCH.EXE as advised and patched Chillcore's latest diff with no trouble.

Thanks.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [re-unsolved] Mingw compiling problems

Post by Terkhen »

The wiki is now up to date. Please check/test for any errors or problems.

I was able to compile OpenTTD with chipp_v9_9_5_compatible_v9_9_4_r20634.diff applied without problems (besides a huge amount of warnings), so I'm assuming that the patch command included with this recent version of MSYS is free of the mentioned problem.
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Lord Aro »

Terkhen: i cannot get subversion to install, due to not having administrative rights. Do you think you could add a version like there was previously? (or something)
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [re-unsolved] Mingw compiling problems

Post by Terkhen »

I have reverted the subversion installation instructions to their previous state.
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Lord Aro »

thanks, but now i'm stuck again:

wget does not appear to get installed, i get the error:

Code: Select all

sh: wget: command not found
i realise that i can install to packages manually anyway, but where do i put them?
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [re-unsolved] Mingw compiling problems

Post by Terkhen »

Hmmm... It seems that it does not come with wget by default (mine was using a different wget in my PATH). I'm going to update the tutorial, but you can install wget just by typing in MSYS:

Code: Select all

mingw-get install msys-wget
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [re-unsolved] Mingw compiling problems

Post by Terkhen »

Since r21044, OpenTTD requires an additional library (liblzma) to be compiled successfully. Check the additional step added to the MinGW tutorial for details on how to install it.
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: [re-unsolved] Mingw compiling problems

Post by Lord Aro »

Thanks Terkhen.
I was going to attempt it myself, but judging by its complicated-ness, i would have failed anyway :lol:
And besides, you got there first :)
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot] and 21 guests