GNOME Bugzilla – Bug 644724
missing libs linkage for gtk-doc scanner
Last modified: 2011-03-14 19:00:43 UTC
When trying to generate the pango's documentation I got this: gtk-doc: Scanning header files gtk-doc: Compiling scanner libtool: compile: gcc -DPANGO_ENABLE_BACKEND -DPANGO_ENABLE_ENGINE -I.. -pthread -I/opt/jhbuild/include/glib-2.0 -I/opt/jhbuild/lib64/glib-2.0/include -I/usr/include/freetype2 -pthread -I/opt/jhbuild/include/cairo -I/opt/jhbuild/include/glib-2.0 -I/opt/jhbuild/lib64/glib-2.0/include -I/opt/jhbuild/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -g -O0 -Wall -g -O0 -Wall -c pango-scan.c -fPIC -DPIC -o .libs/pango-scan.o gtk-doc: Linking scanner libtool: link: gcc -g -O0 -Wall .libs/pango-scan.o -o .libs/pango-scan -L/opt/jhbuild/lib64 ../pango/.libs/libpangoxft-1.0.so ../pango/.libs/libpangocairo-1.0.so -pthread -Wl,-rpath -Wl,/opt/jhbuild/lib64 /usr/bin/ld: .libs/pango-scan.o: undefined reference to symbol 'pango_fc_font_map_get_type' /usr/bin/ld: note: 'pango_fc_font_map_get_type' is defined in DSO /opt/jhbuild/lib64/libpangoft2-1.0.so.0 so try adding it to the linker command line /opt/jhbuild/lib64/libpangoft2-1.0.so.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status Linking of scanner failed: make[1]: *** [scan-build.stamp] Error 1 make[1]: Leaving directory `/home/vjaquez/checkout/gnome2/pango/docs' make: *** [all] Error 2
Created attachment 183337 [details] [review] build: GTK_DOC scanner needs some libs to link Because of GTK_DOC scanner may need external links such as libpangoft2, but in particular libpango and gobject
+GTKDOC_LIBS = $(top_builddir)/pango/libpango-1.0.la $(GLIB_LIBS) + +if HAVE_FREETYPE +GTKDOC_LIBS += $(top_builddir)/pango/libpangoft2-1.0.la +endif This will result in $(GLIB_LIBS) being in-between those 2 libtool libs if HAVE_FREETYPE, but all the .la files always need to be at the start of LIBS.
Can you check master? Seems partially fixed on master to me. GLIB_LIBS still missing however.
Created attachment 183358 [details] [review] build: GTK_DOC scanner needs some libs to link Because of GTK_DOC scanner may need external links such as libpangoft2, but in particular libpango and gobject
(In reply to comment #3) > Can you check master? Seems partially fixed on master to me. GLIB_LIBS still > missing however. True, I'm using 1.28 which is what jhbuild uses. Let me check master.
(In reply to comment #5) > (In reply to comment #3) > > Can you check master? Seems partially fixed on master to me. GLIB_LIBS still > > missing however. > > True, I'm using 1.28 which is what jhbuild uses. Let me check master. Using master: make[3]: Entering directory `/home/vjaquez/checkout/gnome2/pango/docs' gtk-doc: Scanning header files gtk-doc: Compiling scanner libtool: compile: gcc -DPANGO_ENABLE_BACKEND -DPANGO_ENABLE_ENGINE -I.. -pthread -I/opt/jhbuild/include/glib-2.0 -I/opt/jhbuild/lib64/glib-2.0/include -I/usr/include/freetype2 -pthread -I/opt/jhbuild/include/cairo -I/opt/jhbuild/include/glib-2.0 -I/opt/jhbuild/lib64/glib-2.0/include -I/opt/jhbuild/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -g -O0 -Wall -g -O0 -Wall -c pango-scan.c -fPIC -DPIC -o .libs/pango-scan.o gtk-doc: Linking scanner libtool: link: gcc -g -O0 -Wall .libs/pango-scan.o -o .libs/pango-scan -L/opt/jhbuild/lib64 ../pango/.libs/libpango-1.0.so ../pango/.libs/libpangoft2-1.0.so ../pango/.libs/libpangoxft-1.0.so ../pango/.libs/libpangocairo-1.0.so -pthread -Wl,-rpath -Wl,/opt/jhbuild/lib64 /usr/bin/ld: .libs/pango-scan.o: undefined reference to symbol 'g_type_is_a' /usr/bin/ld: note: 'g_type_is_a' is defined in DSO /opt/jhbuild/lib64/libgobject-2.0.so.0 so try adding it to the linker command line /opt/jhbuild/lib64/libgobject-2.0.so.0: could not read symbols: Invalid operation collect2: ld returned 1 exit status Linking of scanner failed: make[3]: *** [scan-build.stamp] Error 1 It is required to add $(GLIB_LIBS)
Created attachment 183361 [details] [review] build: GTK_DOC scanner needs some libs to link [in master] Because of GTK_DOC scanner may need external links such as libpangoft2, but in particular libpango and gobject
ChPe, does this one look better? Feel free to commit to master. Thanks.
(In reply to comment #8) > ChPe, does this one look better? > > Feel free to commit to master. Thanks. Thanks. Pushed on master. What about branch 1.28?
I'll cherry-pick to 1.28 when making a release.
(In reply to comment #10) > I'll cherry-pick to 1.28 when making a release. Ok. Marking as fixed then.