Skip to contentSkip to conversation

Broken build

DISCUSSION Bruce Dubbs 4 participants 7 messages Mar 17, 2010 – Mar 27, 2010

lore
Share & tools
lore
#0 lore raw

With the addition of the internationalization code, building GRUB in a separate directory fails.

mkdir build
cd build
../configure
make

cd .. && /usr/bin/xgettext -ctranslate --from-code=utf-8 -o ../po/grub.pot -f ../po/POTFILES --keyword=_ --keyword=N_ /usr/bin/xgettext: error while opening "../po/POTFILES" for reading: No such file or directory
make: *** [../po/grub.pot] Error 1

This is a regression from GRUB-1.97.2

-- Bruce

#1 lore raw

Hi,

Quoted 2 lines · Bruce Dubbs

With the addition of the internationalization code, building GRUB in a separate directory fails.

I'll take a look into it "soon" (next days or next week)

Probably it's an easy thing, if someone checks it before please report :-)

Thanks for the report,

Signature · 2 lines
Carles Pina i Estany
	http://pinux.info
#2 lore raw
Quoted 4 lines · Carles Pina i Estany

Hi,

On Mar/17/2010, Bruce Dubbs wrote:

Quoted 9 lines
Quoted 3 lines

With the addition of the internationalization code, building GRUB in a separate directory fails.

I'll take a look into it "soon" (next days or next week)

Probably it's an easy thing, if someone checks it before please report :-)

        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@
-f $< --keyword=_ --keyword=N_
to
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@

-f po/POTFILES --keyword=_ --keyword=N_
Feel free to test & commit

Quoted 3 lines

Thanks for the report,

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#3 lore raw
Quoted 13 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 4 lines · Carles Pina i Estany

Hi,

On Mar/17/2010, Bruce Dubbs wrote:

Quoted 8 lines
Quoted 3 lines

With the addition of the internationalization code, building GRUB in a separate directory fails.

I'll take a look into it "soon" (next days or next week)

Probably it's an easy thing, if someone checks it before please report :-)

Quoted 6 lines
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@
-f $< --keyword=_ --keyword=N_
to
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@

-f po/POTFILES --keyword=_ --keyword=N_
Feel free to test & commit

I don't think so. When generated, the makefile has:

$(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ -f
$< --keyword=_ --keyword=N_

which when instantiated by make is:

../po/grub.pot: po/POTFILES po/POTFILES-shell

  cd .. && /usr/bin/xgettext -ctranslate --from-code=utf-8 \
           -o ../po/grub.pot -f po/POTFILES --keyword=_ --keyword=N_

/usr/bin/xgettext: cannot create output file "../po/grub.pot": No such file or directory

If I change this to:

po/grub.pot: $(srcdir)/po/POTFILES $(srcdir)/po/POTFILES-shell
mkdir -p po
$(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ \
-f $< --keyword=_ --keyword=N

I get the error:

/usr/bin/xgettext: error while opening "commands/acpi.c" for reading:
No such file or directory

We need something like:

po/grub.pot: $(srcdir)/po/POTFILES $(srcdir)/po/POTFILES-shell
mkdir -p po
DIR=$PWD

  cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 \
    -o $(DIR)/$@ -f po/POTFILES --keyword=_ --keyword=N

The use of $< is wrong here because of the cd command.

-- Bruce

#4 lore raw
Quoted 14 lines · Bruce Dubbs
Quoted 13 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 12 lines · Carles Pina i Estany

Hi,

Quoted 3 lines · Bruce Dubbs

With the addition of the internationalization code, building GRUB in a separate directory fails.

I'll take a look into it "soon" (next days or next week)

Probably it's an easy thing, if someone checks it before please report :-)

Quoted 8 lines
Quoted 6 lines
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@
-f $< --keyword=_ --keyword=N_
to
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@

-f po/POTFILES --keyword=_ --keyword=N_
Feel free to test & commit

I don't think so.

Well you have a funny way of disagreeing arriving to the same result as I told: replace

        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@
-f $< --keyword=_ --keyword=N_
with
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@

-f po/POTFILES --keyword=_ --keyword=N_
Have you tested it?

Quoted 46 lines

When generated, the makefile has:

$(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ -f
$< --keyword=_ --keyword=N_

which when instantiated by make is:

../po/grub.pot: po/POTFILES po/POTFILES-shell

  cd .. && /usr/bin/xgettext -ctranslate --from-code=utf-8 \
           -o ../po/grub.pot -f po/POTFILES --keyword=_ --keyword=N_

/usr/bin/xgettext: cannot create output file "../po/grub.pot": No such file or directory

If I change this to:

po/grub.pot: $(srcdir)/po/POTFILES $(srcdir)/po/POTFILES-shell
mkdir -p po
$(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ \
-f $< --keyword=_ --keyword=N

I get the error:

/usr/bin/xgettext: error while opening "commands/acpi.c" for
reading: No such file or directory

We need something like:

po/grub.pot: $(srcdir)/po/POTFILES $(srcdir)/po/POTFILES-shell
mkdir -p po
DIR=$PWD

  cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 \
    -o $(DIR)/$@ -f po/POTFILES --keyword=_ --keyword=N

The use of $< is wrong here because of the cd command.

-- Bruce

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#5 lore raw

2010/3/26 Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]>:

Quoted 23 lines
Quoted 14 lines · Bruce Dubbs
Quoted 13 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 12 lines · Carles Pina i Estany

Hi,

Quoted 3 lines · Bruce Dubbs

With the addition of the internationalization code, building GRUB in a separate directory fails.

I'll take a look into it "soon" (next days or next week)

Probably it's an easy thing, if someone checks it before please report :-)

Quoted 8 lines
Quoted 6 lines

        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ -f $< --keyword=_ --keyword=N_
to
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ -f po/POTFILES --keyword=_ --keyword=N_
Feel free to test & commit

I don't think so.

Quoted 8 lines

Well you have a funny way of disagreeing arriving to the same result as I told: replace
       cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ -f $< --keyword=_ --keyword=N_
with
       cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ -f po/POTFILES --keyword=_ --keyword=N_
Have you tested it?

This is still clearly wrong. When building outside the source tree, make should not create any files in the source tree. Write permission to the source tree should not be required.

Quoted 30 lines
Quoted 30 lines

When generated, the makefile has:

$(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ -f $< --keyword=_ --keyword=N_

which when instantiated by make is:

../po/grub.pot: po/POTFILES po/POTFILES-shell
  cd .. && /usr/bin/xgettext -ctranslate --from-code=utf-8 \
           -o ../po/grub.pot -f po/POTFILES --keyword=_ --keyword=N_

/usr/bin/xgettext: cannot create output file "../po/grub.pot": No such file or directory

If I change this to:

po/grub.pot: $(srcdir)/po/POTFILES $(srcdir)/po/POTFILES-shell mkdir -p po
  $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ \
  -f $< --keyword=_ --keyword=N

I get the error:

  /usr/bin/xgettext: error while opening "commands/acpi.c" for
reading: No such file or directory

We need something like:

Quoted 7 lines
Quoted 7 lines

po/grub.pot: $(srcdir)/po/POTFILES $(srcdir)/po/POTFILES-shell mkdir -p po
  DIR=$PWD
  cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 \
    -o $(DIR)/$@ -f po/POTFILES --keyword=_ --keyword=N

The use of $< is wrong here because of the cd command.

This looks like a better fix, if gettext looks for files relative to the current directory.

#6 lore raw
In reply to Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 22 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 14 lines · Bruce Dubbs
Quoted 13 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 12 lines · Carles Pina i Estany

Hi,

Quoted 3 lines · Bruce Dubbs

With the addition of the internationalization code, building GRUB in a separate directory fails.

I'll take a look into it "soon" (next days or next week)

Probably it's an easy thing, if someone checks it before please report :-)

Quoted 7 lines
Quoted 6 lines
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@
-f $< --keyword=_ --keyword=N_
to
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@

-f po/POTFILES --keyword=_ --keyword=N_
Feel free to test & commit

I don't think so.

Quoted 8 lines

Well you have a funny way of disagreeing arriving to the same result as I told: replace

        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@
-f $< --keyword=_ --keyword=N_
with
        cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@

-f po/POTFILES --keyword=_ --keyword=N_
Have you tested it?

Yes, have you?

tar -xf grub-1.98.tar.gz
cd grub-1.98
mkdir build
cd build
../configure
#edit line 528 of Makefile as above
make

cd .. && /usr/bin/xgettext -ctranslate --from-code=utf-8 -o ../po/grub.pot -f po/POTFILES --keyword=_ --keyword=N_ /usr/bin/xgettext: cannot create output file "../po/grub.pot": No such file or directory
make: *** [../po/grub.pot] Error 1

As I said before, the error is that -o $@ is invalid because of the change of directory.

-- Bruce