GNOME Bugzilla – Bug 705659
gnome-terminal build failure
Last modified: 2014-04-12 18:39:50 UTC
gnome-terminal 3.9.90 fails to build on Ubuntu due to: gcc -shared -fPIC -DPIC .libs/libterminal_nautilus_la-terminal-client-utils.o .libs/libterminal_nautilus_la-terminal-i18n.o .libs/libterminal_nautilus_la-terminal-nautilus.o .libs/libterminal_nautilus_la-terminal-gdbus-generated.o .libs/libterminal_nautilus_la-terminal-type-builtins.o -lnautilus-extension -lgtk-3 -lgdk-3 -latk-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 /usr/lib/x86_64-linux-gnu/libcairo-gobject.so -lpango-1.0 /usr/lib/x86_64-linux-gnu/libcairo.so -lgio-2.0 -lgobject-2.0 -lglib-2.0 -pthread -O2 -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -Wl,--as-needed -pthread -Wl,-soname -Wl,libterminal-nautilus.so -Wl,-version-script -Wl,.libs/libterminal-nautilus.ver -o .libs/libterminal-nautilus.so .libs/libterminal_nautilus_la-terminal-client-utils.o: In function `terminal_client_get_fallback_startup_id': /usr/local/src/jhbuild-checkout/source/gnome-terminal/src/terminal-client-utils.c:162: undefined reference to `XCreateWindow' /usr/local/src/jhbuild-checkout/source/gnome-terminal/src/terminal-client-utils.c:173: undefined reference to `XInternAtom' /usr/local/src/jhbuild-checkout/source/gnome-terminal/src/terminal-client-utils.c:175: undefined reference to `XInternAtom' /usr/local/src/jhbuild-checkout/source/gnome-terminal/src/terminal-client-utils.c:179: undefined reference to `XChangeProperty' /usr/local/src/jhbuild-checkout/source/gnome-terminal/src/terminal-client-utils.c:185: undefined reference to `XWindowEvent' /usr/local/src/jhbuild-checkout/source/gnome-terminal/src/terminal-client-utils.c:190: undefined reference to `XDestroyWindow' collect2: error: ld returned 1 exit status
Created attachment 251132 [details] [review] Fix build failure
Should be fixed now on master. The patch was wrong, however; I fixed it differently.
Created attachment 251213 [details] [review] build: add PLATFORM_DEPS to nautilus target
Christian, I also had to add the above patch to get this working with your patch from git master.
I'd rather figure out why libterminal-nautilus ends up needing those X symbols; afaict it doesn't need to be dependent on X11.
Ping?
Since you're not interested in a clean fix, WONTFIX.
*** Bug 725096 has been marked as a duplicate of this bug. ***
The reason is mentioned in the patch in bug 725096 if you're still interested in it.
.... and in comment above. *sigh*
But terminal_client_get_fallback_startup_id is not used in the extension, nor exported from it, so the linker should strip it instead of putting it in and pulling in the x11 dep. If the linker's too dumb to do that, we should #ifndef SOME_DEFINE_OR_OTHER it out and have the compiler handle it.
Christian, sorry for the slow reply on this! It seems that gcc/ld does not actually strip unused symbols when linking (atleast not by default).