Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 507708 - dev-db/postgis-2.1.1 failed to build
Summary: dev-db/postgis-2.1.1 failed to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-15 10:27 UTC by Dmitry Suloev
Modified: 2014-11-05 16:10 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
environment (environment,114.78 KB, text/plain)
2014-04-15 10:29 UTC, Dmitry Suloev
Details
builld.log (build.log,30.67 KB, text/plain)
2014-04-15 10:30 UTC, Dmitry Suloev
Details
patch to fix postgis to support json-c 0.12 (file_507708.txt,542 bytes, patch)
2014-05-13 21:24 UTC, Joseph Cheek
Details | Diff
regen of postgis-2.1.2-pkgconfig-json.patch for postgis-2.1.2 (postgis-2.1.2-pkgconfig-json.patch,4.80 KB, patch)
2014-05-13 21:27 UTC, Joseph Cheek
Details | Diff
postgis-2.1.3-fix-external-json-c-build.patch (postgis-2.1.3-fix-external-json-c-build.patch,3.69 KB, patch)
2014-08-02 13:31 UTC, Andreas Sturmlechner
Details | Diff
postgis-2.1.3-pkgconfig-json.patch (postgis-2.1.3-pkgconfig-json.patch,4.41 KB, patch)
2014-08-02 13:32 UTC, Andreas Sturmlechner
Details | Diff
postgis-2.1.3.ebuild.diff using Andreas' 2 patches (postgis-2.1.3.ebuild.diff,657 bytes, patch)
2014-09-04 14:56 UTC, Ștefan Talpalaru
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Suloev 2014-04-15 10:27:03 UTC
lwin_geojson.lo failed to compile error: ‘json_tokener_errors’ undeclared 

Reproducible: Always

Steps to Reproduce:
1.emerge posgis
Comment 1 Dmitry Suloev 2014-04-15 10:29:35 UTC
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"
Comment 2 Dmitry Suloev 2014-04-15 10:29:52 UTC
Created attachment 374972 [details]
environment
Comment 3 Dmitry Suloev 2014-04-15 10:30:01 UTC
Created attachment 374974 [details]
builld.log
Comment 4 Dmitry Suloev 2014-04-15 10:41:51 UTC
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. =(
Comment 5 Dmitry Suloev 2014-04-15 11:01:41 UTC
Downgrade dev-libs/json-c-0.12 to dev-libs/json-c-0.11-r1 fix problem.
Comment 6 Rafał Mużyło 2014-04-15 11:14:40 UTC
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.
Comment 7 Dmitry Suloev 2014-04-15 11:17:45 UTC
(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
Comment 8 Rafał Mużyło 2014-04-15 12:58:58 UTC
(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.
Comment 9 Oleg Korsak 2014-04-15 22:47:48 UTC
please add restrictions for postgis + json-c combination
Comment 10 Stefan de Konink 2014-04-21 14:58:00 UTC
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.
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2014-04-23 19:42:33 UTC
(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.
Comment 12 Markos Chandras (RETIRED) gentoo-dev 2014-04-23 19:46:39 UTC
(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?
Comment 13 Markos Chandras (RETIRED) gentoo-dev 2014-04-23 19:48:30 UTC
@postgis maintainers: Maybe worth checking if the latest version (2.1.2) fixes the problem?
Comment 14 Joseph Cheek 2014-05-13 21:21:37 UTC
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).
Comment 15 Joseph Cheek 2014-05-13 21:24:06 UTC
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.
Comment 16 Joseph Cheek 2014-05-13 21:27:13 UTC
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.
Comment 17 Dan Beavers 2014-05-20 00:51:34 UTC
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
Comment 18 Patrick Lauer gentoo-dev 2014-07-01 08:57:34 UTC
(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
Comment 19 Andreas Sturmlechner gentoo-dev 2014-08-02 12:10:06 UTC
Unfortunately not fixed in 2.1.3
Comment 20 Andreas Sturmlechner gentoo-dev 2014-08-02 12:41:18 UTC
Apparently there's a fix in 2.1.4: http://trac.osgeo.org/postgis/ticket/2723
Comment 21 Andreas Sturmlechner gentoo-dev 2014-08-02 13:31:11 UTC
Created attachment 382084 [details, diff]
postgis-2.1.3-fix-external-json-c-build.patch

upstream fix
Comment 22 Andreas Sturmlechner gentoo-dev 2014-08-02 13:32:41 UTC
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)
Comment 23 Ștefan Talpalaru 2014-09-04 14:56:56 UTC
Created attachment 384196 [details, diff]
postgis-2.1.3.ebuild.diff using Andreas' 2 patches
Comment 24 Aaron W. Swenson gentoo-dev 2014-11-05 16:10:10 UTC
*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.