It is currently Fri Apr 26, 2024 6:46 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 1:14 pm  (#1) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
GIMP Version: 2.8-RC1
Operating System: Linux
OS Version: 12.04
GIMP Experience: Intermediate Level

List any relevant plug-ins or scripts:
wavelet decompose



Ok, so here's the thing - I compiled gimp 2.8-rc1 from the source and installed it into /opt, and I don't have gimp 2.6 installed.

Now I'm trying to compile a plugin (wavelet decompose) for 2.8 but keep running into errors - I think the problem is that make doesn't find the required libraries because they're installed in the /opt directory...

Is there an easy way to do this thing? If not, is there a hard way?


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 1:23 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
Here we have already mentioned that if you install Gimp in /opt, many problems with plugins appear. Not exactly with compilation but because they are impossible to use then in Gimp.

For example, can you use G'MIC downloading the binary and copying it to ~/.gimp-2.8/plug-ins/?

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 1:28 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Have you tried building from the c file directory?
gimptool-2.0 --build YourFile.c ?

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 2:10 pm  (#4) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
YAFU wrote:
Here we have already mentioned that if you install Gimp in /opt, many problems with plugins appear. Not exactly with compilation but because they are impossible to use then in Gimp.

For example, can you use G'MIC downloading the binary and copying it to ~/.gimp-2.8/plug-ins/?


Nope, doesn't seem to work... It probably has to do with them being compiled using the 2.6 libraries which are no longer compatible with 2.8... the plugins need to be compiled using the 2.8 libraries.

Rod wrote:
Have you tried building from the c file directory?
gimptool-2.0 --build YourFile.c ?


No... I've only tried compiling by running make.

First error was that it couldn't find gimptool, so I made a link to the 2.8 version of gimptool-2.0 and put it in /bin so make could find it, and that worked.

Then, the next one was that pkg-config couldn't find gimpui, I solved that one easily by exporting PKG_CONFIG_PATH to point to the correct 2.8 directory where it could be found. But then I got stuck with this one:

make -C src install
make[1]: Entering directory `/home/vesa/tmp/wavelet-decompose-0.1.2/src'
No output from 'pkg-config --variable=prefix gimp-2.0'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/vesa/tmp/wavelet-decompose-0.1.2/src'
make: *** [install] Error 2


So now I don't know where to go from here... yeah, I don't exactly know what I'm doing here, I got this far by experimentation and trying to figure stuff out... :p


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 6:19 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
dd wrote:
It probably has to do with them being compiled using the 2.6 libraries which are no longer compatible with 2.8... the plugins need to be compiled using the 2.8 libraries.

I do not think that's the problem. These binaries work fine if you install Gimp 2.7 - 2.8 in the default path.

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 7:35 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Try it without the --prefix for install.
Gimptool-2.0 should be able to build the plugin and not actually install it.
Just build the plugin and install it yourself manually.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 10:34 pm  (#7) 
Offline
GimpChat Member

Joined: Mar 14, 2011
Posts: 998
dd wrote:
YAFU wrote:
Here we have already mentioned that if you install Gimp in /opt, many problems with plugins appear. Not exactly with compilation but because they are impossible to use then in Gimp.

For example, can you use G'MIC downloading the binary and copying it to ~/.gimp-2.8/plug-ins/?


Nope, doesn't seem to work... It probably has to do with them being compiled using the 2.6 libraries which are no longer compatible with 2.8... the plugins need to be compiled using the 2.8 libraries.

Rod wrote:
Have you tried building from the c file directory?
gimptool-2.0 --build YourFile.c ?


No... I've only tried compiling by running make.

First error was that it couldn't find gimptool, so I made a link to the 2.8 version of gimptool-2.0 and put it in /bin so make could find it, and that worked.

Then, the next one was that pkg-config couldn't find gimpui, I solved that one easily by exporting PKG_CONFIG_PATH to point to the correct 2.8 directory where it could be found. But then I got stuck with this one:

make -C src install
make[1]: Entering directory `/home/vesa/tmp/wavelet-decompose-0.1.2/src'
No output from 'pkg-config --variable=prefix gimp-2.0'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/vesa/tmp/wavelet-decompose-0.1.2/src'
make: *** [install] Error 2


So now I don't know where to go from here... yeah, I don't exactly know what I'm doing here, I got this far by experimentation and trying to figure stuff out... :p

Assuming you have the src in home directory in a directory called wavelet-decompose and have installed gimp in say /opt/gimp, do the following from your home directory:
cd wavelet-decompose
gcc src/*.c -O3  -I src -I `echo /opt/gimp/include/gimp-2.0` `pkg-config --cflags --libs glib-2.0`  `pkg-config --cflags --libs gtk+-2.0` `pkg-config --cflags --libs gimp-2.0` `pkg-config --cflags --libs gimpui-2.0` `pkg-config --cflags gimpui-2.0`   -o wavelet-decompose

Let me know if that does not work.


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 10:42 pm  (#8) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
partha wrote:
Let me know if that does not work.


It gives this error

$ gcc src/*.c -o3 -I src `echo /opt/gimp-2.8/include/gimp-2.0` `pkg-config --cflags --libs glib-2.0` `pkg-config --cflags --libs gtk+-2.0` `pkg-config --cflags --libs gimp-2.0` `pkg-config --cflags --libs gimpui-2.0` `pkg-config --cflags gimpui-2.0` -o wavelet-decompose
/usr/bin/ld: cannot find /opt/gimp-2.8/include/gimp-2.0: File format not recognized
collect2: ld returned 1 exit status


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 11:04 pm  (#9) 
Offline
GimpChat Member

Joined: Mar 14, 2011
Posts: 998
dd wrote:
partha wrote:
Let me know if that does not work.


It gives this error

$ gcc src/*.c -o3 -I src `echo /opt/gimp-2.8/include/gimp-2.0` `pkg-config --cflags --libs glib-2.0` `pkg-config --cflags --libs gtk+-2.0` `pkg-config --cflags --libs gimp-2.0` `pkg-config --cflags --libs gimpui-2.0` `pkg-config --cflags gimpui-2.0` -o wavelet-decompose
/usr/bin/ld: cannot find /opt/gimp-2.8/include/gimp-2.0: File format not recognized
collect2: ld returned 1 exit status

That's because you didn't install gimp in /opt/gimp-2.8. Substitute that with the directory where you installed Gimp.


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sat Apr 21, 2012 11:38 pm  (#10) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
Yes I did.. the directory is there, the path is correct, still gives that error.


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sun Apr 22, 2012 5:10 am  (#11) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
Just a few thoughts

Wavelet-decompose was a package request a couple of weeks ago on the PCLOS forum. Packager said "The plugin doesn't work on my x86_64 but I could see it on GIMP's Tools on my i586 so I'm not packaging it. However, I did manage to compile the binary for it."

maybe this has a bearing on your problem.

Some one else confirmed that the 386 binary provided did not work on their 64 bit installation. - not surprising.

I use 32 bit and the binary works fine on my gimp 2.8 RC1 - popped it into my local plugins.
but then,
it is not a complicated plugin and the debian compilation from the gimp-registry-plugins package also works just as well & this is definitely not a debian machine.

There are 32 & 64 bit packages available just unpack the .deb and copy to your plugins folder. Make sure it is executable. Worth a try.
http://packages.debian.org/squeeze/gimp-plugin-registry

If you desperately need wavlet-decompose and until you get your compilation sorted, there is a script that works.
http://registry.gimp.org/node/13549 the order of the layers is a bit different but no great hurdle.

I have great sympathy with your efforts, a few days ago I compiled the gimp-image-register plugin and that was a similar pain even though I have my 2.8RC1 in /users rather than /opt.

_________________
Image


Top
 Post subject: Re: Compiling plugins for 2.8
PostPosted: Sun Apr 22, 2012 6:03 am  (#12) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
Thanks, I'll try those out if I can't manage to compile this...


Top
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) I can't see the whole plugins menu

7

No new posts Attachment(s) Plugins don't work

2

No new posts Having trouble with plugins

2

No new posts Attachment(s) Ulead Plugins

3

No new posts Next time one of my plugins breaks something DM me about it

6



* Login  



Powered by phpBB3 © phpBB Group