json-c/json-c — Issue #10: make test1 fails
Author: jlpoolen
Created: 2012-01-16 20:08:07+00:00
State: open

The other tests: test2, test4, test_parse_in64, test_null, & test_cast, appear to compile. *test1*, however, goes as follows:

```bash
atom json-c # make test1
gcc -DHAVE_CONFIG_H -I. -Wall -Wwrite-strings -Werror -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -g -O2 -MT test1.o -MD -MP -MF .deps/test1.Tpo -c -o test1.o test1.c
cc1: warnings being treated as errors
test1.c: In function 'sort_fn':
test1.c:14: error: assignment discards qualifiers from pointer target type
test1.c:15: error: assignment discards qualifiers from pointer target type
make: *** [test1.o] Error 1
atom json-c #

atom json-c # uname -a
Linux atom 2.6.36-gentoo-r5 #1 SMP Fri Jan 21 16:47:09 PST 2011 i686 Intel(R) Atom(TM) CPU D525 @ 1.80GHz GenuineIntel GNU/Linux
atom json-c #
```
I'm trying this library as I'm getting json-related error messages in building postgis (spatial database). On the off-chance the error I'm experiencing with my system json which is:

```bash
[I] dev-libs/json-c
Available versions: (~)0.9
Installed versions: 0.9(20:18:52 11/25/11)
Homepage: http://oss.metaparadigm.com/json-c/
Description: A JSON implementation in C
```
touches on the test1 failure, I'll include the error output from the postgis tests:

```bash
psql:/usr/local/src/postgis-2.0.0SVN/regress/00-regress-install/postgis.sql:60:
ERROR: could not load library "/usr/local/src/postgis-2.0.0SVN/regress/00-regress-install/lib/postgis-2.0.so":
/usr/local/src/postgis-2.0.0SVN/regress/00-regress-install/lib/postgis-2.0.so: undefined symbol: json_tokener_errors
```

Is the result of test1 a warning or an error?