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 662888 - Use --include-uninstalled for internal .gir files
Use --include-uninstalled for internal .gir files
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
3.4.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2011-10-27 19:18 UTC by Dominique Leuenberger
Modified: 2013-09-14 16:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Use --include-uninstalled for internal .gir files (1.40 KB, patch)
2011-12-20 18:29 UTC, Colin Walters
committed Details | Review

Description Dominique Leuenberger 2011-10-27 19:18:33 UTC
While building e-d-s in a clean chroot, while introspecting addressbook/libebook, this error appears:

  GISCAN EBook-1.2.gir
Package libedataserver-1.2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libedataserver-1.2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libedataserver-1.2' found


(Build aborts further down due to this error)

The issue is that libedataserver-1.2.pc has been created by this time, but can not be found by pkg-config, as there is no lookup in the uninstalled location.

(A full build log can be seen at:
https://build.opensuse.org/package/live_build_log?arch=x86_64&package=evolution-data-server&project=home%3Adimstar%3AGNOME%3ANext&repository=openSUSE_Factory
)
Comment 1 Dominique Leuenberger 2011-10-28 15:45:02 UTC
Actually, even getting over this error (by injecting PKG_CONFIG_PATH to the build), the build of EBook-1.2.gir seems to be failing.

Traced it down to 

#define E_VCARD_21_VALID_PARAMETERS "TYPE,VALUE,ENCODING,CHARSET,LANGUAGE,DOM,INTL,POSTAL,PARCEL," 
                "HOME,WORK,PREF,VOICE,FAX,MSG,CELL,PAGER,BBS,MODEM,CAR,ISDN,VIDEO,AOL,APPLELINK," \
                "ATTMAIL,CIS,EWORLD,INTERNET,IBMMAIL,MCIMAIL,POWERSHARE,PRODIGY,TLX,X400,GIF,CGM," \
                "WMF,BMP,MET,PMB,DIB,PICT,TIFF,PDF,PS,JPEG,QTIME,MPEG,MPEG2,AVI,WAVE,AIFF,PCM," 
                "X509,PGP"

being too long. shortening this define to < 220 chars makes the 'gir' file build. (of course I did not check the functioning of it)

With the original line (long), this failure happens:
3120-3560:/usr/src/packages/BUILD/evolution-data-server-3.3.1.1/addressbook/libebook> PKG_CONFIG_PATH=../../libedataserver /usr/bin/g-ir-scanner  --add-include-path=../../libedataserver --add-include-path=. --identifier-prefix=E --pkg-export libebook-1.2 --c-include="libebook/e-book-client.h" --namespace=EBook --nsversion=1.2 --libtool="/bin/sh ../../libtool"  --include=GObject-2.0 --include=EDataServer-1.2 --include=GLib-2.0 --include=libxml2-2.0 --include=Gio-2.0   --library=libebook-1.2.la --library=../../libedataserver/libedataserver-1.2.la   `/usr/bin/pkg-config --cflags libxml-2.0` `/usr/bin/pkg-config --cflags gconf-2.0` -I../.. -I../.. -I../../addressbook/ -I../../addressbook/ -I../../addressbook/libebook -I../../addressbook/libebook   e-book-marshal.c e-book-marshal.h e-address-western.c e-book-client.c e-book-client-view.c e-book-client-view-private.h e-book-query.c e-book-view-private.h e-book-view.c e-book.c e-contact.c e-destination.c e-name-western.c e-name-western-tables.h e-vcard.c e-error.h e-address-western.h e-book-client.h e-book-client-view.h e-book-query.h e-book-view.h e-book-types.h e-book.h e-contact.h e-destination.h e-name-western.h e-vcard.h libebook-1.2.la --output EBook-1.2.gir
g-ir-scanner: compile: gcc -Wall -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I../.. -I../.. -I../../addressbook/ -I../../addressbook/ -I../../addressbook/libebook -I../../addressbook/libebook -I/usr/include/evolution-data-server-3.4 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/gconf/2 -I/usr/include/libsoup-2.4 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -c -o /usr/src/packages/BUILD/evolution-data-server-3.3.1.1/addressbook/libebook/tmp-introspect4G2hsf/EBook-1.2.o /usr/src/packages/BUILD/evolution-data-server-3.3.1.1/addressbook/libebook/tmp-introspect4G2hsf/EBook-1.2.c
g-ir-scanner: link: /bin/sh ../../libtool --mode=link --tag=CC gcc -o /usr/src/packages/BUILD/evolution-data-server-3.3.1.1/addressbook/libebook/tmp-introspect4G2hsf/EBook-1.2 -export-dynamic -L. libebook-1.2.la ../../libedataserver/libedataserver-1.2.la -pthread -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 /usr/src/packages/BUILD/evolution-data-server-3.3.1.1/addressbook/libebook/tmp-introspect4G2hsf/EBook-1.2.o
libtool: link: gcc -o /usr/src/packages/BUILD/evolution-data-server-3.3.1.1/addressbook/libebook/tmp-introspect4G2hsf/.libs/EBook-1.2 -pthread /usr/src/packages/BUILD/evolution-data-server-3.3.1.1/addressbook/libebook/tmp-introspect4G2hsf/EBook-1.2.o -Wl,--export-dynamic  -L. ./.libs/libebook-1.2.so -L/usr/lib /usr/src/packages/BUILD/evolution-data-server-3.3.1.1/camel/.libs/libcamel-1.2.so /usr/src/packages/BUILD/evolution-data-server-3.3.1.1/libedataserver/.libs/libedataserver-1.2.so -lssl3 -lsmime3 -lnss3 -lnssutil3 -lsqlite3 -lkrb5 -lk5crypto -lcom_err -lgssapi_krb5 ../../libedataserver/.libs/libedataserver-1.2.so /usr/lib64/libxml2.so -lz -lm -lgconf-2 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -pthread
g-ir-scanner: EBook: warning: 80 warnings suppressed (use --warn-all to see them)
Traceback (most recent call last):
  • File "/usr/bin/g-ir-scanner", line 46 in <module>
    sys.exit(scanner_main(sys.argv))
  • File "/usr/lib64/gobject-introspection/giscanner/scannermain.py", line 449 in scanner_main
    exported_packages, options.c_includes)
  • File "/usr/lib64/gobject-introspection/giscanner/girwriter.py", line 40 in __init__
    c_includes)
  • File "/usr/lib64/gobject-introspection/giscanner/girwriter.py", line 64 in _write_repository
    self._write_namespace(namespace, shlibs)
  • File "/usr/lib64/gobject-introspection/giscanner/girwriter.py", line 100 in _write_namespace
    self._write_node(node)
  • File "/usr/lib64/gobject-introspection/giscanner/girwriter.py", line 125 in _write_node
    self._write_constant(node)
  • File "/usr/lib64/gobject-introspection/giscanner/girwriter.py", line 368 in _write_constant
    with self.tagcontext('constant', attrs):
  • File "/usr/lib64/python2.7/contextlib.py", line 17 in __enter__
    return self.gen.next()
  • File "/usr/lib64/gobject-introspection/giscanner/xmlwriter.py", line 166 in tagcontext
    self.push_tag(tag_name, attributes)
  • File "/usr/lib64/gobject-introspection/giscanner/xmlwriter.py", line 154 in push_tag
    self._open_tag(tag_name, attributes)
  • File "/usr/lib64/gobject-introspection/giscanner/xmlwriter.py", line 96 in _open_tag
    attrs = collect_attributes(tag_name, attributes, self._indent, self._indent_char, len(tag_name) + 2)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xba in position 55: invalid start byte

Comment 2 Matthew Barnes 2011-10-28 16:18:30 UTC
(In reply to comment #1)
> Traced it down to 

<<snip>>

> being too long. shortening this define to < 220 chars makes the 'gir' file
> build. (of course I did not check the functioning of it)

C89 supports string literals up to 509 bytes long.  Newer revisions extend that limit even further.  gobject-introspection should at least handle C89 limits.
Comment 3 Colin Walters 2011-12-20 18:24:50 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Traced it down to 
> 
> <<snip>>
> 
> > being too long. shortening this define to < 220 chars makes the 'gir' file
> > build. (of course I did not check the functioning of it)
> 
> C89 supports string literals up to 509 bytes long.  Newer revisions extend that
> limit even further.  gobject-introspection should at least handle C89 limits.

What version of g-ir-scanner is this?  git master seems to handle this fine, and I just added a regression test.
Comment 4 Colin Walters 2011-12-20 18:29:23 UTC
Created attachment 203975 [details] [review]
build: Use --include-uninstalled for internal .gir files

Otherwise we end up with a dependency on an installed pkg-config file.
Comment 5 Matthew Barnes 2011-12-23 05:44:01 UTC
Makes sense to me.  Thanks for the patch!

Committed for Evolution-Data-Server 3.3.4 in:
http://git.gnome.org/browse/evolution-data-server/commit/?id=272392dbe61e7b454b55ccf60f4dd7ae1a3af6bf