GNOME Bugzilla – Bug 674781
Build failure due to broken lookup of sqlite includes
Last modified: 2012-10-02 06:31:49 UTC
Currently the build of libgda fails on OpenBSD with: cc -DPACKAGE_NAME="GNU Data Access" -DPACKAGE_TARNAME="libgda" -DPACKAGE_VERSION="5.0.3" -DPACKAGE_STRING="GNU Data Access 5.0.3" -DPACKAGE_BUGREPORT="https://bugzilla.gnome.org/enter_bug.cgi?product=libgda" -DPACKAGE_URL="http://www.gnome-db.org" -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 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG_INT=8 -DHAVE_LOCALTIME_R=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_GDU=1 -DGETTEXT_PACKAGE="libgda-5.0" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -DHAVE_UI=1 -DHAVE_GDKPIXBUF=1 -DHAVE_GTKSOURCEVIEW=1 -DHAVE_GOOCANVAS=1 -DISO_CODES_PREFIX="/usr/local" -DHAVE_LIBCRYPTO=/**/ -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_LIBSOUP=1 -DHAVE_GNOME_KEYRING=1 -DHAVE_READLINE=1 -DHAVE_TERMIOS_H=1 -I. -I../.. -I../../libgda -I../.. -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/libxml2 -DLIBGDA_ABI_NAME="libgda-5.0" -Wall -I/usr/include -DHAVE_SQLITE -I/usr/include -DHAVE_SQLITE -I/usr/local/include -I/usr/local/include/db4/ -DPNAME="SQLCipher" -DCLASS_PREFIX="GdaSQLCipher" -DSTATIC_SQLITE -DSQLITE_HAS_CODEC -DSEARCH_LIB_PATH="" -O2 -pipe -MT libgda_sqlcipher_la-gda-sqlite-pstmt.lo -MD -MP -MF .deps/libgda_sqlcipher_la-gda-sqlite-pstmt.Tpo -c gda-sqlite-pstmt.c -fPIC -DPIC -o .libs/libgda_sqlcipher_la-gda-sqlite-pstmt.o In file included from gda-sqlite.h:37, from gda-sqlite-pstmt.c:23: sqlite-src/sqlite3.h:6705: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' What's odd is that both HAVE_SQLITE and STATIC_SQLITE are defined. Looking at Makefile.am, that's more or less "normal", that is: libgda_sqlcipher wants to compile its own version of sqlite (hence the -DSTATIC_SQLITE). Note, however, that it fails abysmally in the includes. Specifically, gda-sqlite-pstmt.h doesn't care at all about STATIC_SQLITE, and will just #include <sqlite3.h> when it sees HAVE_SQLITE, so it gets the system's includes... Now, gda-sqlite.h does "the right thing" and WILL get sqlite-src/sqlite3.h. Would the attached patch be ok to push?
Created attachment 212757 [details] [review] Fix broken lookup of sqlite headers.
Anyone?
Review of attachment 212757 [details] [review]: Yes, this patch makes sense.
Review of attachment 212757 [details] [review]: Pushed as 7f6c54ad5d4b4f8dc692758da72baf469bf69e4d