gimp.aquaButton

14 views
Skip to first unread message

Roger Mason

unread,
Nov 26, 2011, 11:16:43 AM11/26/11
to amrita...@googlegroups.com
Hello,

I'm looking at the latex::widget document, downloaded from the web
site. I am planning to use it as inspiration for a presentation and
so far have made a few minor edits and renamed it to presentation.amrita.

When I run

amrita presentation.amrita

I get:

Error at line 45 of file
/home/rmason/Software/AMRITA/AMRITAv3.05/stdlib/latex/LTT/AquaPageControls.amr:
Can't loc

Line 45 is:
gimp.aquaButton {--text 'LeadIn' --state normal --scale 1 --fg
0xa82a2a --bg 0xe8e8ff --addstripes no} ?->
/home/rmason/test/amrita/Widget/ship/ps/PageControls/LeadInN.png

I see something similar when trying to run DrinkMe:

amrita DrinkMe
Error at line 36 of file
/home/rmason/Software/AMRITA/AMRITAv3.05/stdlib/latex/LatexMTG.amr:
Can't loc

Line 36 is:
gimp.softenEdges {--colour 0xa82a2a --gran 4 --width 20}
/home/rmason/test/amrita/Drink/ship/ps/tmp.png ->
/home/rmason/test/amrita/Drink/ship/ps/mtg.jpg

I guess this is somthing to do with the gimp issues mentioned in the
DrinkMe realease_notes.

Is anyone aware of a workaround to these problems?

Cheers,
Roger

James Quirk

unread,
Nov 26, 2011, 11:29:22 AM11/26/11
to amrita...@googlegroups.com
Roger,

You will first need to check that your Perl-Gimp interface
is working properly. To do so:

cd $AMRITA/src3p/gimp/2.x
amperl aquaButton

This should bring up a GUI that will allow you to tweak the
button's settings. If it does, enter the button's text
and click the OK button then check the file BAmrita.png .

Now I expect your Perl-Gimp is broken, owing to various
bugs in the public release. Therefore if the above doesn't
work, let me know and I'll send you what I have. It runs
on Ubuntu 11.04 and so shouldn't be too much effort to
get it work on 11.10 .

James
>
> Cheers,
> Roger
>
>

Roger Mason

unread,
Nov 26, 2011, 12:01:03 PM11/26/11
to amrita...@googlegroups.com
Hello James,

James Quirk <j...@galcit.caltech.edu> writes:

> Roger,


>
> You will first need to check that your Perl-Gimp interface
> is working properly. To do so:
>
> cd $AMRITA/src3p/gimp/2.x
> amperl aquaButton
>
> This should bring up a GUI that will allow you to tweak the
> button's settings. If it does, enter the button's text
> and click the OK button then check the file BAmrita.png .
>
> Now I expect your Perl-Gimp is broken, owing to various
> bugs in the public release. Therefore if the above doesn't
> work, let me know and I'll send you what I have. It runs
> on Ubuntu 11.04 and so shouldn't be too much effort to
> get it work on 11.10 .
>
> James

This is what I see:

amrperl aquaButton
Can't locate Gimp.pm in @INC (@INC contains:
/home/rmason/Software/AMRITA/AMRITAv3.05/Amrita /usr/lib/perl/5.12
/etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12
/usr/local/lib/site_perl .) at aquaButton line 3.
BEGIN failed--compilation aborted at aquaButton line 3.

The references to perl-5.12 (the system perl) are puzzling as I'm
running perl-5.8.8 using perlbrew.

perl -v
This is perl, v5.8.8 built for i686-linux

Cheers,
Roger

James Quirk

unread,
Nov 26, 2011, 12:11:09 PM11/26/11
to amrita...@googlegroups.com
James,

> This is what I see:
>
> amrperl aquaButton
> Can't locate Gimp.pm in @INC (@INC contains:
> /home/rmason/Software/AMRITA/AMRITAv3.05/Amrita /usr/lib/perl/5.12
> /etc/perl /usr/local/lib/perl/5.12.4 /usr/local/share/perl/5.12.4
> /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.12 /usr/share/perl/5.12
> /usr/local/lib/site_perl .) at aquaButton line 3.
> BEGIN failed--compilation aborted at aquaButton line 3.
>
> The references to perl-5.12 (the system perl) are puzzling as I'm
> running perl-5.8.8 using perlbrew.
>
> perl -v
> This is perl, v5.8.8 built for i686-linux

aquaButton is run using amrperl:

$AMRITA/tools/amrperl

and so it will pick up whatever perl is set using the #! mwchanism.

Anyhow, I will need to send you my Perl-Gimp, which contains
the module Gimp.pm, before aquaButton will work.

James
>
> Cheers,
> Roger
>
>

James Quirk

unread,
Nov 26, 2011, 1:01:10 PM11/26/11
to amrita...@googlegroups.com
> Anyhow, I will need to send you my Perl-Gimp, which contains
> the module Gimp.pm, before aquaButton will work.
I'v put my copy at:

http://www.galcit.caltech.edu/~jjq/gimp-perl.tar.gz

To install:

tar zxvf gimp-perl.tar.gz
cd gimp-perl
amrperl Makefile.PL
make
make test
make install

The step:

amrperl Makefile.PL

will probably complain that some package dependencies are missing,
but they can be obtained from CPAN.

James

Roger Mason

unread,
Nov 26, 2011, 1:52:48 PM11/26/11
to amrita...@googlegroups.com
Hi James,

James Quirk <j...@galcit.caltech.edu> writes:

> I'v put my copy at:
>
> http://www.galcit.caltech.edu/~jjq/gimp-perl.tar.gz
>
> To install:
>
> tar zxvf gimp-perl.tar.gz
> cd gimp-perl
> amrperl Makefile.PL
> make
> make test
> make install
>
> The step:
>
> amrperl Makefile.PL
>
> will probably complain that some package dependencies are missing,
> but they can be obtained from CPAN.
>
> James

Thank you. Got it. cpan is doing its thing now.

Cheers,
Roger

James Quirk

unread,
Nov 26, 2011, 2:20:52 PM11/26/11
to amrita...@googlegroups.com
Roger,

>
> Thank you. Got it. cpan is doing its thing now.
>
When you've finished installing, check out the directory:

/usr/lib/gimp/2.0/plugin-ins

you may have to rename the file Perl-Server to Perl-Server.pl
and set it to executable by all. At least, that's what I
needed to do at my end.

James
> Cheers,
> Roger
>
>

Roger Mason

unread,
Nov 26, 2011, 2:59:31 PM11/26/11
to amrita...@googlegroups.com
Hi James,

James Quirk <j...@galcit.caltech.edu> writes:

> I'v put my copy at:
>
> http://www.galcit.caltech.edu/~jjq/gimp-perl.tar.gz
>
> To install:
>
> tar zxvf gimp-perl.tar.gz
> cd gimp-perl
> amrperl Makefile.PL
> make
> make test
> make install
>
> The step:
>
> amrperl Makefile.PL
>
> will probably complain that some package dependencies are missing,
> but they can be obtained from CPAN.

I ran into some problems with PDL that I fixed by editing a file in the
cpanm work directory then running make, make install by hand. (see
discussion here:
http://comments.gmane.org/gmane.comp.lang.perl.pdl.general/4881).

However, building gimp-perl fails:

/home/rmason/Software/perlbrew/perls/perl-5.8.8/bin/perl
/home/rmason/Software/perlbrew/perls/perl-5.8.8/lib/5.8.8/ExtUtils/xsubpp
-typemap
/home/rmason/Software/perlbrew/perls/perl-5.8.8/lib/5.8.8/ExtUtils/typemap
-typemap /home/rmason/Downloads/gimp-perl/typemap Lib.xs > Lib.xsc &&
mv Lib.xsc Lib.c
Could not find a typemap for C type 'pdl *' in Lib.xs, line 1993
(4 other lines like this)

Cheers,
Roger

James Quirk

unread,
Nov 26, 2011, 3:10:30 PM11/26/11
to amrita...@googlegroups.com
Roger,

On Sat, 26 Nov 2011, Roger Mason wrote:

Are you sure PDL was installed in 5.8.8 and not 5.8.12?

James


>
> Cheers,
> Roger
>
>

Roger Mason

unread,
Nov 26, 2011, 3:24:55 PM11/26/11
to amrita...@googlegroups.com
Hi James,

James Quirk <j...@galcit.caltech.edu> writes:

> Roger,


>
> Are you sure PDL was installed in 5.8.8 and not 5.8.12?
>
> James

Yes:

find . -iname 'PDL*'
./perls/perl-5.8.8/bin/pdl2
./perls/perl-5.8.8/bin/pdl
....

Time for a cup of tea.

Cheers,
Roger

Roger Mason

unread,
Dec 3, 2011, 9:24:43 AM12/3/11
to amrita...@googlegroups.com
Hello James,

Roger Mason <rma...@mun.ca> writes:

> James Quirk <j...@galcit.caltech.edu> writes:
>
>> Roger,
>>
>> Are you sure PDL was installed in 5.8.8 and not 5.8.12?
>>
>> James
>
> Yes:
>
> find . -iname 'PDL*'
> ./perls/perl-5.8.8/bin/pdl2
> ./perls/perl-5.8.8/bin/pdl
> ....

I don't know what to do next. Any ideas?

Roger

James Quirk

unread,
Dec 3, 2011, 10:06:07 AM12/3/11
to amrita...@googlegroups.com
Roger,

In the instructions I gave you:

> >
> > To install:
> >
> > tar zxvf gimp-perl.tar.gz
> > cd gimp-perl
> > amrperl Makefile.PL
> > make
> > make test
> > make install
> >

replacing amrperl by perl5.8.8 so that there is no confusion
as to which paths are used in the creation of the Makefile.
Also please note the AMRITAv3.05 kit I gave you works with
perl5.10.1, which is the perl version I use with Ububtu 11.04 .
So you might like to give that a whirl if you have it to hand.

Now all that said, your stated aim is to produce a talk. Therefore in your
shoes I would take the last talk you produced, assuming it's LaTeX based,
then I would AMRITA-ize it. This would be done in a series of
steps. The first would simply be to take the LaTeX source and
turn it into a fold-tree. Then when that was done you could
start adding widgets, one at a time. That way you will simply
migrate from the old way of creating a talk to the new,
without all the traum of starting from scratch.

James

Roger Mason

unread,
Dec 3, 2011, 12:28:37 PM12/3/11
to amrita...@googlegroups.com
Hi James,

James Quirk <j...@galcit.caltech.edu> writes:

> Roger,
>
> In the instructions I gave you:
>
>> >
>> > To install:
>> >
>> > tar zxvf gimp-perl.tar.gz
>> > cd gimp-perl
>> > amrperl Makefile.PL
>> > make
>> > make test
>> > make install
>> >
> replacing amrperl by perl5.8.8 so that there is no confusion
> as to which paths are used in the creation of the Makefile.
> Also please note the AMRITAv3.05 kit I gave you works with
> perl5.10.1, which is the perl version I use with Ububtu 11.04 .
> So you might like to give that a whirl if you have it to hand.

I installed perl-5.10.1 but unfortunately compiling gimp-perl with this
version fails:

Lib.c: In function
‘XS_Gimp__Lib_gimp_pixel_rgn_get_pixel’:
Lib.c:2886:2: error: unknown type name ‘error’
Lib.c:2887:5: error: expected ‘=’, ‘,’,
‘;’, ‘asm’ or
‘__attribute__’ before ‘}’ token
Lib.c:2892:1: error: invalid storage class for function
‘XS_Gimp__Lib_gimp_pixel_rgn_get_row’
Lib.c:2893:1: error: invalid storage class for function ‘XS_Gimp__Lib_gimp_pixel_rgn_get_rowâ€

(this is repeated for several locations in Lib.c).

I gave the presentation yesterday and the next thing I do will be to
turn it into a paper.

Cheers,
Roger

James Quirk

unread,
Dec 3, 2011, 1:24:41 PM12/3/11
to amrita...@googlegroups.com
Roger,

On Sat, 3 Dec 2011, Roger Mason wrote:

> Hi James,
>
> James Quirk <j...@galcit.caltech.edu> writes:
>
> > Roger,
> >
> > In the instructions I gave you:
> >
> >> >
> >> > To install:
> >> >
> >> > tar zxvf gimp-perl.tar.gz
> >> > cd gimp-perl
> >> > amrperl Makefile.PL
> >> > make
> >> > make test
> >> > make install
> >> >
> > replacing amrperl by perl5.8.8 so that there is no confusion
> > as to which paths are used in the creation of the Makefile.
> > Also please note the AMRITAv3.05 kit I gave you works with
> > perl5.10.1, which is the perl version I use with Ububtu 11.04 .
> > So you might like to give that a whirl if you have it to hand.
>
> I installed perl-5.10.1 but unfortunately compiling gimp-perl with this
> version fails:
>
> Lib.c: In function

> �EUR~XS_Gimp__Lib_gimp_pixel_rgn_get_pixel�EUR(TM):
> Lib.c:2886:2: error: unknown type name �EUR~error�EUR(TM)
> Lib.c:2887:5: error: expected �EUR~=�EUR(TM), �EUR~,�EUR(TM),
> �EUR~;�EUR(TM), �EUR~asm�EUR(TM) or
> �EUR~__attribute__�EUR(TM) before �EUR~}�EUR(TM) token


> Lib.c:2892:1: error: invalid storage class for function

> �EUR~XS_Gimp__Lib_gimp_pixel_rgn_get_row�EUR(TM)
> Lib.c:2893:1: error: invalid storage class for function �EUR~XS_Gimp__Lib_gimp_pixel_rgn_get_row�EUR


>
> (this is repeated for several locations in Lib.c).

I'm not sure what help you expect me to able to give, for your problems
basically stem from being an early adopter of Uubuntu 11.10 which is known
to have stability issues, see for example:

http://ubuntuforums.org/showthread.php?t=1866548

Sorry,

James

Roger Mason

unread,
Dec 3, 2011, 1:44:59 PM12/3/11
to amrita...@googlegroups.com
Hello James,

James Quirk <j...@galcit.caltech.edu> writes:

Yes, I've had some problems with Ubuntu 11.10 and will revert the
machine to T2 this weekend in all probability. I only installed Ubuntu
at all because I messed up the machine and needed it up and running
quickly. My choice proved to be a mistake.

I did not send the information in the expectation of a fix but as a
report to you and to the list.

Best wishes,
Roger

Roger Mason

unread,
Dec 6, 2011, 2:44:29 PM12/6/11
to amrita...@googlegroups.com
James,

On 03/12/2011 3:14 PM, Roger Mason wrote:
> Yes, I've had some problems with Ubuntu 11.10 and will revert the
> machine to T2 this weekend in all probability. I only installed Ubuntu
> at all because I messed up the machine and needed it up and running
> quickly. My choice proved to be a mistake.
>
> I did not send the information in the expectation of a fix but as a
> report to you and to the list.
>
> Best wishes,
> Roger
>

I have compiled & installed gimp-perl on a T2 box but gimp 2.7.1 does
not play nicely with it (lots of errors running amrperl aquaButton).
What version of gimp do you have?

Thanks,
Roger

--
Roger Mason
Interim Head, Earth Sciences
Memorial University of Newfoundland
(709) 864-2334


This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2011.php

James Quirk

unread,
Dec 6, 2011, 2:49:37 PM12/6/11
to amrita...@googlegroups.com
Roger,

On Tue, 6 Dec 2011, Roger Mason wrote:

> I have compiled & installed gimp-perl on a T2 box but gimp 2.7.1 does not play
> nicely with it (lots of errors running amrperl aquaButton). What version of
> gimp do you have?

I have 2.6.11 .

James


>
> Thanks,
> Roger
>
>

Reply all
Reply to author
Forward
0 new messages