'official' MinGW dependencies released

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

'official' MinGW dependencies released

Post by :wumpus: »

Hello!

The MinGW dependencies have been released; this means that you can build OGRE under MinGW (or cygwin) without going through the trouble of building all the dependencies

I need some help testing this stuff. This assumes a working cygwin, you need the following packages as well:
- pkg-config
- autoconf
- automake
- aclocal
- cvs
- mingw-runtime
- gcc
- gcc-mingw
- gcc-mingw-core
- gcc-mingw-c++
- w32api
You can download all of this with the installer on www.cygwin.com.

Note that you do not need the Microsoft DX9 SDK, only my deps.

1) Download the dependencies http://orion.servicez.org/MinGWDependen ... e2.tar.bz2

2) Extract them to /mingw in your cygwin installation

3) Get the latest OGRE CVS head (it won't work with 0.15.x)

4)

Code: Select all

export PATH="$PATH:/mingw/bin"
export ACLOCAL_FLAGS="-I /mingw/share/aclocal"
export PKG_CONFIG_PATH=/mingw/lib/pkgconfig
cd ogrenew
./bootstrap
CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" CXXFLAGS="-O2 -I/mingw/include" LDFLAGS="-L/mingw/lib -L/lib/w32api" ./configure  --with-ft-prefix=/mingw --with-platform=Win32 --with-gl-support=Win32 --disable-static  --host="i686-pc-mingw32" --enable-direct3d
make
make install
mv /usr/local/lib/OgrePlatform.dll /usr/local/bin
5)
don't forget to change the PluginFolder plugins.cfg to the right *FULL* path and filenames; for example.

Code: Select all

PluginFolder=C:\cygwin\usr\local\lib\OGRE
and add

Code: Select all

Plugin=RenderSystem_Direct3D9.dll
(if you want the DX9 plugin)
5) Run the examples in Samples/Common/bin and have fun!
Last edited by :wumpus: on Sat Jan 15, 2005 4:28 pm, edited 7 times in total.
User avatar
xmp
Gnoblar
Posts: 5
Joined: Sat Oct 26, 2002 4:28 pm
Location: London, UK

Post by xmp »

Just been testing it on a plain mingw with msys platform and discovered that plain mingw doesn't come with libz and freetype seems to depend on that, you may wish to add that to the package?

Also because freetype depends on libz you'll want to put
AC_CHECK_LIB(z, gzopen)
above the check for freetype in your configure.in, that way you'll get a more informative error message.
Yet Another Worldforger
http://www.worldforge.org
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I did add the DLL for libz, what file does it exactly need of zlib? the include file? (I only include specific files needed for compiling and linking OGRE, not entire packages)
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

:wumpus: 8)

Thanks, been looking forward to this.
User avatar
xmp
Gnoblar
Posts: 5
Joined: Sat Oct 26, 2002 4:28 pm
Location: London, UK

Post by xmp »

The lib is definately needed not sure about include files.

Edit: at the moment I've got libz's include and header files installed I'll do a grep on OGRE for libz header #includes when I'm done compiling.
Last edited by xmp on Wed Dec 08, 2004 5:19 pm, edited 1 time in total.
Yet Another Worldforger
http://www.worldforge.org
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

xmp, perhaps you should get libz seperately then (make install it, works fine on MSYS), if it doesn't work.

I'll report back later today. ::dances a jig::
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Well libz isn't that big so I can include it fully in the next release
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

I had a similar problem as xmp, Freetype wasn't being detected:

Code: Select all

checking for FreeType - version >= 9.0.0... no
*** The FreeType test program failed to run.  If your system uses
*** shared libraries and they are installed outside the normal
*** system library path, make sure the variable LD_LIBRARY_PATH
*** (or whatever is appropiate for your system) is correctly set.
I make installed libz and (not sure if this is necessary) changed this line in freetype.la

Code: Select all

# Libraries that this one depends upon.
dependency_libs=' /lib/mingw/libz.la'

to

# Libraries that this one depends upon.
dependency_libs=' /mingw/lib/libz.a'

(when you make install libz it puts it in /local/lib, so I moved it)
Everything thing continues on its way until I get this disasterous:

Code: Select all

./configure: line 20421: syntax error near unexpected token `PKG_CHECK_MODULES(CFGTK_DEPS,'
./configure: line 20421: `      PKG_CHECK_MODULES(CFGTK_DEPS, gtkmm-2.0 libglademm-2.0);;'
Any ideas?
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

it appears you need to put pkg.m4 into /usr/share/aclocal (or whatever your aclocal dir is) before bootstrapping
if you don't have that file I'll put it up
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I've uploaded a new package, which includes zlib and all the needed m4 files (I hope) in /mingw/share/aclocal
http://orion.servicez.org/mingw.tar.bz2
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Ouch. I forgot something: you need pkgconfig (to use OGRE), why isn't that package with msys?
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

Hmm, I'm downloading now, I need pkg-config? I thought I saw that somewhere... I can get it seperately if it's not in your dependencies. Sorry for all the trouble with regards to MSYS. Wish me luck. ;)
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

pkg-config is not in my dependencies and won't be, as it's something that should be part of your development environment and not a library.

Yeah good luck :)
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

I got Tor's pkg-config, but I think it may not like MSYS's shell.

Code: Select all

configure: creating ./config.status
./config.status: line 405: syntax error near unexpected token `\"'
./config.status: line 405: `  "\" ) CONFIG_FILES="$CONFIG_FILES \" ;;'
I pop open config.status in an editor and I see lots of:

Code: Select all

  "Tools/PythonInterface/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/PythonInterface/Makefile" ;;
  "\" ) CONFIG_FILES="$CONFIG_FILES \" ;;
  "Tools/PythonInterface/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/PythonInterface/src/Makefile" ;;
  "\" ) CONFIG_FILES="$CONFIG_FILES \" ;;
  "Tools/PythonInterface/misc/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/PythonInterface/misc/Makefile" ;;
  "\" ) CONFIG_FILES="$CONFIG_FILES \" ;;
Any ideas?

If I get rid of the \"'s it goes a bit further, and then complains about not being able to find \.in. Grr, stupid MSYS being so hacky. It's alright, though, but yeah. Any help would be appreciated. Any progress with you xmp?
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Can you send me the config.status and configure files?

wumpus@ogre3d.org
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

Sent. Thanks wumpus, your time is much appreciated. :)
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

There is clearly something wrong in the Tools/PythonInterface definition, this isn't mingw, msys or your fault. Might be a auto* version problem or an instability in head CVS. I'll investigate further.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Please comment out OGRE_BUILD_PYTHON_LINK in configure.in and rebootstrap. I don't understand why this might be needed but it could just be the problem.
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

Tried it, didn't work, similar error. You may be right about auto* not working, but I fubar'd the install, and I feel like reinstaling MSYS clean (been messing around with lots of file deletes, not sure what I've done). Should take a bit, but I gotta run. Just wanted to let ya know that particular fix didn't work. But I am using a rather old versions of auto tools (and indeed, the original automake that came with MSYS didn't even get past the bootstrap level, so I should've known to get a newer version), and I do believe tht may be the problem. Either that, or pkg-config (if auto tools doesn't work, I'll try to make my own pkg-config).

We'll get it workin'. :)

Later.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I don't think the pkg-config is the problem, as it does little else than look up if a library is on your system and provide the linker/compiler flags to use it if so.
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

I updated as much as I could:

automake (GNU automake) 1.9.3

autogen - The Automated Program Generator - Ver. 5.4.7

autoconf (GNU Autoconf) 2.59

ltmain.sh (GNU libtool) 1.4e (1.1162 2002/11/22 22:36:25)

Same problem:

Code: Select all

configure: creating ./config.status
./config.status: line 405: syntax error near unexpected token `\"'
./config.status: line 405: `  "\" ) CONFIG_FILES="$CONFIG_FILES \" ;;'
TTYL
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

What is line 405 now? Nothing with python, I hope?
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

When I comment out the BUILD_PYTHON_LINK thing ./bootstrap fails to finish now, and I can't remember for the life of me whether or not it finished before (it must have, otherwise I wouldn't have said it did). I think I should've deleted aclocal.m4 before rebootstraping? In any case, I *think* it's safe to assume if you do a clean get of the CVS head, commenting out the python part will work.

I went into configure and edited out all the

Code: Select all

"\" ) CONFIG_FILES="$CONFIG_FILES \" ;;
statements, ran config again, another python related error, commented those out from the resulting config.status.

I would start over, just to be sure (so we have a real answer) but right now everything seems to be compiling (I make -k'd when I saw more python related errors).

But whatever, I think your python thing is the solution. I'm just stupid. I'll see though.
User avatar
joshcryer
Gnome
Posts: 351
Joined: Wed Oct 13, 2004 8:22 am

Post by joshcryer »

Okay wumpus, I'm back on track. I think. I just had to see if it would compile (answer: no, but one thing at a time).

Code: Select all

$ ./bootstrap
You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'.
/usr/share/aclocal/pkg.m4:5: warning: underquoted definition of PKG_CHECK_MODULES
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
/usr/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AUTOOPTS
configure.in: installing `./install-sh'
configure.in: installing `./missing'
OgreMain/src/Makefile.am: installing `./depcomp'
Tools/Makefile.am:1: BUILD_PYTHON_INTERFACE does not appear in AM_CONDITIONAL
Tools/Makefile.am:1: BUILD_PYTHON_INTERFACE does not appear in AM_CONDITIONAL
This is what happens on a fresh install of MSYS, after commenting out OGRE_BUILD_PYTHONG_LINK.

No ./configure file is created.

I bootstrappted again:

Code: Select all

/usr/share/aclocal/pkg.m4:5: warning: underquoted definition of PKG_CHECK_MODULES
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
/usr/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AUTOOPTS
Tools/Makefile.am:1: BUILD_PYTHON_INTERFACE does not appear in AM_CONDITIONAL
Again, no ./configure was created. So now I remember why I ran with the OGRE_BUILD_PYTHON_LINK thing uncommented. I just forgot, heh.

edit:

I went and edited /Tools/Makefile.am and got rid of the Python references. I totally remember now, I did this before, too.

When you run it, you do get the same error as before:

Code: Select all

"RenderSystems/GL/src/gtk/Makefile" ) CONFIG_FILES="$CONFIG_FILES RenderSystems/GL/src/gtk/Makefile" ;;
  "RenderSystems/GL/src/SDL/Makefile" ) CONFIG_FILES="$CONFIG_FILES RenderSystems/GL/src/SDL/Makefile" ;;
  "RenderSystems/GL/src/GLX/Makefile" ) CONFIG_FILES="$CONFIG_FILES RenderSystems/GL/src/GLX/Makefile" ;;
  "RenderSystems/GL/src/win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES RenderSystems/GL/src/win32/Makefile" ;;
  "PlugIns/EXRCodec/Makefile" ) CONFIG_FILES="$CONFIG_FILES PlugIns/EXRCodec/Makefile" ;;
  "\" ) CONFIG_FILES="$CONFIG_FILES \" ;;
  "PlugIns/EXRCodec/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES PlugIns/EXRCodec/src/Makefile" ;;
  "\" ) CONFIG_FILES="$CONFIG_FILES \" ;;
  "PlugIns/EXRCodec/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES PlugIns/EXRCodec/include/Makefile" ;;
No references to Python. So. After all that. Yes. Damn me for screwing up the process... what do you think it is?
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I see what is wrong. Ouch. This is really really evil. For some reason, you have some windows crlf line endings in some of the autoconf files. (probably acinclude.m4)
This messes up your autoconf.
You should try to remove them, I'm sorry I don't know the exact command for that right now.
I don't know why it doesn't cause problems for me.
Post Reply