GNOME Bugzilla – Bug 773360
Prefer in-tree libraries when scanning introspection data
Last modified: 2016-10-24 17:04:34 UTC
If you build e-d-s with an older version already installed in the target prefix, it may fail to build. It looks like this is caused by the GObjectIntrospection cmake module linking with installed versions of the libraries instead of the ones in the build tree. The output looks something like this: [ 52%] Building C object src/libebackend/CMakeFiles/ebackend.dir/e-user-prompter.c.o /home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspect_l0h2__d/EBookContacts-1.2: symbol lookup error: /home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspect_l0h2__d/EBookContacts-1.2: undefined symbol: e_name_western_get_type Command '['/home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspect_l0h2__d/EBookContacts-1.2', '--introspect-dump=/home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspect_l0h2__d/functions.txt,/home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspect_l0h2__d/dump.xml']' returned non-zero exit status 127 make[2]: *** [src/addressbook/libebook-contacts/CMakeFiles/gir-girs-EBookContacts_1_2_gir.dir/build.make:84: src/addressbook/libebook-contacts/EBookContacts-1.2.gir] Error 1 make[1]: *** [CMakeFiles/Makefile2:2333: src/addressbook/libebook-contacts/CMakeFiles/gir-girs-EBookContacts_1_2_gir.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 52%] Building C object src/libebackend/CMakeFiles/ebackend.dir/e-user-prompter-server.c.o [ 53%] Building C object src/libebackend/CMakeFiles/ebackend.dir/e-user-prompter-server-extension.c.o /home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspectoj2yehpy/EBookContacts-1.2: symbol lookup error: /home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspectoj2yehpy/EBookContacts-1.2: undefined symbol: e_name_western_get_type Command '['/home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspectoj2yehpy/EBookContacts-1.2', '--introspect-dump=/home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspectoj2yehpy/functions.txt,/home/hpj/work/jhbuild/gnome/evolution-data-server/src/addressbook/libebook-contacts/tmp-introspectoj2yehpy/dump.xml']' returned non-zero exit status 127 [ 53%] Building C object src/libebackend/CMakeFiles/ebackend.dir/e-backend-enumtypes.c.o make[2]: *** [src/addressbook/libebook-contacts/CMakeFiles/gir-typelibs-EBookContacts_1_2_gir.dir/build.make:88: src/addressbook/libebook-contacts/EBookContacts-1.2.gir] Error 1 make[1]: *** [CMakeFiles/Makefile2:2372: src/addressbook/libebook-contacts/CMakeFiles/gir-typelibs-EBookContacts_1_2_gir.dir/all] Error 2 [ 53%] Building C object src/libebackend/CMakeFiles/ebackend.dir/e-dbhash.c.o [ 53%] Building C object src/libebackend/CMakeFiles/ebackend.dir/e-db3-utils.c.o [ 53%] Linking CXX shared library libebackend-1.2.so [ 53%] Built target ebackend make: *** [Makefile:139: all] Error 2 In this case, I was able to work around the issue by moving the installed libraries ${prefix}/lib/libebook* out of the way. This should probably be fixed, though, since it causes extra work and is error-prone unless you're able to just delete the prefix and rebuild the entire platform every time.
Thanks for a bug report. I agree it should be fixed. I usually do not remove files from my $PREFIX, but I see I have currently introspection turned off, which explains why I missed it.
Created commit 507728b in eds master (3.23.2+)