lwin_geojson.lo failed to compile error: ‘json_tokener_errors’ undeclared Reproducible: Always Steps to Reproduce: 1.emerge posgis
emerge -pqv '=dev-db/postgis-2.1.1::gentoo' [ebuild R ] dev-db/postgis-2.1.1 USE="gtk -doc {-test}" emerge --info '=dev-db/postgis-2.1.1::gentoo' Portage 2.2.10 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.19, 3.14.0 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.14.0-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.2 KiB Mem: 8170416 total, 447392 free KiB Swap: 8388604 total, 8388604 free Timestamp of tree: Tue, 15 Apr 2014 04:30:01 +0000 ld GNU ld (GNU Binutils) 2.24 app-shells/bash: 4.2_p47 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.6 dev-util/cmake: 2.8.12.2 dev-util/pkgconfig: 0.28-r1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.14.1 sys-devel/binutils: 2.24-r2 sys-devel/gcc: 4.8.2-r1 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2 sys-devel/make: 4.0-r1 sys-kernel/linux-headers: 3.14 (virtual/os-headers) sys-libs/glibc: 2.19 Repositories: gentoo x-portage ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA skype-4.0.0.7-copyright google-chrome PUEL Intel-SDP Google-TOS" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="ru_RU.UTF-8" LC_ALL="" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/var/portage" PORTDIR_OVERLAY="/usr/local/portage" USE="3dnow 3dnowext X acl acpi adobe-cff alsa amd64 apng bash-completion berkdb bzip2 cairo cli consolekit corefonts cracklib cxx dbus dga djvu dri enca exif fontconfig fortran gbm gdbm geo git gtk gtk3 gtkstyle gudev iconv icu ios ipv6 jpeg jpeg2k libsamplerate mad mmx mmxext modules mp3 mpg123 multilib ncurses nls nptl ogg opencl opengl openmp openvg openxml pam pcre png policykit rar readline savedconfig session smp sqlite sse sse2 ssl ssse3 svg threads tiff truetype udev unicode upnp usb vdpau vim-syntax vorbis xcb xinerama xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby20" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON ================================================================= Package Settings ================================================================= dev-db/postgis-2.1.1 was built with the following: USE="gtk -doc -test"
Created attachment 374972 [details] environment
Created attachment 374974 [details] builld.log
Then I try look into liblwgeom/lwin_geojson.c I found that it's try use json_tokener_errors enum from json-c/json_tokener.h header file. But then I loot at json-c/json_tokener.h file I found only enum json_tokener_error. I fix typo but this don't fix problem. =(
Downgrade dev-libs/json-c-0.12 to dev-libs/json-c-0.11-r1 fix problem.
First of all, which version of dev-libs/json-c is installed ? This might be a porting problem: the upstream made at very least API changes in 0.12. Arguably, it's quite probable, that 'version-info' should have been set to '3:0:0', not '2:1:0' for this release - though if so, that's an upstream bug.
(In reply to Rafał Mużyło from comment #6) > First of all, which version of dev-libs/json-c is installed ? dev-libs/json-c-0.11-r1
(In reply to Suloev Dmitry from comment #7) > (In reply to Rafał Mużyło from comment #6) > > First of all, which version of dev-libs/json-c is installed ? > dev-libs/json-c-0.11-r1 I've meant back when the problem happened - my comment 6 was posted at about the same time your comment 5 was, so that question was already answered.
please add restrictions for postgis + json-c combination
When removing json-c and emerging with one shot, the compilation fails on a missing -lm in loader. The fix is trivial, but still worthwhile to mention.
(In reply to Oleg Korsak from comment #9) > please add restrictions for postgis + json-c combination No, it needs to be fixed in postgis (upstream) properly.
(In reply to Stefan de Konink from comment #10) > When removing json-c and emerging with one shot, the compilation fails on a > missing -lm in loader. The fix is trivial, but still worthwhile to mention. How is that relevant to this bug?
@postgis maintainers: Maybe worth checking if the latest version (2.1.2) fixes the problem?
2.1.2 doesn't fix this. I'll attach a patch that fixes this (against 2.1.2, but should work for 2.1.1 as well).
Created attachment 376852 [details, diff] patch to fix postgis to support json-c 0.12 against 2.1.2, but should work (?) for 2.1.1 as well.
Created attachment 376862 [details, diff] regen of postgis-2.1.2-pkgconfig-json.patch for postgis-2.1.2 this actually does need to be regen'ed again, as i was lazy and concated two patches to the same file as separate files.
I am also having a build problem with postgis-2.1.1. The relevent section is: checking for cpl_conv.h... yes checking for library containing GDALAllRegister... no configure: error: could not find GDAL I did: 648 $ locate gdalallregister . . . /usr/local/src/gdal-1.9.0/frmts/gdalallregister.cpp /usr/local/src/gdal-1.9.0/frmts/o/gdalallregister.lo /usr/local/src/gdal-1.9.0/frmts/o/gdalallregister.o /usr/local/src/gdal-1.9.0/frmts/o/.libs/gdalallregister.o
(In reply to Dan Beavers from comment #17) > I am also having a build problem with postgis-2.1.1. The relevent section > is: > > checking for cpl_conv.h... yes > checking for library containing GDALAllRegister... no > configure: error: could not find GDAL > > I did: > 648 $ locate gdalallregister > . . . > /usr/local/src/gdal-1.9.0/frmts/gdalallregister.cpp > /usr/local/src/gdal-1.9.0/frmts/o/gdalallregister.lo > /usr/local/src/gdal-1.9.0/frmts/o/gdalallregister.o > /usr/local/src/gdal-1.9.0/frmts/o/.libs/gdalallregister.o (1) that's an independent bug (2) /usr/local is the wrong location, please don't bypass portage like this
Unfortunately not fixed in 2.1.3
Apparently there's a fix in 2.1.4: http://trac.osgeo.org/postgis/ticket/2723
Created attachment 382084 [details, diff] postgis-2.1.3-fix-external-json-c-build.patch upstream fix
Created attachment 382086 [details, diff] postgis-2.1.3-pkgconfig-json.patch regenerated pkgconfig-json.patch for 2.1.3 to be applied _after_ the above fix WARNING: might eat kittens (but did build fine here)
Created attachment 384196 [details, diff] postgis-2.1.3.ebuild.diff using Andreas' 2 patches
*postgis-2.1.4 (05 Nov 2014) *postgis-2.0.6 (05 Nov 2014) 05 Nov 2014; Aaron W. Swenson <titanofold@gentoo.org> +postgis-2.0.6.ebuild, +postgis-2.1.4.ebuild, +files/postgis-2.1.4-pkgconfig-json.patch: Version bump. Fixes bugs 464392, 507708, and 520694.