[sqlite] failure to build static library with -DSQLITE_ENABLE_ICU

2014-03-17 Thread Alex Loukissas
2014-03-14 0:30 GMT+01:00 Alex Loukissas :
> I have verified that adding the said include fixes the issue (1-line
patch):
>
> diff --git sqlite3.c sqlite3.c
> index 7c6d3e2..a9399e4 100644
> --- sqlite3.c
> +++ sqlite3.c
> @@ -145656,6 +145656,7 @@ SQLITE_API int sqlite3_rtree_init(
>  #include 
>  #include 
>  #include 
> +#include 
>
>  /* #include  */
>
> Hope this helps others that run into this issue.

> This sounds strange to me (I compiled the SQLite ICU extension
> for Cygwin, and didn't run into this issue).

> According to the ICU documentation,  (which is
> just above the ) includes , which
> in turn includes :
 >
> So, the current order of includes should just work fine.
>
> What ICU version are you using? I used ICU 4.8 and 5.1, neither
> of them have the problem you describe. Sorry.
>
> Regards,
>  Jan Nijtmans

Hi,

I've been using icu4c, ver 52.1 (most current), which I build from source
into a static library, using the following options (copying from my bash
build script):

CONFIG_OPTS="--enable-static --disable-shared --disable-strict \
--disable-extras --disable-samples --disable-tests"
EXTRA_FLAGS="-DU_HAVE_NL_LANGINFO_CODESET=0 \
-DU_USING_ICU_NAMESPACE=0 \
-DU_CHARSET_IS_UTF8=1 \
-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 \
-DUCONFIG_NO_LEGACY_CONVERSION=1 \
-DUCONFIG_NO_TRANSLITERATION=0 \
-D__STDC_INT64__ \
-DU_TIMEZONE=0"
GCC_FLAGS="-fno-short-wchar -fno-short-enums"

I'll try to see whether the pointer you gave is still valid in 52.1 and
perhaps one of my macros is blocking an include with an ifdef.

Thanks!
Alex

-- 
Alex Loukissas

www.maginatics.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] failure to build static library with -DSQLITE_ENABLE_ICU

2014-03-14 Thread Jan Nijtmans
2014-03-14 0:30 GMT+01:00 Alex Loukissas :
> I have verified that adding the said include fixes the issue (1-line patch):
>
> diff --git sqlite3.c sqlite3.c
> index 7c6d3e2..a9399e4 100644
> --- sqlite3.c
> +++ sqlite3.c
> @@ -145656,6 +145656,7 @@ SQLITE_API int sqlite3_rtree_init(
>  #include 
>  #include 
>  #include 
> +#include 
>
>  /* #include  */
>
> Hope this helps others that run into this issue.

This sounds strange to me (I compiled the SQLite ICU extension
for Cygwin, and didn't run into this issue).

According to the ICU documentation,  (which is
just above the ) includes , which
in turn includes :

So, the current order of includes should just work fine.

What ICU version are you using? I used ICU 4.8 and 5.1, neither
of them have the problem you describe. Sorry.

Regards,
 Jan Nijtmans
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] failure to build static library with -DSQLITE_ENABLE_ICU

2014-03-13 Thread Alex Loukissas
Hello,

I have been trying to build sqlite 3.8.4.1 using the ICU extension and have
seem to have hit an apparent bug in the sqlite code. After much debugging,
it looks like the header  is missing, which causes warnings
like the following to appear:

sqlite3.c: In function 'icuLikeCompare':
sqlite3.c:145704:5: warning: implicit declaration of function
'U8_NEXT_UNSAFE' [-Wimplicit-function-declaration]
 U8_NEXT_UNSAFE(zPattern, iPattern, uPattern);
 ^
sqlite3.c:145725:11: warning: implicit declaration of function
'U8_FWD_1_UNSAFE' [-Wimplicit-function-declaration]
   U8_FWD_1_UNSAFE(zString, iString);
   ^
sqlite3.c: In function 'icuLikeFunc':
sqlite3.c:145804:5: warning: implicit declaration of function 'U8_NEXT'
[-Wimplicit-function-declaration]
 U8_NEXT(zE, i, nE, uEsc);
 ^

This, in turn, manifests as undefined symbol errors in the linker:

./.libs/libsqlite3.a(sqlite3.o): In function `icuLikeCompare':
/home/alex/src/vulcan/build/workdir/sqlite-autoconf-3080401/sqlite3.c:145704:
undefined reference to `U8_NEXT_UNSAFE'
/home/alex/src/vulcan/build/workdir/sqlite-autoconf-3080401/sqlite3.c:145743:
undefined reference to `U8_FWD_1_UNSAFE'
/home/alex/src/vulcan/build/workdir/sqlite-autoconf-3080401/sqlite3.c:145752:
undefined reference to `U8_NEXT_UNSAFE'
/home/alex/src/vulcan/build/workdir/sqlite-autoconf-3080401/sqlite3.c:145725:
undefined reference to `U8_FWD_1_UNSAFE'
/home/alex/src/vulcan/build/workdir/sqlite-autoconf-3080401/sqlite3.c:145736:
undefined reference to `U8_FWD_1_UNSAFE'
./.libs/libsqlite3.a(sqlite3.o): In function `icuOpen':
/home/alex/src/vulcan/build/workdir/sqlite-autoconf-3080401/sqlite3.c:146257:
undefined reference to `U8_NEXT'
./.libs/libsqlite3.a(sqlite3.o): In function `icuLikeFunc':
/home/alex/src/vulcan/build/workdir/sqlite-autoconf-3080401/sqlite3.c:145804:
undefined reference to `U8_NEXT'
collect2: error: ld returned 1 exit status
make[1]: *** [sqlite3] Error 1
make: *** [sqlite] Error 2


I have verified that adding the said include fixes the issue (1-line patch):

diff --git sqlite3.c sqlite3.c
index 7c6d3e2..a9399e4 100644
--- sqlite3.c
+++ sqlite3.c
@@ -145656,6 +145656,7 @@ SQLITE_API int sqlite3_rtree_init(
 #include 
 #include 
 #include 
+#include 

 /* #include  */

Hope this helps others that run into this issue.

-- 
Alex Loukissas

www.maginatics.com
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users