GNOME Bugzilla – Bug 662888
Use --include-uninstalled for internal .gir files
Last modified: 2013-09-14 16:55:22 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 )
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):
+ Trace 228933
sys.exit(scanner_main(sys.argv))
exported_packages, options.c_includes)
c_includes)
self._write_namespace(namespace, shlibs)
self._write_node(node)
self._write_constant(node)
with self.tagcontext('constant', attrs):
return self.gen.next()
self.push_tag(tag_name, attributes)
self._open_tag(tag_name, attributes)
attrs = collect_attributes(tag_name, attributes, self._indent, self._indent_char, len(tag_name) + 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.
(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.
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.
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