Showing posts with label compile. Show all posts
Showing posts with label compile. Show all posts

Sunday, January 30, 2011

Compiling (Pre-Packaged) GIMP on Windows!

Finally, after all the promises, I'm proud to announce that I finished the Guide for compililng (a pre-packaged version) GIMP on windows! The technique is using MSYS and MinGW, and without Cygwin - which means it's a native windows build!

What does it mean Pre-Packaged? It means a source package that you download from the website, and not the latest one from the version control system (Git in GIMP's case). Pre-Packeged version are not exactly the same you get from Git, and they passed an additional step that makes the compilation a bit easier. The additional steps for compiling the Git versions will be posted (hopefully) later this week.

On which version was this tested? On GIMP 2.7.1

The guide can be found here.
Update - fixed a small mistake which caused some stuff to be extracted to the wrong place.

Friday, January 14, 2011

A very complete guide about compiling GIMP (Linux)

I have just published a very very detailed guide about compiling GIMP from source, with explanations of what does each step mean (instead of just giving commands for people to follow like dummies). You can find it here.

Corrections/Suggestions/Comments will be happily accepted!

Update (15 Jan, 2011): Added instructions about updating your build

Thursday, October 21, 2010

Fixing errors with NAN (C const) and GCC

Today, I was compiling GEGL on a computer other than my regular one, and I got this wonderful error:
exp-combine.c: In function 'gegl_expcombine_new_exposure':
exp-combine.c:149: error: 'NAN' undeclared (first use in this function)
exp-combine.c:149: error: (Each undeclared identifier is reported only once
exp-combine.c:149: error: for each function it appears in.)
The error happens only on certain machines with some versions of gcc, and I it may happen in the most unexpected times...
So, I thought I'd share the solution for this problem with you since I had it in several more projects which use the NAN constant. Basically, NAN is a constant for a floating point value, which represents value that is Not A Number (not to be confused with the value which represents infinity). This value is usually (see note at the end) returned when dividing zero by zero, and therefore it can be added to gcc's definitions by adding the following argument to the command line:
-DNAN="(0.0/0.0)"
This is equivalent to adding the following line in C
#define NAN (0.0/0.0)
Now, there is only a little problem - what if we are not running GCC ourselves? What if a makefile or some other utility does this? Well, with most configure scripts (These scripts prepare the build environment and generate the makefiles) you can simply set the CFLAGS environment variable (before running the configure script) to fix this - in bash syntax this would be:
export CFLAGS="-DNAN=\"(0.0/0.0)\""
This solved my problems :)
Reference - http://old.nabble.com/Where-is-NAN-Defined--td15398150.html, http://linuxreviews.org/howtos/compiling/
As the original email list say, NAN is defined on some platforms and it's undefined on others, and our definition may not always work. From my experience, in the few cases were NAN wasn't defined, the fix presented here was enough.

Edit: I’d recommend checking the first comment below, from Martin Nordholts – he seems to offer another legitimate (and possibly more elegant) solution by telling GCC to use the gnu99 C standard.

Thursday, June 10, 2010

GIMP is alive, even if it doesn't look so

Recently, there was a mail to the gimp mailing list, that suggested selling some gimp stuff in an online shop in the gimp website (gimp stickers, mugs, T-shirts, etc.). I like the eidea, but this isn't what I came to discuss todau. Here are 2 quotes from the responses that the suggestion got:

On Wed, Jun 9, 2010 at 8:27 PM, Alexandre Prokoudine wrote:
One of the things discussed at LGM was moving all project's domain and subdomains to a single dedicated server. We have a person willing to do the migration and a person to create a new website.
On Wed, Jun 9, 2010 at 8:50 PM, Michael Schumacher wrote:
We're currently unable to update the website (if you have a look at the index page, even the release announcements aren't up to date).

Until this is resolved, we won't be able to add, edit or remove anything to, on or from http://www.gimp.org/.
Some of you are probably going to respond like this: "WTF?! You have a website and you can't update it?!". My response was also something of that style. As developers of open source projects, we don't need the main website to know it's alive. However, the gimp user community probably think that this project is dead (6+ months without a single update of the site, not even about a call for students for Google Summer of Code!).

So, after some discussions yesterday, in a thread that I started (and you can see the conversation here) several things happened:
  • The maintainer of the server was contacted - the site is going to be fixed soon (Thanks to Alexia Death that started working on it recently, even before this mailing session). Although the actual length of "soon" may vary, it's on the TODO list.
  • The idea of some sort of developer blogs was raised, and several people volunteered to update them (including me). We'll have to see how does updating the site goes, and maybe we will create these blog(s).
  • There was a recent discussion about weekly/daily builds. These builds will serve us by allowing other people to find bugs, and it will serve the community by showing them the latest developments (and that the gimp project is still alive). It wasn't decided yet if there will be such builds - some developers object (since this can generate many useless bug reports if people who don't understand gimp will try the betta) and some support this (since people are already using such builds, so let's make it controlled so we get reports from builds in controlled enviroments).
  • New builds will hopefully be released soon:
    • A new stable version release 2.6.X with some more bugfixes 
    •  A new unstable build, 2.7.X to replace the old one. This will allow users to see the new features and report bugs so we can fix them. Hopefully, there will be more frequent unstable builds.
    Again, keep in mind that the definition of soon is very flexible...
  • I'm going to post an offical guide on compiling gimp on windows, on the main gimp developer website. This will probably help the people out there who want to try the latest versions, but are using windows (like me) where it's almost impossible to compile gimp :P
And now for some personal updates:
  • Still waiting for my commit acces to the gimp git - I applied a week ago.
  • The PDF export plugin, which I'm working on, will take a bit more time due to the exam period from the unversity.
That's all for today =)