Opened 7 years ago

Closed 7 years ago

#5510 closed defect (duplicate)

undefined reference to `json_tokener_errors'

Reported by: ryszard Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.11.0
Severity: normal Keywords: undefined reference json_tokener_errors
Cc:

Description

Apparently symbol "json_tokener_errors" is defined in /usr/local/lib/libjson-c.so, which is linked... What am I missing?

$ pwd /home/ryszard/Downloads/installs/gdal-1.11.0 $ make >& make.log $ tail make.log libtool: link: g++ .libs/gdalinfo.o .libs/commonutils.o -o .libs/gdalinfo /home/ryszard/Downloads/installs/gdal-1.11.0/.libs/libgdal.so -L/usr/local/lib -L/usr/local/pgsql/lib /usr/local/lib/libjson-c.so /usr/local/lib/libgeos_c.so /usr/local/lib/libgeos.so /usr/lib/x86_64-linux-gnu/libsqlite3.so -lodbc -lodbcinst /usr/lib/x86_64-linux-gnu/libexpat.so -lxerces-c -ljasper -lnetcdf -lhdf5 /usr/lib/libmfhdfalt.so /usr/lib/libdfalt.so -lgif -ljpeg /usr/lib/x86_64-linux-gnu/libtiff.so -lpng -lpq -lz -lpthread -lrt -ldl -lpcre /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so -lxml2 -pthread /home/ryszard/Downloads/installs/gdal-1.11.0/.libs/libgdal.so: undefined reference to `json_tokener_errors' collect2: error: ld returned 1 exit status make[1]: * [gdalinfo] Error 1 make[1]: Leaving directory `/home/ryszard/Downloads/installs/gdal-1.11.0/apps' make: * [apps-target] Error 2 $ ls -lt /usr/local/lib/libjson-c.so lrwxrwxrwx 1 root root 18 May 13 15:38 /usr/local/lib/libjson-c.so -> libjson-c.so.2.0.0 $ nm /usr/local/lib/libjson-c.so.2.0.0 | grep json_tokener_errors 0000000000209d20 d json_tokener_errors $ nm /usr/local/lib/libjson-c.so | grep json_tokener_errors 0000000000209d20 d json_tokener_errors $

Change History (3)

comment:1 Changed 7 years ago by Even Rouault

Which libjson version did you compile ? What is your OS ?

comment:2 in reply to:  1 Changed 7 years ago by ryszard

Replying to rouault:

Which libjson version did you compile ? What is your OS ?

#define JSON_C_VERSION "0.12.99" [from json-c/json_c_version.h]

What is your OS ?

$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS"

comment:3 Changed 7 years ago by Even Rouault

Resolution: duplicate
Status: newclosed

Duplicate of #5449

Note: See TracTickets for help on using tickets.