After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 605724 - No rule to make target `Pango-1.0.gir`
No rule to make target `Pango-1.0.gir`
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 577347
Blocks:
 
 
Reported: 2009-12-30 09:59 UTC by sathyz
Modified: 2010-01-14 01:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add --with-skipped-gir-modules (8.09 KB, patch)
2010-01-12 21:09 UTC, Colin Walters
committed Details | Review

Description sathyz 2009-12-30 09:59:07 UTC
Distribution : Ubuntu 9.10

Problem description:
Got the error No rule to make target `Pango-1.0.gir' at 2/7 on trying to install gnome-shell on ubuntu. 

Steps:

(1) wget http://git.gnome.org/cgit/gnome-shell/plain/tools/build/gnome-shell-build-setup.sh
(2) /bin/bash gnome-shell-build-setup.sh

Got the following error,

-----
             -I`pkg-config --variable=includedir atk`/atk-1.0 \
             `pkg-config --variable=includedir atk`/atk-1.0/atk/*.h
/home/satheesh/gnome-shell/install/bin/g-ir-scanner -v --namespace GdkPixbuf --nsversion=2.0 --strip-prefix=Gdk\
	    --add-include-path=. --add-include-path=. \
             --include=Gio-2.0 \
	     --library=gdk_pixbuf-2.0 \
	     --libtool="/bin/bash ../libtool" \
             --output GdkPixbuf-2.0.gir \
             --pkg gobject-2.0 \
             --pkg gio-2.0 \
             --pkg gdk-pixbuf-2.0 \
             ./GdkPixbuf-custom.c \
             `pkg-config --variable=includedir gdk-pixbuf-2.0`/gtk-2.0/gdk-pixbuf/*.h
make[2]: *** No rule to make target `Pango-1.0.gir', needed by `Gdk-2.0.gir'.  Stop.
make[2]: Leaving directory `/home/satheesh/gnome-shell/source/gir-repository/gir'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/satheesh/gnome-shell/source/gir-repository'
make: *** [all] Error 2
*** Error during phase build of gir-repository: ########## Error running make   *** [2/7]
-----
Comment 1 André Klapper 2010-01-02 19:37:13 UTC
Also see http://art.ubuntuforums.org/showthread.php?p=8590551
Comment 2 Rovanion Luckey 2010-01-05 11:12:05 UTC
I am getting this error when trying to build Gnome Shell on the Ubuntu 9.10 based Linux Mint 8:

make  
make  all-recursive
make[1]: Går till katalogen "/home/rovanion/gnome-shell/source/gir-repository"
Making all in gir
make[2]: Går till katalogen "/home/rovanion/gnome-shell/source/gir-repository/gir"
/home/rovanion/gnome-shell/install/bin/g-ir-scanner -v --namespace Gdk --nsversion=2.0 \
	    --add-include-path=. --add-include-path=. \
             --include=Gio-2.0 \
             --include=cairo-1.0 \
             --include=Pango-1.0 \
	     --include=xlib-2.0 \
             --include=GdkPixbuf-2.0 \
	     --library=gdk-x11-2.0 \
	     --library=libgirepo-Gdk-custom.la \
	     --libtool="/bin/bash ../libtool" \
             --output Gdk-2.0.gir \
             --pkg gobject-2.0 \
             --pkg gio-2.0 \
             --pkg cairo \
             --pkg atk \
             --pkg pango \
             --pkg gdk-x11-2.0 \
             -DGDK_COMPILATION \
	     ./Gdk-custom.c ./Gdk-custom.h \
             `pkg-config --variable=includedir gdk-x11-2.0`/gtk-2.0/gdk/*.h
Traceback (most recent call last):
  • File "/home/rovanion/gnome-shell/install/bin/g-ir-scanner", line 38 in <module>
    sys.exit(scanner_main(sys.argv))
  • File "/home/rovanion/gnome-shell/install/lib/gobject-introspection/giscanner/scannermain.py", line 277 in scanner_main
    transformer.register_include(include_obj)
  • File "/home/rovanion/gnome-shell/install/lib/gobject-introspection/giscanner/transformer.py", line 111 in register_include
    filename = self._find_include(include)
  • File "/home/rovanion/gnome-shell/install/lib/gobject-introspection/giscanner/transformer.py", line 129 in _find_include
    % (girname, searchdirs))
ValueError: Couldn't find include 'Pango-1.0.gir' (search path: ['.', '.', '/home/rovanion/gnome-shell/install/share/gir-1.0', '/usr/share/gir-1.0', '/usr/share/gnome/gir-1.0', '/usr/local/share/gir-1.0', '/usr/share/gir-1.0', '/home/rovanion/gnome-shell/install/share/gir-1.0', '/usr/share/gir-1.0', '/home/rovanion/gnome-shell/install/share/gir-1.0'])
make[2]: *** [Gdk-2.0.gir] Fel 1
make[2]: Lämnar katalogen "/home/rovanion/gnome-shell/source/gir-repository/gir"
make[1]: *** [all-recursive] Fel 1
make[1]: Lämnar katalogen "/home/rovanion/gnome-shell/source/gir-repository"
make: *** [all] Fel 2
Comment 3 Colin Walters 2010-01-06 20:12:23 UTC
I'm guessing that this occurs when one has Pango > 1.25.4, but not built with introspection support.  Hmm...I think what we need to do here is put a flag in the .pc file saying whether or not it was built with introspection.  This deps on 577347.
Comment 4 Owen Taylor 2010-01-06 20:29:54 UTC
This doesn't seem fixable by additions or changes to Pango, for now, a check is going to have to be added to configure.ac that checks for the existance of the gir file, instead of going off pango.pc.
Comment 5 Colin Walters 2010-01-06 20:37:31 UTC
Hmm...I guess we could add a <!-- generated from gir-repository --> comment or such to the Pango.gir we generate, and then search for that if we do find a Pango.gir to know we need to rebuild it.
Comment 6 Colin Walters 2010-01-06 22:00:44 UTC
Even that's not quite right, becuase if you have a current gir-repository build, then you won't have that comment =(

Kind of a pile of evil...not sure.
Comment 7 Colin Walters 2010-01-06 22:05:29 UTC
I can't think of a way offhand to fix this truly correctly without changing Pango, but ideas welcome.
Comment 8 Mike Bursell 2010-01-07 14:10:25 UTC
Duplicate of #605156?

-Mike.
Comment 9 Owen Taylor 2010-01-07 14:40:46 UTC
(In reply to comment #8)
> Duplicate of bug 605156?

doesn't look like it to me.
===

Two ideas of fixing it:

 A) Compare timestamps on the installed pango gir (if any) and installed Pango library, if the Pango gir is older, generate a new Pango gir. Sounds a bit fragile.

 B) Unconditionally build and install the Pango gir and have a configure switch to disable it. There's no actual harm in overwriting the installed Pango gir, but it will break packaging via conflicts, hence the configure switch.
Comment 10 Colin Walters 2010-01-12 21:09:27 UTC
Created attachment 151290 [details] [review]
Add --with-skipped-gir-modules

Commit 7e443e50012004a2fafb caused us to skip building a .gir if
the relevant module was new enough to have introspection support;
however, this doesn't work if the module wasn't built with introspection.

As a stopgap, revert to building all .girs, but introduce a new
configure switch to skip building a list of given .girs.  This
is more suitable for OS builders who are in control of the compilation
of both modules.
Comment 11 Owen Taylor 2010-01-13 20:20:31 UTC
Review of attachment 151290 [details] [review]:

Basic overview looks fine.

::: configure.ac
@@ +21,3 @@
 GOBJECT_INTROSPECTION_REQUIRE(0.6.7)
 
+AC_ARG_WITH([skipped-gir-modules], [AS_HELP_STRING([--with-skipped-gir-modules], [Comma-separated list of namespaces to skip building])], [], [])

You might want to add "e.g. 'Atk,Pango'" to this, since it's not clear the format otherwise.

Could this just be skipped-modules? This is in gir-repository after all...

@@ +34,2 @@
                   have_atk=true, have_atk=false)
+if echo $with_skipped_gir_modules | grep -q ,Atk,; then

Couple of things here

* This seems to only work for modules in the middle of the comma-separated list. Maybe echo ,$with_skipped_gir_modules, ?

* I think a shell function would increase the readability and maintainability here:

skip_module() {
   echo ,$with_skipped_gir_modules, | grep -q ,$1,
}

if skip_module Atk ; then
fi

* Seems like the PKG_CHECK_MODULES should be in the else.

if if skip_module Atk ; then
  have_atk=false
else
  PKG_CHECK_MODULES(ATK, atk >= 1.12.0,
                    have_atk=true, have_atk=false)  
fi

The way you have it now, it's going to show "checking for Atk" and an observent packager is going to think "my skip-modules configure didn't work" and confused.
Comment 12 Colin Walters 2010-01-13 20:28:01 UTC
(In reply to comment #11)
> 
> * This seems to only work for modules in the middle of the comma-separated
> list. Maybe echo ,$with_skipped_gir_modules, ?

See line 25.

> * I think a shell function would increase the readability and maintainability

Ok, I guess I'd have to look up what the portability implications are for functions.
Comment 13 Owen Taylor 2010-01-13 20:44:32 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > 
> > * This seems to only work for modules in the middle of the comma-separated
> > list. Maybe echo ,$with_skipped_gir_modules, ?
> 
> See line 25.

Oh, I looked for a line like that, missed it. Me be better to do it in the echo for readability reasons, at least if you encapsulate it in the shell function.

> > * I think a shell function would increase the readability and maintainability
> 
> Ok, I guess I'd have to look up what the portability implications are for
> functions.

Shell functions should fine (at least in the simple Bourne-style I used). The autoconf maintainers said a couple of years ago that they would start using them where appropriate - they had been avoiding them for "really ancient system" reasons.
Comment 14 Owen Taylor 2010-01-14 01:14:41 UTC
Attachment 151290 [details] pushed as 5d0c6c8 - Add --with-skipped-gir-modules