GNOME Bugzilla – Bug 411619
[KB-Fixed] Circular dependencies between a11y and other libraries
Last modified: 2009-08-30 05:53:40 UTC
Hi, While jhbuilding evolution with: os.environ['LDFLAGS'] = '-Wl,-z,defs' I got multiple build failures, the first one being: /lool/jhbuild-gnome-2.18/prefix/lib/libatk-1.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgdk_pixbuf-2.0.so -lm /home/lool/jhbuild-gnome-2.18/prefix/lib/libpangocairo-1.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libpango-1.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libcairo.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnome-2.so /usr/lib/libpopt.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libedataserver-1.2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libxml2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgconf-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libbonobo-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libbonobo-activation.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgmodule-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libORBit-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgthread-2.0.so -lrt /home/lool/jhbuild-gnome-2.18/prefix/lib/libgobject-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libglib-2.0.so -lplds4 -lplc4 -lnspr4 -ldl -lpthread -Wl,-O1 -Wl,-z -Wl,defs -pthread -Wl,--export-dynamic -Wl,-soname -Wl,libeutil.so.0 -o .libs/libeutil.so.0.0.0 .libs/e-dialog-utils.o: In function `e_dialog_set_transient_for': e-dialog-utils.c:(.text+0x46d): undefined reference to `XFree' e-dialog-utils.c:(.text+0x49e): undefined reference to `XInternAtom' e-dialog-utils.c:(.text+0x4d0): undefined reference to `XGetWindowProperty' e-dialog-utils.c:(.text+0x4e7): undefined reference to `XFree' e-dialog-utils.c:(.text+0x51d): undefined reference to `XQueryTree' ... make[3]: *** [libeutil.la] Erreur 1 make[3]: quittant le répertoire « /home/lool/jhbuild-gnome-2.18/build/evolution/e-util » This first failure is due to X11 specific code not being linked to -lX11. I'll attach a patch which: - detects the X11 link flags with PKG_CHECK_MODULES and falls back to AC_PATH_XTRA - detects whether Evolution is built against a Gtk built against the X11 backend - adds the X11 cflags and link flags to E_UTIL in these cases Bye,
Created attachment 83251 [details] [review] Detect and use X11
Created attachment 83257 [details] [review] a11y: link with libetext and reorder build of widgets and a11y dirs The next build failure is: gcc -shared .libs/ea-cell-table.o .libs/gal-a11y-util.o -Wl,--whole-archive e-text/.libs/libgal-a11y-etext.a e-table/.libs/libgal-a11y-etable.a -Wl,--no-whole-archive -Wl,--rpath -Wl,/home/lool/jhbuild-gnome-2.18/build/evolution/e-util/.libs -Wl,--rpath -Wl,/home/lool/jhbuild-gnome-2.18/prefix/lib -Wl,--rpath -Wl,/home/lool/jhbuild-gnome-2.18/prefix/lib/evolution/2.10 -Wl,--rpath -Wl,/home/lool/jhbuild-gnome-2.18/prefix/lib ../e-util/.libs/libeutil.so -L/home/lool/jhbuild-gnome-2.18/prefix/lib /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomeprintui-2-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomeprint-2-2.so -lz /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomeui-2.so -lSM -lICE /home/lool/jhbuild-gnome-2.18/prefix/lib/libbonoboui-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomevfs-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnome-keyring.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnome-2.so /usr/lib/libpopt.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libbonobo-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libbonobo-activation.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libglade-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomecanvas-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libart_lgpl_2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgtk-x11-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgdk-x11-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libatk-1.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgdk_pixbuf-2.0.so -lm /home/lool/jhbuild-gnome-2.18/prefix/lib/libpangocairo-1.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libpango-1.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libcairo.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgmodule-2.0.so -ldl /home/lool/jhbuild-gnome-2.18/prefix/lib/libxml2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgconf-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libORBit-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgthread-2.0.so -lrt /home/lool/jhbuild-gnome-2.18/prefix/lib/libgobject-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libglib-2.0.so -Wl,-O1 -Wl,-z -Wl,defs -Wl,--export-dynamic -pthread -Wl,-soname -Wl,libevolution-a11y.so.0 -o .libs/libevolution-a11y.so.0.0.0 e-text/.libs/libgal-a11y-etext.a(gal-a11y-e-text-factory.o): In function `gal_a11y_e_text_factory_create_accessible': gal-a11y-e-text-factory.c:(.text+0xe3): undefined reference to `e_text_get_type' e-text/.libs/libgal-a11y-etext.a(gal-a11y-e-text.o): In function `gal_a11y_e_text_init': gal-a11y-e-text.c:(.text+0x188): undefined reference to `e_text_get_type' e-text/.libs/libgal-a11y-etext.a(gal-a11y-e-text.o): In function `et_real_initialize': gal-a11y-e-text.c:(.text+0x379): undefined reference to `e_text_get_type' gal-a11y-e-text.c:(.text+0x3bc): undefined reference to `e_text_get_type' e-text/.libs/libgal-a11y-etext.a(gal-a11y-e-text.o): In function `_et_reposition_cb': ... e-table/.libs/libgal-a11y-etable.a(gal-a11y-e-table-click-to-add-factory.o): In function `gal_a11y_e_table_click_to_add_factory_create_accessible': gal-a11y-e-table-click-to-add-factory.c:(.text+0xdf): undefined reference to `e_table_click_to_add_get_type' collect2: ld returned 1 exit status make[3]: *** [libevolution-a11y.la] Erreur 1 make[3]: quittant le répertoire « /home/lool/jhbuild-gnome-2.18/build/evolution/a11y » The attached patch adds the missing LIBADD between evolution objects and swaps build order.
Created attachment 83259 [details] [review] e-timezone-dialog: link with libemiscwidgets, reorders dirs, drop WIN32 The build subsequently fails with: gcc -shared .libs/e-timezone-dialog.o -Wl,--rpath -Wl,/home/lool/jhbuild-gnome-2.18/build/evolution/e-util/.libs -Wl,--rpath -Wl,/home/lool/jhbuild-gnome-2.18/prefix/lib -Wl,--rpath -Wl,/home/lool/jhbuild-gnome-2.18/prefix/lib/evolution/2.10 -Wl,--rpath -Wl,/home/lool/jhbuild-gnome-2.18/prefix/lib ../../e-util/.libs/libeutil.so -L/home/lool/jhbuild-gnome-2.18/prefix/lib /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomeprintui-2-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomeprint-2-2.so -lz /home/lool/jhbuild-gnome-2.18/prefix/lib/libgtkhtml-3.8.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomeui-2.so -lSM -lICE /home/lool/jhbuild-gnome-2.18/prefix/lib/libbonoboui-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomevfs-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnome-keyring.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnomecanvas-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libart_lgpl_2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libecal-1.2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libedataserverui-1.2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libglade-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libebook-1.2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgnome-2.so /usr/lib/libpopt.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libedataserver-1.2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libxml2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgconf-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libbonobo-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libbonobo-activation.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libORBit-2.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgthread-2.0.so -lrt /home/lool/jhbuild-gnome-2.18/prefix/lib/libhal.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libnotify.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgtk-x11-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libdbus-glib-1.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgdk-x11-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libatk-1.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgdk_pixbuf-2.0.so -lm /home/lool/jhbuild-gnome-2.18/prefix/lib/libpangocairo-1.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libpango-1.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libcairo.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgobject-2.0.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libgmodule-2.0.so -ldl /home/lool/jhbuild-gnome-2.18/prefix/lib/libdbus-1.so /home/lool/jhbuild-gnome-2.18/prefix/lib/libglib-2.0.so -Wl,-O1 -Wl,-z -Wl,defs -Wl,--export-dynamic -pthread -Wl,-soname -Wl,libetimezonedialog.so.0 -o .libs/libetimezonedialog.so.0.0.0 .libs/e-timezone-dialog.o: In function `set_map_timezone': e-timezone-dialog.c:(.text+0x2a2): undefined reference to `e_map_get_closest_point' e-timezone-dialog.c:(.text+0x2be): undefined reference to `e_map_point_set_color_rgba' .libs/e-timezone-dialog.o: In function `get_zone_from_point': e-timezone-dialog.c:(.text+0x403): undefined reference to `e_map_point_get_location' .libs/e-timezone-dialog.o: In function `on_map_button_pressed': e-timezone-dialog.c:(.text+0x7c6): undefined reference to `e_map_window_to_world' e-timezone-dialog.c:(.text+0x7dd): undefined reference to `e_map_zoom_out' e-timezone-dialog.c:(.text+0x7ed): undefined reference to `e_map_get_magnification' ... collect2: ld returned 1 exit status make[3]: *** [libetimezonedialog.la] Erreur 1 make[3]: quittant le répertoire « /home/lool/jhbuild-gnome-2.18/build/evolution/widgets/e-timezone-dialog » The attached patch adds the missing LIBADD on libemiscwidgets.la and reorders the misc and e-timezone-dialog directories. It also gets rid of the WIN32 specific code which isn't needed anymore.
The build subsequently fails with: make[2]: entrant dans le répertoire « /home/lool/jhbuild-gnome-2.18/build/evolution/widgets » Making all in table make[3]: entrant dans le répertoire « /home/lool/jhbuild-gnome-2.18/build/evolution/widgets/table » make[3]: *** Pas de règle pour fabriquer la cible « ../../a11y/libevolution-a11y.la », nécessaire pour « libetable.la ». Arrêt. make[3]: quittant le répertoire « /home/lool/jhbuild-gnome-2.18/build/evolution/widgets/table » due to a dependency loop between the widgets and a11y top level dirs :-( I suppose it could be fixed by moving the a11y stuff closer to the stuff that uses it.
I'm rejecting the second patch; even if it's a correct fix for the experienced failure, it will lead to an unbuildable evolution because of circular dependencies between the top level dirs. (You're welcome to apply the first one, and I don't expect the third one to break anything if taken alone.)
I was able to reproduce each step of this and verify that the patches fix the linking problems. Nice job! The a11y stuff is still a problem like you said, but I'm committing the first and third patches. Leaving the bug open since the build failure in comment #2 still occurs. Hopefully someday these cyclic dependencies will get sorted out. Committed to Subversion trunk (revision 34101).
I seem to remember seeing the problem with the a11t stuff when just plain building with sparse too.
The a11y code has been rearranged in kill-bonobo to resolve this.
The "kill-bonobo" branch has been merged into "master" and will debut as Evolution 2.29.1. We believe the branch has addressed the reported issue. If you find the issue still exists in version 2.29 or later please feel free to re-open this bug. Closing as FIXED.