Saturday, March 12, 2011

GtkGLExt - No love for windows.

I have this running theory: if open source were easy, every one would use it.  I try and use this blog to help with this, and complain when I can't.

This is a work in progress acting as my scratchpad while I work through the issues.  I plan to clean this post up once I am finished.

I am trying to get GtkGLExt working in windows.  Definately not something you would want to do if you don't have experience linux / bash / shell scripting / configure scripts / etc.

First, it seems pretty mandatory that you install cygwin. Also note, by default, it will not put in all the packages you need.  You are going to need to install some extras.  For instance, you will need the package with "ar" in it.

Then you are going to need to figure out how to get to your various places in the file system.  Hint: the "/cygdrive/"  fake directory takes you to the root of your file system, so "C:/" is at "/cygdrive/c/"

Second, straight out of the box gcc (MinGW) is going to crash.  You must run export TEMP="/tmp/" to get the crash to go away.  What a weird crash - no error message or anything.

Then you are going to need to address this problem:
I dealt with it by removing all references to pangox in the configure file.

Then I came upon this problem, elaborated in config.log:
configure:20297: gcc -march=pentium -o conftest.exe -g -O2 -Wall -g -mms-bitfields -mms-bitfields -IC:/gtk+bundle/include/glib-2.0 -IC:/gtk+bundle/lib/glib-2.0/include 

   conftest.c  -LC:/gtk+bundle/lib -lglib-2.0 -lintl 

gcc.exe: : Invalid argument
gcc.exe: : Invalid argument
This problem is due to some '\r' characters getting picked up in the C include paths and the libs path (I presume they come from pkg-config running in windows).  I had to strip them - more on that whenever I update this page.

Sometimes on multiple attempts at make I get this:
.deps/gdkglenumtypes.Plo:1: *** multiple target patterns.  Stop.
The solution to that is to overwrite the relevant .deps folder with the on out of the original zip file.  These files contain dummy text that will then get overwritten again by make.  I am not sure why this occurs in the first place.

Another problem I got was this:
/bin/sh: line 1: glib-mkenums: command not found
This is a perl script that needs to be run. It comes with GTK+.  I am using the GTK+ All-in-one bundle for Windows, installed at C:/gtk+bundle so I needed to include C:/gtk+bundle/bin in my PATH.  You might also get this if you don't have the perl package installed in your cygwin?

No comments:

Post a Comment