Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685668 - dev-db/spatialite-5.0.1-r1: stabilisation (was: dev-db/spatialite-4.3.0a unable to find proj_api.h)
Summary: dev-db/spatialite-5.0.1-r1: stabilisation (was: dev-db/spatialite-4.3.0a unab...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sci-geo Project
Keywords: CC-ARCHES
: 693072 696988 (view as bug list)
Depends on: 773958
Blocks: PROJ-8
  Show dependency tree
Reported: 2019-05-11 22:24 UTC by rnddim
Modified: 2021-05-16 12:41 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---
nattka: sanity-check+

spatialite build log (build.log,11.52 KB, text/x-log)
2019-05-11 22:24 UTC, rnddim
no flags Details
Updated ebuild for PROJ.6 (spatialite-4.3.0a-r1.ebuild,1.14 KB, text/plain)
2019-05-14 15:52 UTC, Dmitry Suloev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description rnddim 2019-05-11 22:24:42 UTC
Created attachment 576082 [details]
spatialite build log

In attempting to rebuild spatialite via @preserved-rebuild because sci-libs/proj was updated, the following error shows up at configuration time:

checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: cannot find proj_api.h, bailing out

This is despite the fact that /usr/include/proj_api.h exists. Taking a quick look at the include file, perhaps it's because spatialite now must enable ACCEPT_USE_OF_DEPRECATED_PROJ_API_H, and the configure system can't distinguish between an include that doesn't exist and one that breaks compilation?

emerge --info '=dev-db/spatialite-4.3.0a::gentoo':

Portage 2.3.66 (python 3.7.3-final-0, default/linux/amd64/17.0/desktop/plasma/systemd, gcc-9.1.0, glibc-2.29-r2, 5.0.12-gentoo x86_64)
                         System Settings
System uname: Linux-5.0.12-gentoo-x86_64-AMD_Athlon-tm-_Dual_Core_Processor_4450B-with-gentoo-2.6
KiB Mem:     3762032 total,    232000 free
KiB Swap:    8388604 total,   7416692 free
Timestamp of repository gentoo: Fri, 10 May 2019 09:00:01 +0000
Head commit of repository gentoo: 1b57f8ba3b117c04a58623c59c0fc206f7184956
sh bash 5.0_p7
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          5.0_p7::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo, 3.7.3::gentoo
dev-util/cmake:           3.14.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.1.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

    location: /usr/local/portage
    masters: gentoo

    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

    location: /var/lib/layman/dotnet
    sync-type: laymansync
    masters: gentoo
    priority: 50

    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: git://
    masters: gentoo
    priority: 50

    location: /var/lib/layman/vmware
    sync-type: laymansync
    masters: gentoo
    priority: 50

Installed sets: @kde-frameworks, @kde-plasma
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -O2 -pipe"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/angband/gamedata/ /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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 --exclude=/.git"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg flac fortran gdbm gif glamor gtk iconv ipv6 jack jpeg kde kipi kwallet lcms ldap libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qml qt5 readline sdl seccomp semantic-desktop spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vdpau vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid 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="sheets" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="mouse keyboard wacom evdev joystick" KERNEL="linux" L10N="en-US en de fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7" QEMU_SOFTMMU_TARGETS="x86_64 i386 ppc" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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"

                        Package Settings

dev-db/spatialite-4.3.0a::gentoo was built with the following:
USE="geos iconv proj xls xml -test" ABI_X86="(64)"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
Comment 1 Dmitry Suloev 2019-05-14 14:30:15 UTC
This caused due proj_api.h deprecation in latest proj versions.
Workaround is add ">=sci-libs/proj-6.0.0" to /etc/portage/package.mask
Comment 2 Dmitry Suloev 2019-05-14 15:52:32 UTC
Created attachment 576664 [details]
Updated ebuild for PROJ.6
Comment 3 Juergen Rose 2019-05-15 07:41:47 UTC
(In reply to Dmitry Suloev from comment #2)
> Created attachment 576664 [details]
> Updated ebuild for PROJ.6

Thank you, seems to work here.
Comment 4 Martin Mokrejš 2019-07-10 09:03:51 UTC
Thanks, the updated ebuild works for me too, though I see some warnings?

checking proj_api.h usability... yes
checking proj_api.h presence... no
configure: WARNING: proj_api.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: proj_api.h: proceeding with the compiler's result
checking for proj_api.h... yes
checking for library containing pj_init_plus... -lproj
checking for library containing pj_init_ctx... none required

Later I saw "gcc ... -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H". It compiled/installed at least.
Comment 5 Daniel M. Weeks 2019-07-29 14:59:48 UTC
dev-db/spatialite-4.3.0-r1 is affected by this as well. See also bug # 690994 about dependency (rebuild) issue.
Comment 6 Andreas Sturmlechner gentoo-dev 2019-10-20 13:25:00 UTC
*** Bug 696988 has been marked as a duplicate of this bug. ***
Comment 7 Andreas Sturmlechner gentoo-dev 2019-10-20 13:29:53 UTC
Thanks for your ebuild, please instead submit a unified diff next time so the changes can be examined.
Comment 8 Andreas Sturmlechner gentoo-dev 2019-10-20 13:32:39 UTC
*** Bug 693072 has been marked as a duplicate of this bug. ***
Comment 9 Larry the Git Cow gentoo-dev 2019-10-20 14:20:31 UTC
The bug has been closed via the following commit(s):

commit edc61c208f0045cf5335a130d0dbad2909241073
Author:     Andreas Sturmlechner <>
AuthorDate: 2019-10-20 13:31:11 +0000
Commit:     Andreas Sturmlechner <>
CommitDate: 2019-10-20 14:19:36 +0000

    dev-db/spatialite: Workaround build with >=sci-libs/proj-6
    Thanks-to: Dmitry Suloev <>
    Package-Manager: Portage-2.3.77, Repoman-2.3.17
    Signed-off-by: Andreas Sturmlechner <>

 dev-db/spatialite/spatialite-4.3.0a.ebuild | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 10 Andreas Sturmlechner gentoo-dev 2020-06-22 08:38:39 UTC
Re-opening as a workaround is no fix and it is running out of time.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-07-14 19:58:37 UTC
From the URL (bug):
" sandro added on 2019-05-15 08:59:05:

full PROJ.6 support has been implemented by commit b72ce4b2a5"

We can see the related changes here:

There have been some more recent changes to Proj and GDAL support, so maybe a snapshot for now would work. The latest beta is from August 2018, unfortunately.
Comment 12 Larry the Git Cow gentoo-dev 2021-03-01 23:37:24 UTC
The bug has been referenced in the following commit(s):

commit a3a925d0f1ba42a6dacde0b2bd09ac8dc20c6096
Author:     Sam James <>
AuthorDate: 2021-03-01 23:32:24 +0000
Commit:     Sam James <>
CommitDate: 2021-03-01 23:35:38 +0000

    dev-db/spatialite-tools: bump to 5.0.1
    Signed-off-by: Sam James <>

 dev-db/spatialite-tools/Manifest                   |  1 +
 .../spatialite-tools/spatialite-tools-5.0.1.ebuild | 33 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

commit 1befe72c0a511c34cd1d7979a77f31147a68287e
Author:     Sam James <>
AuthorDate: 2021-03-01 23:24:56 +0000
Commit:     Sam James <>
CommitDate: 2021-03-01 23:35:35 +0000

    dev-db/spatialite: bump to 5.0.1
    Seems to build with PROJ 8 as per upstream notes.
    Signed-off-by: Sam James <>

 dev-db/spatialite/Manifest                |  1 +
 dev-db/spatialite/spatialite-5.0.1.ebuild | 56 +++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
Comment 13 NATTkA bot gentoo-dev 2021-04-10 12:48:31 UTC Comment hidden (obsolete)
Comment 14 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-11 00:14:28 UTC
x86 stable
Comment 15 Agostino Sarubbo gentoo-dev 2021-05-01 18:20:34 UTC
amd64 stable
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-16 12:41:36 UTC
arm64 done

all arches done