mingw compilation problem

Bugs should be reported at https://savannah.nongnu.org/bugs/?group=glob2
This section is read only for reference.
Locked
quinnteh
Explorer
Explorer
Posts: 36
Joined: Fri Jul 18, 2008 7:32 pm
Location: Melbourne, Australia

mingw compilation problem

Post by quinnteh » Mon Aug 25, 2008 3:37 pm

Hi all,

I'm running Windows XP so I had to compile using mingw. Some time before this I couldn't even get scons to work, but it works now, problem solved by installing in C:\ rather than G:\ (I thought I meant to install in my actual OS drive).

Now I have a new problem:

YeeQin@YEEQIN ~/glob2_source
$ scons mingw=true
scons: Reading SConscript files ...
Checking for C library SDL... no
Could not find libSDL
Checking for C library SDL_ttf... yes
Checking for C library SDL_image... yes
Checking for C library SDL_net... yes
Checking for C library speex... no
Could not find libspeex or could not find 'speex/speex.h'
Checking for C library vorbisfile... no
Could not find libvorbisfile
Checking for C library vorbis... no
Could not find libvorbis
Checking for C library ogg... no
Could not find libogg
Checking for C++ header file zlib.h... yes
Checking for C library z... no
Checking for C library zlib1... no
Could not find libz or zlib1.dll
Checking for C++ header file regex.h... no
Could not find regex.h
Checking for C library boost_thread... no
Checking for C library boost_thread-mt... no
Could not find libboost_thread or libboost_thread-mt or boost/thread/thread.hpp
Checking for C++ header file boost/shared_ptr.hpp... yes
Checking for C++ header file boost/tuple/tuple.hpp... yes
Checking for C++ header file boost/tuple/tuple_comparison.hpp... yes
Checking for C++ header file boost/logic/tribool.hpp... yes
Checking for C++ header file boost/lexical_cast.hpp... yes
Checking for C++ header file boost/date_time/posix_time/posix_time.hpp... yes
Checking for C library GL... no
Checking for C library GL... no
Checking for C library opengl32... yes
Checking for C++ header file GL/gl.h... no
Could not find libGL or opengl32, or could not find GL/gl.h or OpenGL/gl.h
Checking for C library GLU... no
Checking for C library GLU... no
Checking for C library glu32... yes
Checking for C++ header file GL/glu.h... no
Could not find libGLU or glu32, or could not find GL/glu.h or OpenGL/glu.h
Checking for C library fribidi... no
Checking for C library portaudio... no
Missing SDL
Missing speex
Missing vorbisfile
Missing vorbis
Missing ogg
Missing zlib
Missing regex
Missing libboost_thread
Missing OpenGL
Missing GLU


Does this look familiar to anyone? Any advice will be appreciated, thanks.

By the way, in the mingw compilation instructions page http://globulation2.org/wiki/Mingw_compilation, does the 'Compiling Prerequisites' mean to tell us how to compile the prerequisites? Or is it just telling us what is required before compiling? So there's a bit of ambiguity there, now since in that section we're not actually told to compile anything, i've assumed the latter but if it actually means the former then I suppose it requires correction.

K776
Warrior
Warrior
Posts: 61
Joined: Sat Nov 26, 2005 10:23 pm
Location: New Zealand
Contact:

Re: mingw compilation problem

Post by K776 » Mon Aug 25, 2008 10:27 pm

The MinGW installation and use is very path specific (C:\). If you have a different drive (in your case G:\), then you'll have to edit quite a few config paths (/bin/scons and SConstruct are the only ones that comes to mind, but I believe there is at least one more place.

As for the prerequisites, its a tarball full of files necessary for it to compile, a prerequisite.

quinnteh
Explorer
Explorer
Posts: 36
Joined: Fri Jul 18, 2008 7:32 pm
Location: Melbourne, Australia

Re: mingw compilation problem

Post by quinnteh » Tue Aug 26, 2008 10:16 am

Don't worry about the path stuff, that's already been fixed by reinstalling everything and using C:\, I thought I would just share it to prevent anybody from making the same mistake.

As for the tarball, so you mean that step is simply about unzipping those prerequisites to make them available? Assuming it went well, where are the new files supposed to be? In my case it created a bin\ directory and a local\ directory. And I still do not understand how I should fix the problem of all those missing files when I try to compile the source...

K776
Warrior
Warrior
Posts: 61
Joined: Sat Nov 26, 2005 10:23 pm
Location: New Zealand
Contact:

Re: mingw compilation problem

Post by K776 » Tue Aug 26, 2008 11:12 am

You're using the command on the MinGW compilation guide to untar them, or doing it manually?

It should place the files in C:\msys\1.0\local and C:\msys\1.0\bin that are needed for compilation.

(pm me an IM so we can talk in real time or pop onto the IRC channel)

quinnteh
Explorer
Explorer
Posts: 36
Joined: Fri Jul 18, 2008 7:32 pm
Location: Melbourne, Australia

Re: mingw compilation problem

Post by quinnteh » Tue Aug 26, 2008 1:09 pm

I see... I actually did both but somehow the 2 folders ended up in my user directory. So I've just manually copied them over to the location you said, still getting the same outputs though. I'm getting on IRC now.

quinnteh
Explorer
Explorer
Posts: 36
Joined: Fri Jul 18, 2008 7:32 pm
Location: Melbourne, Australia

Re: mingw compilation problem

Post by quinnteh » Wed Sep 03, 2008 7:37 pm

Sigh it seems like we never bump into each other on IRC so I'll just go on here.

Anyway I still don't get why it can detect the SDL stuff, zlib.h, and the boost stuff, but can't detect everything else. When everything is in the same place.

I presume it looks for those stuff in the /local/include folder? Well, the vorbis stuff are in a /vorbis folder in the /local/include folder, and so is the boost stuff (in its own /boost folder) But it can detect the boost stuff and not the vorbis stuff. They're both in their respective folders, both of which are at the same place. So why can't it detect one of them when it can detect the other?....

quinnteh
Explorer
Explorer
Posts: 36
Joined: Fri Jul 18, 2008 7:32 pm
Location: Melbourne, Australia

Re: mingw compilation problem

Post by quinnteh » Wed Sep 03, 2008 8:05 pm

Alright my presumption that it would look in the /local/include folder could have been way off, so please correct me if I'm wrong.

I looked at SConstruct and noticed these lines:

if not conf.CheckLib("SDL_net") and not server_only:
print "Could not find libSDL_net"
missing.append("SDL_net")
if not conf.CheckLib("speex") or not conf.CheckCXXHeader("speex/speex.h") and not server_only:
print "Could not find libspeex or could not find 'speex/speex.h'"
missing.append("speex")

Based on the output I got when I tried to compile, the part where it checked for speex is where it started to go wrong. So can anybody tell me what does

if not conf.CheckLib("SDL_net") and not server_only:

do? I mean, where would it check for "SDL_net"? Wherever it is, it found SDL_net there but not speex, and I've looked at every folder in my computer (seriously) where libSDL_net is present. It turned out that libspeex is present in all of those folders too! And so are all the other lib- files that are apparently missing!

So does anybody know whether it is possible for scons to "miss" files while looking for them even though they are right there?

K776
Warrior
Warrior
Posts: 61
Joined: Sat Nov 26, 2005 10:23 pm
Location: New Zealand
Contact:

Re: mingw compilation problem

Post by K776 » Wed Sep 03, 2008 9:02 pm

I have a copy of the MinGW on the computer I'm writing this from. And it runs without any problems.

You might try uninstall everything, and follow the guide (Which at quick glance looks up-to-date) from top to bottom, without any variation (exact paths, exact commands, dont jump ahead). Then let me know how it goes.

quinnteh
Explorer
Explorer
Posts: 36
Joined: Fri Jul 18, 2008 7:32 pm
Location: Melbourne, Australia

Re: mingw compilation problem

Post by quinnteh » Thu Sep 04, 2008 6:50 am

I already did that, this is my second installation, and it has no variations from the guide, other than the fact that my OS is installed in G:\ instead of C:\, which I'd rather not change...

But okay I'll try it again when I get home. I'm at uni now.

K776
Warrior
Warrior
Posts: 61
Joined: Sat Nov 26, 2005 10:23 pm
Location: New Zealand
Contact:

Re: mingw compilation problem

Post by K776 » Thu Sep 04, 2008 8:44 am

Well as I've said before, it's designed for C:\. Scripts point at C:\. And I'm not reinstalling my OS on G:\ to make it compatible sorry.

If its not a windows specific compilation wanted, you could always download ubuntu, debian, mandriva, opensuse etc etc etc and dual boot. Would be a lot easier.

quinnteh
Explorer
Explorer
Posts: 36
Joined: Fri Jul 18, 2008 7:32 pm
Location: Melbourne, Australia

Re: mingw compilation problem

Post by quinnteh » Thu Sep 04, 2008 11:34 am

Hang on a second, do you mean the OS drive does make a difference? All along I've assumed that it makes no difference, just that it likes C:\

quinnteh
Explorer
Explorer
Posts: 36
Joined: Fri Jul 18, 2008 7:32 pm
Location: Melbourne, Australia

Re: mingw compilation problem

Post by quinnteh » Thu Sep 04, 2008 8:30 pm

The other thing that doesn't make sense is that it apparently looked for openGL libraries and gl.h, but there didn't seem to be any gl related stuff included in either the source code or in the glob2_required_libs folders, except for SDL_opengl.h. Is that what it was supposed to be looking for?

If not, nowhere was it stated that we were supposed to provide our own openGL libraries and files!

K776
Warrior
Warrior
Posts: 61
Joined: Sat Nov 26, 2005 10:23 pm
Location: New Zealand
Contact:

Re: mingw compilation problem

Post by K776 » Thu Sep 04, 2008 9:35 pm

Everything you need is in the zip file. If it can't find something, either the zip file was unpacked incorrectly, or the install isn't corrrect. I've run through the guide and it appears to still be current (apart from port audio missing which I'll fix later on).

quinnteh
Explorer
Explorer
Posts: 36
Joined: Fri Jul 18, 2008 7:32 pm
Location: Melbourne, Australia

Re: mingw compilation problem

Post by quinnteh » Fri Sep 05, 2008 10:00 am

Well I've done everything in that guide to the letter for the third time, and I'm still getting the same outputs.

Some of the needed stuff are detected, and some are not detected. Of those that are not detected, some of them are actually available, while some others are genuinely not available:

$ scons mingw=true
scons: Reading SConscript files ...
Checking for C library SDL... yes
Checking for C library SDL_ttf... yes
Checking for C library SDL_image... yes
Checking for C library SDL_net... yes
Checking for C library speex... no
Could not find libspeex or could not find 'speex/speex.h' <==== it's actually there but undetected
Checking for C library vorbisfile... no
Could not find libvorbisfile <==== it's actually there but undetected
Checking for C library vorbis... no
Could not find libvorbis <==== it's actually there but undetected
Checking for C library ogg... no
Could not find libogg <==== it's actually there but undetected
Checking for C++ header file zlib.h... yes
Checking for C library z... no
Checking for C library zlib1... no
Could not find libz or zlib1.dll <==== it's actually there but undetected
Checking for C++ header file regex.h... no
Could not find regex.h <==== it's actually there but undetected
Checking for C library boost_thread... no
Checking for C library boost_thread-mt... no
Could not find libboost_thread or libboost_thread-mt or boost/thread/thread.hpp <==== it's actually there but undetected
Checking for C++ header file boost/shared_ptr.hpp... yes
Checking for C++ header file boost/tuple/tuple.hpp... yes
Checking for C++ header file boost/tuple/tuple_comparison.hpp... yes
Checking for C++ header file boost/logic/tribool.hpp... yes
Checking for C++ header file boost/lexical_cast.hpp... yes
Checking for C++ header file boost/date_time/posix_time/posix_time.hpp... yes
Checking for C library GL... no
Checking for C library GL... no
Checking for C library opengl32... yes
Checking for C++ header file GL/gl.h... no
Could not find libGL or opengl32, or could not find GL/gl.h or OpenGL/gl.h <==== this was NOT included in the package
Checking for C library GLU... no
Checking for C library GLU... no
Checking for C library glu32... yes
Checking for C++ header file GL/glu.h... no
Could not find libGLU or glu32, or could not find GL/glu.h or OpenGL/glu.h <==== not included in the package either
Checking for C library fribidi... no
Checking for C library portaudio... no
Missing speex
Missing vorbisfile
Missing vorbis
Missing ogg
Missing zlib
Missing regex
Missing libboost_thread
Missing OpenGL
Missing GLU



Although gl.h was not included, SDL_opengl.h was. Are they related?

Locked