Generating GData-0.0.gir fails in some cases
I've found the following meson issue when testing !7 (merged). The problem is that generating GData-0.0.gir fails, when the install dir already contains libgdata.so
, which doesn't contain yet the new symbols. I can simply reproduce it over jhbuild
by the following steps:
$ cd jhbuild/checkout/libgdata
$ git checkout a000213e15e08aef5c063e24ed28c98ca06f0a37
$ jhbuild make
$ git checkout a000213e15e08aef5c063e24ed28c98ca06f0a37^
$ jhbuild make
...
[76/86] Generating GData-0.0.gir with a custom command.
FAILED: gdata/GData-0.0.gir
/usr/bin/g-ir-scanner -I/usr/include/gobject-introspection-1.0 -I/home/oholy/jhbuild/install/include/glib-2.0 -I/home/oholy/jhbuild/install/lib/glib-2.0/include -pthread --no-libtool --namespace=GData --nsversion=0.0 --warn-all --output gdata/GData-0.0.gir --c-include=gdata/gdata.h -I/home/oholy/jhbuild/checkout/libgdata/gdata -I/home/oholy/jhbuild/build/libgdata/gdata -I./gdata/. -I../../checkout/libgdata/gdata/. -I./. -I../../checkout/libgdata/. -I./gdata/media/. -I../../checkout/libgdata/gdata/media/. -I./gdata/services/documents/. -I../../checkout/libgdata/gdata/services/documents/. -I./gdata/services/freebase/. -I../../checkout/libgdata/gdata/services/freebase/. -I./gdata/services/picasaweb/. -I../../checkout/libgdata/gdata/services/picasaweb/. -I./gdata/services/youtube/. -I../../checkout/libgdata/gdata/services/youtube/. --filelist=/home/oholy/jhbuild/build/libgdata/gdata/91aa5f9@@gdata@sha/GData_0.0_gir_filelist --include=GObject-2.0 --include=libxml2-2.0 --include=Soup-2.4 --include=Json-1.0 --include=Goa-1.0 --symbol-prefix=gdata --pkg-export=libgdata --cflags-begin -I./gdata/. -I../../checkout/libgdata/gdata/. -I./. -I../../checkout/libgdata/. -I./gdata/media/. -I../../checkout/libgdata/gdata/media/. -I./gdata/services/documents/. -I../../checkout/libgdata/gdata/services/documents/. -I./gdata/services/freebase/. -I../../checkout/libgdata/gdata/services/freebase/. -I./gdata/services/picasaweb/. -I../../checkout/libgdata/gdata/services/picasaweb/. -I./gdata/services/youtube/. -I../../checkout/libgdata/gdata/services/youtube/. -I/home/oholy/jhbuild/install/include/glib-2.0 -I/home/oholy/jhbuild/install/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/home/oholy/jhbuild/install/include/gio-unix-2.0 -I/usr/include/json-glib-1.0 -I/usr/include/libxml2 -I/usr/include/libsoup-2.4 -I/usr/include/goa-1.0 -I/usr/lib64/goa-1.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/gcr-3 -I/usr/include/gck-1 -I/usr/include/p11-kit-1 --cflags-end -L/home/oholy/jhbuild/install/lib --library gdata -L/home/oholy/jhbuild/build/libgdata/gdata -L/home/oholy/jhbuild/install/lib -L/home/oholy/jhbuild/install/lib --extra-library=gobject-2.0 --extra-library=glib-2.0 --extra-library=gio-2.0 --extra-library=json-glib-1.0 --extra-library=xml2 --extra-library=soup-2.4 --extra-library=goa-1.0 --extra-library=gthread-2.0 --extra-library=oauth --extra-library=gcr-base-3 --extra-library=gck-1 --extra-library=p11-kit --sources-top-dirs /home/oholy/jhbuild/checkout/libgdata/subprojects/ --sources-top-dirs /home/oholy/jhbuild/build/libgdata/subprojects/
g-ir-scanner: link: cc -o /home/oholy/jhbuild/build/libgdata/tmp-introspecth1exrk33/GData-0.0 /home/oholy/jhbuild/build/libgdata/tmp-introspecth1exrk33/GData-0.0.o -L. -Wl,-rpath,. -Wl,--no-as-needed -L/home/oholy/jhbuild/install/lib -Wl,-rpath,/home/oholy/jhbuild/install/lib -L/home/oholy/jhbuild/build/libgdata/gdata -Wl,-rpath,/home/oholy/jhbuild/build/libgdata/gdata -L/home/oholy/jhbuild/install/lib -Wl,-rpath,/home/oholy/jhbuild/install/lib -L/home/oholy/jhbuild/install/lib -Wl,-rpath,/home/oholy/jhbuild/install/lib -lgdata -lgobject-2.0 -lglib-2.0 -lgio-2.0 -ljson-glib-1.0 -lxml2 -lsoup-2.4 -lgoa-1.0 -lgthread-2.0 -loauth -lgcr-base-3 -lgck-1 -lp11-kit -L/home/oholy/jhbuild/install/lib -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -pthread -lgmodule-2.0 -lglib-2.0 -L/home/oholy/jhbuild/install/lib
/usr/bin/ld: /home/oholy/jhbuild/build/libgdata/tmp-introspecth1exrk33/GData-0.0.o:(.data+0x180): undefined reference to `gdata_documents_property_get_type'
collect2: error: ld returned 1 exit status
linking of temporary binary failed: Command '['cc', '-o', '/home/oholy/jhbuild/build/libgdata/tmp-introspecth1exrk33/GData-0.0', '/home/oholy/jhbuild/build/libgdata/tmp-introspecth1exrk33/GData-0.0.o', '-L.', '-Wl,-rpath,.', '-Wl,--no-as-needed', '-L/home/oholy/jhbuild/install/lib', '-Wl,-rpath,/home/oholy/jhbuild/install/lib', '-L/home/oholy/jhbuild/build/libgdata/gdata', '-Wl,-rpath,/home/oholy/jhbuild/build/libgdata/gdata', '-L/home/oholy/jhbuild/install/lib', '-Wl,-rpath,/home/oholy/jhbuild/install/lib', '-L/home/oholy/jhbuild/install/lib', '-Wl,-rpath,/home/oholy/jhbuild/install/lib', '-lgdata', '-lgobject-2.0', '-lglib-2.0', '-lgio-2.0', '-ljson-glib-1.0', '-lxml2', '-lsoup-2.4', '-lgoa-1.0', '-lgthread-2.0', '-loauth', '-lgcr-base-3', '-lgck-1', '-lp11-kit', '-L/home/oholy/jhbuild/install/lib', '-lgio-2.0', '-lgobject-2.0', '-Wl,--export-dynamic', '-pthread', '-lgmodule-2.0', '-lglib-2.0', '-L/home/oholy/jhbuild/install/lib']' returned non-zero exit status 1.
Simple workaround is to delete the libgdata.so
from install dir before making new build.
/cc @mayanksha /cc @inigomartinez
Edited by Ondrej Holy