[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
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 »

Nope, still doesn't work - i'm going to recon that it's becaus of the lack of admin rights
/me gives up (for now)
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
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: [re-unsolved] Mingw compiling problems

Post by oberhümer »

I don't think there are any admin rights in MSYS, do you mean on the computer itself?
That shouldn't be a problem, I managed setting up my complete MinGW environment using a computer on which I had none.

...So what exactly is going on this time?
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
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 »

same error as before...
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
User avatar
Tafidis
Traffic Manager
Traffic Manager
Posts: 157
Joined: 19 Oct 2010 19:49

Re: [re-unsolved] Mingw compiling problems

Post by Tafidis »

There seems to be an issue with the compilation of xz. I have added some comments on the relevant wiki discussion page.

Basically, if you follow the instructions in the guide about unpacking the files in your home folder without using wget, unzip etc from the command line, the xz package does not compile properly (lzma does not get installed). You don't get any (obvious) error messages, but when you try to compile openttd it fails. Actually, ./configure reports that lzma was not found but you can nevertheless install openttd, which is clearly not the case as a makefile is not created. I believe it has to do with the dependencies (gettext-runtime, glib, pkgconfig) which I believe need to be installed in a different folder.

Everything works fine if you use the command line method of unpacking
Citizens Celebrate! First train arrives in <insert your favourite town/station name here>!
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: [re-unsolved] Mingw compiling problems

Post by Eddi »

you probably skipped the end of that sentence where it says you have to give a parameter to configure to continue without lzma.
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 heard about a problem like this one already. The person with the issue forgot to edit his etc\fstab, as described here: http://wiki.openttd.org/Mingw#Setting_up_MSYS
User avatar
Tafidis
Traffic Manager
Traffic Manager
Posts: 157
Joined: 19 Oct 2010 19:49

Re: [re-unsolved] Mingw compiling problems

Post by Tafidis »

@Terkhen: I did edit fstab. I followed the guide exactly. Also the link for pkgconfig in the list of required packages is broken.

Further down, under "compilation and installation of the required packages" the guide prompts you to install msys-wget, msys-unzip and msys-patch. Right below, it says: "alternatively, to the wget/unzip steps ... ". This did NOT work for xz package. I believe it has to do with the dependencies (gettext-runtime, glib, pkgconfig) which are unzipped using /mingw argument (when using shell commands). Because what I did to solve this was to copy the downloaded (compressed) packages to the home folder and use the shell commands to unzip and install (instead of just extracting using 7-zip in windows).
Citizens Celebrate! First train arrives in <insert your favourite town/station name here>!
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [re-unsolved] Mingw compiling problems

Post by Terkhen »

That alternative looks quite outdated. In the xz prerrequisites case, you need to unzip them to the correct folder or they will not work (or copy them after extraction, but that is not mentioned in the tutorial). Since it is confusing to mention two methods I have just removed the "alternatively" line from the tutorial.

Regarding your comments on the Talk page: it is possible to compile OpenTTD without lzma support using ./configure --without-lzma. It is not a great idea, because then you will not be able to load savegames saved with lzma or connect to servers that use lzma. Check the readme for details.
User avatar
Tafidis
Traffic Manager
Traffic Manager
Posts: 157
Joined: 19 Oct 2010 19:49

Re: [re-unsolved] Mingw compiling problems

Post by Tafidis »

Well, you can still download the packages from the links and copy them to the home folder, and then use unzip command lines as instructed in the page to copy them to the correct folder (which is what I did). Also, the alternative method works fine with all other packages.

But I agree with you it is confusing to mention two methods
Citizens Celebrate! First train arrives in <insert your favourite town/station name here>!
noodless
Engineer
Engineer
Posts: 12
Joined: 05 Jun 2011 15:29

Re: [re-unsolved] Mingw compiling problems

Post by noodless »

So how do we get the lzma files to work as they should, noting I followed the command-line manner of unpacking things?
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [re-unsolved] Mingw compiling problems

Post by Terkhen »

In theory, by following the tutorial line by line. Did you do anything different? Did you get any errors while installing any of the libraries? What error are you getting with lzma?
noodless
Engineer
Engineer
Posts: 12
Joined: 05 Jun 2011 15:29

Re: [re-unsolved] Mingw compiling problems

Post by noodless »

'lmza was not detected or disabled' ; I followed every direction word-for-word too.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: [re-unsolved] Mingw compiling problems

Post by Alberth »

that's what OpenTTD says, right?

that means it cannot find lzma.
Assuming you did install that library, where did you install it, did you get any wanrings or errors there, how did you install it?

Edit: In other words, we need DETAILS before we can help you. Something as small as a single letter typo can make a difference. How exactly did you do each step of the way. What did the computer report? We cannot read what you typed at your computer to verify your conclusions.
Last edited by Alberth on 05 Jun 2011 19:49, edited 1 time in total.
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: [re-unsolved] Mingw compiling problems

Post by Terkhen »

Strange, it is the second time I get a report like this one... Tomorrow I'll uninstall MinGW and repeat the tutorial to test if something changed.

EDIT: Getting the answers to Alberth's questions will help when I check this :)
User avatar
Tafidis
Traffic Manager
Traffic Manager
Posts: 157
Joined: 19 Oct 2010 19:49

Re: [re-unsolved] Mingw compiling problems

Post by Tafidis »

noodless wrote:'lmza was not detected or disabled' ; I followed every direction word-for-word too.
You probably forgot /mingw argument when unpacking the prerequisites for the xz package (last one in the tutorial). I had the same problem.

Check the command lines for the xz package more carefully.
Citizens Celebrate! First train arrives in <insert your favourite town/station name here>!
noodless
Engineer
Engineer
Posts: 12
Joined: 05 Jun 2011 15:29

Re: [re-unsolved] Mingw compiling problems

Post by noodless »

While compiling, now I have this error to do with the ai_config.CPP file.

Image
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 checked the tutorial completely and updated some parts of it. The liblzma part did not require any updates and worked fine for me.

noodless: You moved from the libzlma issue without mentioning if you managed to fix it... Please give complete explanations of what you do, otherwise we won't be able to help you.

Is liblzma now being detected correctly by your OpenTTD configure? Or did you just compile without liblzma?

Also, judging from your screenshot, your home folder for MSYS is located at your desktop folder. If you followed the tutorial line by line, your home folder should be in C:\MinGW\msys\1.0\home\username. The other person which had problems with compiling liblzma also had his home folder in a location different from the standard one. My guess is that both of you have installed something that messes up with MinGW/MSYS default directories by redefining folder location via environment variables or registry keys. I have no clue of what program might be causing this issue, though.
noodless
Engineer
Engineer
Posts: 12
Joined: 05 Jun 2011 15:29

Re: [re-unsolved] Mingw compiling problems

Post by noodless »

Terkhen wrote:I checked the tutorial completely and updated some parts of it. The liblzma part did not require any updates and worked fine for me.

noodless: You moved from the libzlma issue without mentioning if you managed to fix it... Please give complete explanations of what you do, otherwise we won't be able to help you.

Is liblzma now being detected correctly by your OpenTTD configure? Or did you just compile without liblzma?

Also, judging from your screenshot, your home folder for MSYS is located at your desktop folder. If you followed the tutorial line by line, your home folder should be in C:\MinGW\msys\1.0\home\username. The other person which had problems with compiling liblzma also had his home folder in a location different from the standard one. My guess is that both of you have installed something that messes up with MinGW/MSYS default directories by redefining folder location via environment variables or registry keys. I have no clue of what program might be causing this issue, though.
Yes, I went back and modified the file in etc so now it reads the liblzma files.
hgnmu128
Engineer
Engineer
Posts: 29
Joined: 31 May 2011 02:22

Re: [re-unsolved] Mingw compiling problems

Post by hgnmu128 »

Terkhen wrote:I checked the tutorial completely and updated some parts of it. The liblzma part did not require any updates and worked fine for me.
I had already taken the privilege of updating the link to pkg-config, but it seems it wasn't needed after all. And why did you remove the 'don't panic' part?
Terkhen wrote:My guess is that both of you have installed something that messes up with MinGW/MSYS default directories by redefining folder location via environment variables or registry keys. I have no clue of what program might be causing this issue, though.
I think it is because when MinGW is installed onto the desktop there are spaces in the path name, which causes the pathname string to terminate earlier than expected (at the space) and take the rest as a parameter or something. I believe 'the other person' has also done something similar.

EDIT: noodless: I just saw your screenshot (I hadn't logged into ImageShack), spaces aren't the problem, maybe it is something else.
Last edited by hgnmu128 on 07 Jun 2011 00:13, edited 1 time in total.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2868
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: [re-unsolved] Mingw compiling problems

Post by ChillCore »

noodles wrote: While compiling, now I have this error to do with the ai_config.CPP file.

Code: Select all

[src]Compiling ai/ai_config.cpp
...
There is absolutely nothing wrong with the ai files, the problem you are having is not there but in src/settings_type.h which is included in src/ai/ai_config.cpp (line13).
Your source is patched and you bumped without solving the conflicting code before compiling?

"<< ..." at line 406 is the start of the unsolved conflict,
"== ..." at line 408 is between the codeblocks you need to merge.
">> ..." at line 410 is the end of the conflict.

Depending on what changed in trunk you need to either:
- keep line 407 and get rid of 409.
- keep line 409 and get rid of 407.
- merge line 407 and 409.
- keep line 407 as line 407 and move 409 to its correct location.
- keep both lines ...

Compare the patch you applied with current clean trunk and it should become clear what you should do.
Lines 406, 408 and 410 should be removed after solving the conflict and before compiling.

ps:
After solving this conflict there may be others but ai_config.cpp should compile if you did the correct thing.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Baidu [Spider] and 9 guests