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 594688 - Fails to build out of tree
Fails to build out of tree
Status: RESOLVED FIXED
Product: gnome-python-desktop
Classification: Deprecated
Component: general
2.27.x
Other Linux
: Normal major
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-09 21:35 UTC by Emilio Pozuelo Monfort
Modified: 2009-09-14 11:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Emilio Pozuelo Monfort 2009-09-09 21:35:58 UTC
Hi,

(first, there should be a brasero component I guess)

2.27.3 fails to build out of tree because of the brasero-burn bindings.

braseroburn/Makefile.am contains:

.defs.c:
	(cd $(srcdir) \
	 && $(PYGTK_CODEGEN) \
	    --override $*.override \
	    --py_ssize_t-clean \
	    --register $(PYGOBJECT_DEFSDIR)/gio-types.defs \
	    --register $(PYGTK_DEFSDIR)/gtk-types.defs \
	    --register $(PYGTK_DEFSDIR)/gdk-types.defs \
	    --register $(top_srcdir)/braseromedia/brasero_media.defs \
	    --prefix $* $*.defs) > gen-$*.c \
	&& cp gen-$*.c $*.c \
	&& rm -f gen-$*.c


The problem is that $(top_srcdir) is relative, and since it's after a "cd $(srcdir) && ", $(top_srcdir) isn't correct and the build fails. The fix would be top change $(top_srcdir) with $(abs_top_srcdir) to get an absolute path.

I haven't tested this but sounds right to me. I'll test it in a couple of days and provide a patch (can't do it right now) unless somebody gets to this sooner.

The build failure is:

(cd ../../braseroburn \
	 && /usr/bin/pygtk-codegen-2.0 \
	    --override brasero_burn.override \
	    --py_ssize_t-clean \
	    --register /usr/share/pygobject/2.0/defs/gio-types.defs \
	    --register /usr/share/pygtk/2.0/defs/gtk-types.defs \
	    --register /usr/share/pygtk/2.0/defs/gdk-types.defs \
	    --register ../../braseromedia/brasero_media.defs \
	    --prefix brasero_burn brasero_burn.defs) > gen-brasero_burn.c \
	&& cp gen-brasero_burn.c brasero_burn.c \
	&& rm -f gen-brasero_burn.c
/usr/bin/pygtk-codegen-2.0: 7: cannot create /dev/stderr: Permission denied
/usr/bin/pygtk-codegen-2.0: 8: cannot create /dev/stderr: Permission denied
Traceback (most recent call last):
  • File "/usr/share/pygobject/2.0/codegen/codegen.py", line 1717 in <module>
    sys.exit(main(sys.argv))
  • File "/usr/share/pygobject/2.0/codegen/codegen.py", line 1675 in main
    p.startParsing()
  • File "/usr/share/pygobject/2.0/codegen/scmexpr.py", line 113 in startParsing
    for statement in statements:
  • File "/usr/share/pygobject/2.0/codegen/scmexpr.py", line 27 in parse
    fp = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '../../braseromedia/brasero_media.defs'
make[3]: *** [brasero_burn.c] Error 1
make[3]: Leaving directory `/tmp/buildd/gnome-python-desktop-2.27.3/build-2.5/braseroburn'
Comment 1 Gustavo Carneiro 2009-09-10 10:08:38 UTC
No, it's simpler to fix, just remove $(top_srcdir)
-        --register $(top_srcdir)/braseromedia/brasero_media.defs \
+        --register brasero_media.defs \
Comment 2 Emilio Pozuelo Monfort 2009-09-11 16:32:14 UTC
(In reply to comment #1)
> No, it's simpler to fix, just remove $(top_srcdir)
> -        --register $(top_srcdir)/braseromedia/brasero_media.defs \
> +        --register brasero_media.defs \

That doesn't work because the command is doing `cd $(srcdir)`, so it's changing to $(top_srcdir)/braseroburn/, and there brasero_media.defs doesn't exist.

I've tested the $(abs_top_srcdir) change and it works fine.
Comment 3 Emilio Pozuelo Monfort 2009-09-13 16:45:51 UTC
Can this go in for 2.28?
Comment 4 Gustavo Carneiro 2009-09-14 11:37:41 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > No, it's simpler to fix, just remove $(top_srcdir)
> > -        --register $(top_srcdir)/braseromedia/brasero_media.defs \
> > +        --register brasero_media.defs \
> 
> That doesn't work because the command is doing `cd $(srcdir)`, so it's changing
> to $(top_srcdir)/braseroburn/, and there brasero_media.defs doesn't exist.

I confused braseromedia/braseroburn.

> 
> I've tested the $(abs_top_srcdir) change and it works fine.

OK, fine, if it works, I will commit it.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.