After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 389821 - build fails with gtk 2.8
build fails with gtk 2.8
Status: RESOLVED FIXED
Product: libgnomedb
Classification: Deprecated
Component: general
2.99.x
Other Linux
: Normal normal
: ---
Assigned To: Rodrigo Moya
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-12-26 19:58 UTC by Mark Johnson
Modified: 2007-01-27 14:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mark Johnson 2006-12-26 19:58:30 UTC
I have gtk+ version 2.8.20 installed.  This passes the configure tests.

configure.in contains the following:
dnl ******************************
dnl Checks for libraries
dnl ******************************

GTK_MODULES="gtk+-2.0 >= 2.6.0 gthread-2.0"
LIBGDA_MODULES="libgda-3.0 >= 2.99.2"
GNOME_MODULES="libgnomeui-2.0 >= 1.103"
LIBGNOMEDB_REQUIRES="$GTK_MODULES $LIBGDA_MODULES"

PKG_CHECK_MODULES(LIBGNOMEDB, $GTK_MODULES $LIBGDA_MODULES)
AC_SUBST(LIBGNOMEDB_CFLAGS)
AC_SUBST(LIBGNOMEDB_LIBS)

This indicates that configure is satisfied when gtk+ is version 2.6.0 or newer.

However, compiling fails as follows:
i486-slackware-linux-gcc -O2 -march=i486 -mcpu=pentium2 -o .libs/gnome-database-properties dsn-config.o dsn-properties-dialog.o main.o provider-config.o -pthread -pthread -Wl,--export-dynamic  -L/usr/X11R6/lib /usr/lib/libgda-3.0.so /usr/lib/libgda_handlers-3.0.so /usr/lib/libgda_graph-3.0.so /usr/lib/libgda_sql_delimiter-3.0.so /usr/lib/libgda-report-3.0.so /usr/lib/libxslt.so /usr/lib/libgnomeui-2.so -lSM -lICE /usr/lib/libbonoboui-2.so /usr/lib/libxml2.so /usr/lib/libgnomecanvas-2.so /usr/lib/libgnome-2.so /usr/lib/libpopt.so /usr/lib/libart_lgpl_2.so /usr/lib/libpangoft2-1.0.so /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libpangocairo-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libcairo.so /usr/lib/libfreetype.so /usr/X11R6/lib/libfontconfig.so -lpng12 -lz -lXrender -lX11 -lXext /usr/lib/libgnomevfs-2.so /usr/lib/libbonobo-2.so /usr/lib/libgconf-2.so /usr/lib/libbonobo-activation.so /usr/lib/libORBit-2.so /usr/lib/libgobject-2.0.so -lm /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libgthread-2.0.so /usr/lib/libglib-2.0.so ../libgnomedb/.libs/libgnomedb-3.so ../libgnomedb/data-entries/.libs/libgnomedb_handlers-3.so ../libgnomedb/graph/.libs/libgnomedb_graph-3.so
../libgnomedb/.libs/libgnomedb-3.so: undefined reference to `gtk_link_button_new_with_label'
collect2: ld returned 1 exit status
make[1]: *** [gnome-database-properties] Error 1
make[1]: Leaving directory `/mnt/raid/download/computer/software/gnome/libgnomedb/2.99/src/libgnomedb-2.99.2/control-center'
make: *** [all-recursive] Error 1

NOTE that the gtk_link_button type was introduced in gtk version 2.10. Therefore, this test in configure needs to be updated (unless you'd prefer to remove the Link Button from libgnomedb :-).
Comment 1 Murray Cumming 2007-01-16 17:26:27 UTC
I guess we should #ifdef the use of GtkLinkButton, providing an alternative for earlier versions of GTK+.
Comment 2 Murray Cumming 2007-01-17 09:27:13 UTC
I have added the ifdefs in SVN head. Could you please check the build on your system. Thanks.
Comment 3 Mark Johnson 2007-01-18 03:09:04 UTC
Actually, I upgraded the system to 2.10.6 to get libgnomedb to compile.

However, in the interests of testing this fix, I reverted to 2.8.20.

I checked out trunk (svn 1540).  I was unable to generate the configure file, etc due to not having gnome-autogen.sh.  I did not find any reference to this on the gnome-db website.

I checked on ftp://ftp.gnome.org/pub/GNOME/sources and did not find it.

So I searched the gnome-db mailing list archives.  There were 12 hits,  However, attempting to open any message yields a 403 error from the web server.

Any chance you could point me to it?
Comment 4 Mark Johnson 2007-01-23 02:30:00 UTC
Found it.  I looked for "common" and it was under "gnome-common".

At the moment (svn1547 of trunk) libgnomedb won't compile.  This does not appear related to this bug, however.  I was compiling against svn2800 of libgda trunk.  I will try again later.

i486-slackware-linux-gcc -O2 -march=i486 -mcpu=pentium2 -o .libs/libgnomedb-scan .libs/libgnomedb-scan.o  ../../libgnomedb/.libs/libgnomedb-3.so -L/usr/X11R6/lib -L/usr/lib ../../libgnomedb/data-entries/.libs/libgnomedb_handlers-3.so ../../libgnomedb/data-entries/plugins/.libs/libgnomedb_entry_builtin_plugins.so /mnt/raid/download/computer/software/gnome/libgnomedb/svn/trunk/libgnomedb/data-entries/.libs/libgnomedb_handlers-3.so -lcrypto ../../libgnomedb-graph/.libs/libgnomedb_graph-3.so /mnt/raid/download/computer/software/gnome/libgnomedb/svn/trunk/libgnomedb/.libs/libgnomedb-3.so /usr/lib/libgtksourceview-1.0.so /usr/lib/libpangoxft-1.0.so /usr/lib/libpangox-1.0.so /usr/lib/libgnomeprint-2-2.so /usr/lib/libglade-2.0.so /usr/lib/libgconf-2.so /usr/lib/libORBit-2.so /usr/lib/libpopt.so /usr/lib/libgda_handlers-3.0.so /usr/lib/libgda_graph-3.0.so /usr/lib/libgda-report-3.0.so /usr/lib/libgda-3.0.so /usr/lib/libgda_sql_transaction-3.0.so /usr/lib/libgda_sql_delimiter-3.0.so /usr/lib/libgdasql-3.0.so /usr/lib/libgthread-2.0.so -lpthread /usr/lib/libxslt.so /usr/lib/libxml2.so /usr/lib/libgnomecanvas-2.so /usr/lib/libart_lgpl_2.so /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libpangocairo-1.0.so /usr/lib/libpangoft2-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libcairo.so -lSM -lICE /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libglib-2.0.so -lrt /usr/X11R6/lib/libfontconfig.so /usr/lib/libfreetype.so /usr/lib/libexpat.so -lpng12 -lz -lm -lXrender -lX11 -lXext  -Wl,--rpath -Wl,/usr/lib/libgnomedb/plugins
.libs/libgnomedb-scan.o(.text+0xda): In function `get_object_types':
: undefined reference to `gnome_db_dsn_assistant_get_type'
collect2: ld returned 1 exit status
Compilation of scanner failed
make[2]: *** [scan-build.stamp] Error 1
make[2]: Leaving directory `/mnt/raid/download/computer/software/gnome/libgnomedb/svn/trunk/doc/C'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/raid/download/computer/software/gnome/libgnomedb/svn/trunk/doc'
make: *** [all-recursive] Error 1
make failed
mj@ds9:/mnt/raid/download/computer/software/gnome/libgnomedb/svn/trunk$ svn update
At revision 1547.

Comment 5 Mark Johnson 2007-01-23 05:04:13 UTC
libgnomedb/Makefile.am contains:
if HAVE_GTKTWOTEN
twoten_headers= gnome-db-dsn-assistant.h
twoten_sources= gnome-db-dsn-assistant.c
else
twoten_headers=
twoten_sources=
endif

indicating that the missing function is conditionally added when gtk 2.10.x is present.  However, the file doc/C/libgnomedb-scan.c does not conditionally refer to gnome_db_dsn_assistant_get_type.

Therefore, the build continues to fail with gtk 2.8.
Comment 6 Murray Cumming 2007-01-23 11:55:28 UTC
I can't seem to get that doc/C/libgnomedb-scan.c to build, so I can't start to fix this.
Comment 7 Mark Johnson 2007-01-25 05:57:43 UTC
Here is my configure line:

CFLAGS="-O2 -march=i486 -mcpu=pentium2" \
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var/lib \
  --enable-gtk-doc \
  i486-slackware-linux

The --enable-gtk-doc causes the libgnomedb-scan.c file to be created by gtkdoc-scangobj.  It reads in libgnomedb.types and produces the reference to the function which needs gtk 2.10.  This breaks the build as the function was not built since I have gtk 2.8.

Unfortunately, there doesn't seem to be any means by which this can be made conditional upon what version of gtk is installed.  I can delete the one line from the .types file and try building again, but clearly this is not a desirable work-around for people with gtk 2.10 installed.
Comment 8 Mark Johnson 2007-01-25 20:18:54 UTC
Deleting the gnome_db_dsn_assistant_get_type line from the .types file did permit libgnomedb SVN1553/trunk to compile with gtk 2.8.20 installed.  It's not really a good work-around for people with gtk 2.10.x installed.

I suppose I could remove --enable-gtk-doc from my configure and get it to build, but I like my gtk-docs.

Comment 9 Murray Cumming 2007-01-27 14:01:29 UTC
This is fixed in svn. Thanks.