make: *** [messages.po] Error 255

lemming_moire
lemming_moire's picture

Joined: 2005-11-03
Posts: 15
Posted: Sat, 2007-06-02 12:19

Hi,

I'm Óscar (the spanish trasnlator) and I have a little problem.

I'll translate the lastest g2 svn source and when I do "make es.po" in any po folder I get the following error:
make: *** [messages.po] Error 255

If I try do "make es.po" in any older g2 it works perfetly.

I try make and gmake (is same, i'm using Gentoo Linux).

And, if I do "make install PO=es" (or make install only) i get this error:
************************************************************
WARNING: We detected the following as your g2data dir but
this directory does not appear to exist. We will be unable
to copy new .mo files into the g2data/locale directory until
this is fixed.

shell php > Parse error: syntax error, unexpected '<' in php shell code on line 1 >

Alternatively, point your browser at gallery2/lib/support,
click the "Filesystem Permissions" link and then click
the 'Make the locale folder read/write' link
************************************************************
make: *** [messages.po] Error 255

The g2data folder exists and this permisions are fine.

Ah!, and g2 works fine (I can create folders, upload items, etc...).

 
lemming_moire
lemming_moire's picture

Joined: 2005-11-03
Posts: 15
Posted: Mon, 2007-06-04 12:23

Yes, I have the same problem. And if I try to make new language I get the same error too.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2007-06-05 02:23

try editing lib/tools/po/GNUmakefile.inc, line 27.. starts with G2DATA =
remove the <?php and ?> tokens in that line. so now it should look like $(shell echo 'include(...........gallery.base");'
does that change anything?

 
ermannob
ermannob's picture

Joined: 2004-01-22
Posts: 28
Posted: Tue, 2007-06-05 08:01

Hi mindless,
I'm having the same troubles...
I made the change you suggested, but the error remains. This is the new error message:

Quote:
************************************************************
WARNING: We detected the following as your g2data dir but
this directory does not appear to exist. We will be unable
to copy new .mo files into the g2data/locale directory until
this is fixed.

shell php > /var/www/localhost/g2data/ php >

Alternatively, point your browser at gallery2/lib/support,
click the "Filesystem Permissions" link and then click
the 'Make the locale folder read/write' link
************************************************************
make: *** [messages.po] Error 255

Thanks
-Ermanno (italian translator)

 
lemming_moire
lemming_moire's picture

Joined: 2005-11-03
Posts: 15
Posted: Tue, 2007-06-05 11:12

I get the same error that ermannob, only change the g2data path line (shell php > /var/www/gallery/g2data/ php > in my case).

Greetings.
Óscar (Spanish G2 Translator)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2007-06-05 18:15

what do you get for:
make -v
from the commandline?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2007-06-05 18:20

we can continue to debug this, but for the short term (so you can work on 2.2.2 translations) you can comment out or remove the whole "G2DATA =" line and add a line that just has the right path, like:

G2DATA = /var/www/localhost/g2data

 
lemming_moire
lemming_moire's picture

Joined: 2005-11-03
Posts: 15
Posted: Tue, 2007-06-05 20:53

My "make -v":
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-linux-gnu

The change of G2DATA seems work, but I keep getting the error "make: *** [messages.po] Error 255" when I make "make es.po" or "make install PO=es".

 
ermannob
ermannob's picture

Joined: 2004-01-22
Posts: 28
Posted: Tue, 2007-06-05 21:04

Hi,
here's the output of make -v

Quote:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-linux-gnu

Your suggestion doesn't work. I wrote the right path as you wrote in the reply, but it still outputs error 255 with no description about the error. If I comment out the entire line, I get get error 255 again, complaining about the non-existant directory.

Thanks a lot for your support.

-Ermanno

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2007-06-06 02:59

not really sure what's wrong.. if either of you can PM me temporary ssh access to debug, that would be fastest.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2007-06-06 16:16

got access and debugged, thanks! i'm done working on your systems now.

there are 2 problems.

1) it seems we should not be using "php -a" as it behaves very differently between php-cgi and php-cli. here is the line to use, fix will be in svn trunk shortly.

G2DATA = $(shell echo '<?php include("$(GALLERYDIR)/lib/support/GallerySetupUtilities.class"); $$gallery = new GallerySetupUtilitiesStub(); include("$(GALLERYDIR)/config.php"); print $$gallery->getConfig("data.gallery.base"); ?>' | php -q 2>&1)

2) gentoo /usr/bin/php is compiled with --disable-tokenizer. Our code for parsing strings for translation out of the code now uses the tokenizer.

The tokenizer is built into php by default since PHP 4.3.0, so we decided to use it.. simplified our code quite a bit. Unfortunately that means you'll need to use a different php binary for working with G2 translations. You can compile and install it anywhere, then adjust your path so "php" finds that binary. Sorry!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2007-06-06 16:41

the makefile now detects problem #2 and prints a descriptive error message (instead of just "Error 255" like you got before)

 
ermannob
ermannob's picture

Joined: 2004-01-22
Posts: 28
Posted: Wed, 2007-06-06 17:09

I recompiled my php with tokenizer. Would you like to give it a try?

-ermanno

 
lemming_moire
lemming_moire's picture

Joined: 2005-11-03
Posts: 15
Posted: Wed, 2007-06-06 17:24

Oki, I'm compiling php with tokenizer support. It may be some time.. xDD

I think that this must be in Install Documentation for future users ¿no?

When it finish to compile I tell you the results.

Thanks.
Oscar.

 
ermannob
ermannob's picture

Joined: 2004-01-22
Posts: 28
Posted: Wed, 2007-06-06 17:41

I tried by myself...
After recompiling php with tokenizer, it works. Note that I modified GNUmakefile writing the path of G2DATA.
If I write in GNUmakefile the line you wrote, it gives a Warning about the non-existing g2data, but it performs successfully the update anyway. (?)
Would you (mindless) like me to keep your ssh access open for some more time?

-ermanno

 
lemming_moire
lemming_moire's picture

Joined: 2005-11-03
Posts: 15
Posted: Wed, 2007-06-06 21:29

It's works fine for me after recompile php with tokenizer support (USE=tokenizer in Gentoo) and modified the G2DATA line.

Mindless, I keep ssh access to my machine open because if you need do any new test. When you finish tell me for close it. :)

Ah, and if you need do a new test in a Gentoo machine can have my total support. Can contact with me via Jabber or PM. ;)

Greetings,
Oscar.

PS: Now i go bed, is very late in Spain...

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2007-06-07 01:01

Current svn seems to work on both your systems.
ermannob, if you still see an error with current svn or tomorrow's nightly snapshot then please post the error message here.
(if g2data path doesn't work, it can still build the mo file in the module dir.. it just can't copy the result into g2data/locale.. so not a "fatal" error)

 
ermannob
ermannob's picture

Joined: 2004-01-22
Posts: 28
Posted: Thu, 2007-06-07 07:08

With the new SVN version everything works fine.
Thanks!

-ermanno

 
lemming_moire
lemming_moire's picture

Joined: 2005-11-03
Posts: 15
Posted: Thu, 2007-06-07 10:38

Yes, it works fine. I'm working in traslation now. :)
If i give any error i'll report you.

Thanks.
Oscar.