Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 49234 - libgda-1.0.3 fails to compile with gcc 3.4.0
Summary: libgda-1.0.3 fails to compile with gcc 3.4.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 48528
  Show dependency tree
 
Reported: 2004-04-27 20:46 UTC by Robert Moss (RETIRED)
Modified: 2005-03-27 16:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix compilation error (libgda-1.0.3-gcc34.patch,1.22 KB, patch)
2004-04-27 20:46 UTC, Robert Moss (RETIRED)
Details | Diff
Updated patch to fix errors with all USE flag combinations (libgda-1.0.3-gcc34.patch,4.14 KB, patch)
2004-04-28 19:06 UTC, Robert Moss (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Moss (RETIRED) gentoo-dev 2004-04-27 20:46:35 UTC
libgda-1.0.3 contains a number of rather silly "default:" rather than "default:;" lines causing compound statement errors. The attached patch fixes this.

Reproducible: Always
Steps to Reproduce:
Comment 1 Robert Moss (RETIRED) gentoo-dev 2004-04-27 20:46:56 UTC
Created attachment 30208 [details, diff]
Patch to fix compilation error
Comment 2 Travis Tilley (RETIRED) gentoo-dev 2004-04-28 14:41:21 UTC
huh. i got libgda to compile without problems. out of curiousity... do you have doc in your USE?
Comment 3 Robert Moss (RETIRED) gentoo-dev 2004-04-28 15:27:40 UTC
No. It's possible that you've got "-fpermissive" in your CXXFLAGS? This I wouldn't recommend, as this allows many things to compile which will consequently segfault.

The only differences I can see between the ebuild I use (which contains an "epatch" line) are the CVS header, my own epatch line, and also a different inherit line - portage's one has been updated from "inherit gnome2" to "inherit gnome2 eutils", so we must be using the same source as long as we're using the same version...
Comment 4 Travis Tilley (RETIRED) gentoo-dev 2004-04-28 16:05:05 UTC
no, i'm not using any insane flags. but i'm also on a different arch.
CFLAGS="-O2 -ftracer -fweb -march=athlon64 -pipe"
CXXFLAGS="${CFLAGS}"
Comment 5 Robert Moss (RETIRED) gentoo-dev 2004-04-28 16:14:10 UTC
Well, here's the relevant error (or at least the first one - there be many):

 gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libgda\" -DVERSION=\"1.0.3\" -DBONOBO_EXPLICIT_TRANSLATION_DOMAIN=\"libgda-2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DYYTEXT_POINTER=1 -DGETTEXT_PACKAGE=\"libgda-2\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -DHAVE_MYSQL=1 -DHAVE_POPT_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE_HISTORY_H=1 -I. -I. -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -DLIBGDA_PLUGINDIR=\"/usr/local/lib/libgda/providers\" -DLIBGDA_LOCALEDIR=\"/usr/local/share/locale\" -DLIBGDA_GLOBAL_CONFIG_FILE=\"/usr/local/etc/libgda/config\" -g -O2 -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -MT gda-transaction.lo -MD -MP -MF .deps/gda-transaction.Tpo -c gda-transaction.c -o gda-transaction.o >/dev/null 2>&1
if /bin/sh ../libtool --mode=compile gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libgda\" -DVERSION=\"1.0.3\" -DBONOBO_EXPLICIT_TRANSLATION_DOMAIN=\"libgda-2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DYYTEXT_POINTER=1 -DGETTEXT_PACKAGE=\"libgda-2\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -DHAVE_MYSQL=1 -DHAVE_POPT_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE_HISTORY_H=1  -I. -I. -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -DLIBGDA_PLUGINDIR=\""/usr/local/lib/libgda/providers"\" -DLIBGDA_LOCALEDIR=\""/usr/local/share/locale"\" -DLIBGDA_GLOBAL_CONFIG_FILE=\""/usr/local/etc/libgda/config"\"    -g -O2 -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare  -MT gda-util.lo -MD -MP -MF ".deps/gda-util.Tpo" \
  -c -o gda-util.lo `test -f 'gda-util.c' || echo './'`gda-util.c; \
then mv -f ".deps/gda-util.Tpo" ".deps/gda-util.Plo"; \
else rm -f ".deps/gda-util.Tpo"; exit 1; \
fi
 gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libgda\" -DVERSION=\"1.0.3\" -DBONOBO_EXPLICIT_TRANSLATION_DOMAIN=\"libgda-2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DYYTEXT_POINTER=1 -DGETTEXT_PACKAGE=\"libgda-2\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -DHAVE_MYSQL=1 -DHAVE_POPT_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE_HISTORY_H=1 -I. -I. -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -DLIBGDA_PLUGINDIR=\"/usr/local/lib/libgda/providers\" -DLIBGDA_LOCALEDIR=\"/usr/local/share/locale\" -DLIBGDA_GLOBAL_CONFIG_FILE=\"/usr/local/etc/libgda/config\" -g -O2 -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -MT gda-util.lo -MD -MP -MF .deps/gda-util.Tpo -c gda-util.c  -fPIC -DPIC -o .libs/gda-util.o
gda-util.c: In function `gda_type_to_string':
gda-util.c:64: error: label at end of compound statement
gda-util.c: In function `gda_sql_replace_placeholders':
gda-util.c:152: warning: passing arg 1 of `sql_parse' discards qualifiers from pointer target type
gda-util.c:146: warning: unused variable `str'
make[1]: *** [gda-util.lo] Error 1
make[1]: Leaving directory `/var/tmp/portage/libgda-1.0.3/work/libgda-1.0.3/libgda'
make: *** [all-recursive] Error 1

Do you have "mysql" in your USE flags?
Comment 6 Travis Tilley (RETIRED) gentoo-dev 2004-04-28 17:27:02 UTC
nope. lemme give you the output of emerge info (kinda ironic for the dev to be giving this information and not the other way around, heh)

Portage 2.0.50-r6 (default-amd64-2004.0, gcc-3.4.0, glibc-2.3.3_pre20040420-r0, 2.6.6-rc2-love1)
=================================================================
System uname: 2.6.6-rc2-love1 x86_64 4
Gentoo Base System version 1.4.10
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -ftracer -fweb -march=athlon64 -pipe"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -ftracer -fweb -march=athlon64 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache cvs sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://localhost/portage"
USE="X X509 aac acl acpi alsa amd64 apm arts avi berkdb bidi bonobo canna cap caps cddb cdr cjk crypt cscope dga directfb dnd dnsdb dv dvd dvdr encode escreen esd ethereal etwin evo faad fbcon fbdev ffmpeg fftw freetype fs gd gdbm geoip ggi gif glut gnome gnomedb gpm gstreamer gtk gtk2 gtkhtml icq idea ieee1394 imap imlib jabber jack java jpeg kde ladcca lcms libg++ libgda libwww mad maildir md5sum mikmod motif mozilla moznocompose moznoirc moznomail mozp3p mozsvg mozxmlterm mpeg mpeg4 msn ncurses nls nogcj nvidia nviz offensive oggvorbis openal opengl oss pam pcap pcre pdflib perl pic png pnp prelude psyco pthreads python qt quicktime readline ruby sasl sdl serial skey slang slp snmp socks5 sox spell src ssl svg tcltk tcpd theora tiff timidity transcode transparent-proxy truetype type1 uml unicode usb v4l v4l2 videos wxwin wxwindows xchattext xfs xgetdefault xine xml2 xmms xv xvid yahoo zlib zvbi"

i'm guessing you have mysql in your USE.
Comment 7 Robert Moss (RETIRED) gentoo-dev 2004-04-28 18:12:36 UTC
I do indeed! This would be why. The relevant bits of broken code are mysql-related. There may be more besides which cause errors, but I'm not in the business of setting all the USE flags to on just to check which ones will break things when enabled!

That said, enabling other USE flags too *will* break things as well. I've just issued the following command in ${S}:

grep -RiH "default:" * | grep -v "default:;"

Worryingly, I got this:

config.guess:                           default: puts ("hppa2.0"); break;
config.guess:                   default: puts ("hppa1.0"); break;
config.guess:             default: puts ("hppa-hitachi-hiuxwe2"); break;
doc/C/html/installation-configuring.html:                  stored. By default: /tmp.
doc/C/libgda-docs.sgml:            stored. By default: /tmp.
libgda/gda-util.c:      default:
libgda/gda-value.c:     default:
libgda/gda-value.c:     default:
libsql/lexer.c: default:
libsql/parser.c:      default:
libsql/parser.c:      default:
libsql/parser.c:yydefault:
libsql/sql_parser.c:   default:
libsql/sql_parser.c:   default:
libsql/sql_parser.c:   default:
libsql/sql_parser.c:   default:
libsql/sql_parser.c:   default:
libsql/sql_parser.c:      default:
libsql/sql_parser.c:   default:
libsql/sql_display.c:   default:
providers/xml/gda-xml-provider.c:       default:
providers/msql/gda-msql-recordset.c:      default:
providers/msql/gda-msql-utils.c:    default: ret=g_strdup_printf("\"%s\"",val_str);
providers/odbc/gda-odbc-provider.c:     default:
providers/odbc/utils.c: default:
providers/mysql/gda-mysql-provider.c:   default:
providers/postgres/gda-postgres-provider.c:     default:
providers/postgres/gda-postgres-provider.c:     default:
providers/freetds/gda-freetds-types.c:          default:
providers/freetds/gda-freetds-types.c:                  default:
providers/ibmdb2/gda-ibmdb2-types.c:            default:
providers/ibmdb2/gda-ibmdb2-types.c:                    default:
providers/ibmdb2/gda-ibmdb2-provider.c:     default:
providers/ibmdb2/gda-ibmdb2-provider.c: default:
providers/oracle/utils.c:               default:
providers/oracle/utils.c:       default:
providers/oracle/utils.c:       default:
providers/oracle/utils.c:       default:
providers/oracle/utils.c:       default:
providers/oracle/gda-oracle-provider.c: default:
providers/oracle/gda-oracle-provider.c: default:
providers/sqlite/gda-sqlite-provider.c: default:
providers/sqlite/gda-sqlite-provider.c: default:
providers/sybase/gda-sybase-recordset.c:                default:
providers/sybase/gda-sybase-types.c:            default:
providers/sybase/gda-sybase-provider.c:                         default:
providers/sybase/gda-sybase-provider.c:         default:
providers/sybase/gda-sybase-provider.c:                         default:
testing/models.c:               default:

Obviously there are a few irrelvances here, but most need fixing. I'll submit a bigger patch which fixes those that need fixing when I've done it - I'm just starting now. FWIW, you've not got any of the USE flags libgda uses set, which is why you're not getting any of the relevant errors.
Comment 8 Robert Moss (RETIRED) gentoo-dev 2004-04-28 19:06:06 UTC
Created attachment 30289 [details, diff]
Updated patch to fix errors with all USE flag combinations

This patch is a superset of the former patch and will fix all compilation
errors, as far as I'm aware, no matter what the USE flags are.
Comment 9 Robert Moss (RETIRED) gentoo-dev 2004-05-03 19:24:10 UTC
lv, any news on this? Does it work on your machine? I've had no problems with it here, nor any problems with it reported in the GCC 3.4 thread on the forums since I made the patch available a week ago.
Comment 10 Edward Hervey 2004-06-07 09:14:29 UTC
Ran through the bug on ~amd64 with gcc34.

Worked though when I applied the above patch, any thoughts on when updating the portage ?
Comment 11 Robert Moss (RETIRED) gentoo-dev 2004-06-07 13:07:26 UTC
Also, this is fixed in 1.1.3. It compiles and runs fine without patching (except for the gtk-doc thing). Perhaps we should nick their patch instead? That said, I suspect it will be fairly similar...
Comment 12 Jeremy Huddleston (RETIRED) gentoo-dev 2004-06-12 23:38:46 UTC
taking as I got hit by this and it doesn't like anyone's on it.
Comment 13 Jeremy Huddleston (RETIRED) gentoo-dev 2004-06-13 00:29:47 UTC
fixed in cvs. thanks.
Comment 14 Chris Hoffman 2005-03-27 16:35:11 UTC
I stumbled over this bug while emerging gnumeric. Did someone forget to make libgda-1.0.4 (which seems to have the fix) stable instead of leaving 1.0.3 and the bug?