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 674781 - Build failure due to broken lookup of sqlite includes
Build failure due to broken lookup of sqlite includes
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: SQLite provider
5.0.x
Other OpenBSD
: Normal normal
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-25 09:43 UTC by Jasper Lievisse Adriaanse
Modified: 2012-10-02 06:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix broken lookup of sqlite headers. (899 bytes, patch)
2012-04-25 09:47 UTC, Jasper Lievisse Adriaanse
committed Details | Review

Description Jasper Lievisse Adriaanse 2012-04-25 09:43:50 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?
Comment 1 Jasper Lievisse Adriaanse 2012-04-25 09:47:11 UTC
Created attachment 212757 [details] [review]
Fix broken lookup of sqlite headers.
Comment 2 Jasper Lievisse Adriaanse 2012-10-01 20:58:14 UTC
Anyone?
Comment 3 Antoine Jacoutot 2012-10-01 21:21:03 UTC
Review of attachment 212757 [details] [review]:

Yes, this patch makes sense.
Comment 4 Jasper Lievisse Adriaanse 2012-10-02 06:31:32 UTC
Review of attachment 212757 [details] [review]:

Pushed as 7f6c54ad5d4b4f8dc692758da72baf469bf69e4d