Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904534 - sci-libs/gdal-3.6.3 doesn't build after dev-cpp/abseil-cpp-20230125.2
Summary: sci-libs/gdal-3.6.3 doesn't build after dev-cpp/abseil-cpp-20230125.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Sci-geo Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-04-19 03:03 UTC by José de Paula Rodrigues
Modified: 2023-04-23 08:39 UTC (History)
5 users (show)

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


Attachments
build.log (xz) for gdal-3.6.3 with dev-cpp/abseil-cpp-20230125.2 (build.log.xz,35.17 KB, application/x-xz)
2023-04-19 03:22 UTC, José de Paula Rodrigues
Details
Fix build with the new abseil (gdal-3.6.3-c++-17.patch,717 bytes, patch)
2023-04-20 10:39 UTC, Michael Uleysky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description José de Paula Rodrigues 2023-04-19 03:03:25 UTC
After emerging dev-cpp/abseil-cpp-20230125.2, my system tries to rebuild gdal, and fails with:

<snip ... >

/usr/bin/x86_64-pc-linux-gnu-g++ -DDONT_DEPRECATE_SPRINTF -DGDAL_COMPILATION -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/apps -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/alg -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/gcore -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3_build/gcore -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/port -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3_build/port -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/frmts -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts/flatgeobuf -I/var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts/generic  -std=c++14 -fvisibility=hidden -fPIC -Wall -Wextra -Winit-self -Wunused-parameter -Wmissing-declarations -Wlogical-op -Wshadow -Wmissing-include-dirs -Wformat -Werror=format-security -Wno-format-nonliteral -Werror=vla -Wno-clobbered -Wdate-time -Wnull-dereference -Wextra-semi -Wfloat-conversion -Wnon-virtual-dtor -Woverloaded-virtual -Wsuggest-override -fno-operator-names -Wzero-as-null-pointer-constant -std=c++11 -MD -MT ogr/ogrsf_frmts/flatgeobuf/CMakeFiles/ogr_FlatGeobuf.dir/geometrywriter.cpp.o -MF ogr/ogrsf_frmts/flatgeobuf/CMakeFiles/ogr_FlatGeobuf.dir/geometrywriter.cpp.o.d -o ogr/ogrsf_frmts/flatgeobuf/CMakeFiles/ogr_FlatGeobuf.dir/geometrywriter.cpp.o -c /var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts/flatgeobuf/geometrywriter.cpp
In file included from /usr/include/absl/base/config.h:86,
                 from /usr/include/absl/base/attributes.h:37,
                 from /usr/include/absl/strings/string_view.h:39,
                 from /var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts/flatgeobuf/flatbuffers/base.h:237,
                 from /var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts/flatgeobuf/flatbuffers/array.h:20,
                 from /var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts/flatgeobuf/flatbuffers/flatbuffers.h:22,
                 from /var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts/flatgeobuf/feature_generated.h:6,
                 from /var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts/flatgeobuf/geometrywriter.h:35,
                 from /var/tmp/portage/sci-libs/gdal-3.6.3/work/gdal-3.6.3/ogr/ogrsf_frmts/flatgeobuf/geometrywriter.cpp:29:
/usr/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported."
   79 | #error "C++ versions less than C++14 are not supported."
      |  ^~~~~
/usr/include/absl/strings/string_view.h:52:26: error: 'string_view' in namespace 'std' does not name a type
   52 | using string_view = std::string_view;
      |                          ^~~~~~~~~~~
/usr/include/absl/strings/string_view.h:52:21: note: 'std::string_view' is only available from C++17 onwards
   52 | using string_view = std::string_view;
      |                     ^~~
<snip ... >


The build system doesn't allow me to override the -std=c++11 CXXFLAGS (I've tried, without success). Masking =dev-cpp/abseil-cpp-20230125.2 allows this version of gdal to be built without a hitch.

Reproducible: Always

Steps to Reproduce:
USE flags for gdal and abseil-cpp:

[ebuild  r  U ~] dev-cpp/abseil-cpp-20230125.2:0/20230125::gentoo [20220623.1:0/20220623::gentoo] USE="-test" 0 KiB
[ebuild  rR   ~] sci-libs/gdal-3.6.3:0/32::gentoo  USE="armadillo curl fits geos gif gml hdf5 java jpeg jpeg2k lzma netcdf opencl pdf png postgres python spatialite sqlite webp zstd (-doc) -heif -mysql -odbc -ogdi -oracle -test -xls" CPU_FLAGS_X86="avx avx2 sse sse2 sse4_1 ssse3" PYTHON_SINGLE_TARGET="python3_10 -python3_9 -python3_11" 0 KiB


snippet of cmake config results (when trying to override CXXFLAGS via package.env, adding only CXXFLAGS=-std=c++14):

--   CMAKE_C_FLAGS:              -march=native -O2 -pipe -fvisibility=hidden
--   CMAKE_CXX_FLAGS:              -std=c++14 -fvisibility=hidden
--   CMAKE_CXX11_STANDARD_COMPILE_OPTION:              -std=c++11
--   CMAKE_CXX11_EXTENSION_COMPILE_OPTION:              -std=gnu++11
--   CMAKE_EXE_LINKER_FLAGS:              -Wl,-O1 -Wl,--as-needed
--   CMAKE_MODULE_LINKER_FLAGS:              -Wl,-O1 -Wl,--as-needed -Wl,--no-undefined
--   CMAKE_SHARED_LINKER_FLAGS:              -Wl,-O1 -Wl,--as-needed -Wl,--no-undefined


The build system explicitly asks for CXX11; therefore, for this version of gdal, the only solution I see is for gdal to explicitly depend on <=dev-cpp/abseil-cpp-20220623.1.


Expected Results:  
sci-libs/gdal should explicitly depend on dev-cpp/abseil-cpp
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-19 03:13:39 UTC
Please always include the full build.log and emerge --info.
Comment 2 José de Paula Rodrigues 2023-04-19 03:22:50 UTC
Created attachment 860339 [details]
build.log (xz) for gdal-3.6.3 with dev-cpp/abseil-cpp-20230125.2
Comment 3 José de Paula Rodrigues 2023-04-19 03:23:25 UTC
venus ~ # emerge --info
Portage 3.0.46 (python 3.10.10-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-12, glibc-2.37-r2, 6.2.11-gentoo-x86_64-venus x86_64)
=================================================================
System uname: Linux-6.2.11-gentoo-x86_64-venus-x86_64-Intel-R-_Core-TM-_i7-9750H_CPU_@_2.60GHz-with-glibc2.37
KiB Mem:    16242708 total,   4063896 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Wed, 19 Apr 2023 03:00:01 +0000
Head commit of repository gentoo: f6f865a8b14e05e674ac973e35b8463223febd54
Timestamp of repository steam-overlay: Sun, 02 Apr 2023 01:01:55 +0000
Head commit of repository steam-overlay: d24ddd3db84f894a52a2fdfd55a26ca822420081

sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.39 p5) 2.39.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.10.10_p3::gentoo, 3.11.2_p2::gentoo
dev-lang/rust:             1.68.2::gentoo
dev-util/cmake:            3.25.3::gentoo
dev-util/meson:            1.1.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r1::gentoo, 16.0.1::gentoo
sys-devel/gcc:             12.2.1_p20230304::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            15.0.7::gentoo, 16.0.1::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  6.2::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r2::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

localrepo
    location: /var/db/repos/localrepo
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live 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 qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j6"
PKGDIR="/var/cache/binpkgs"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind encode eselect-ldso exif flac fortran gdbm gif gpm grub2 gtk3 gui hwaccel iconv icu ipv6 jpeg kde kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nptl numa offensive ogg opencl opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseadio qml qt5 readline screencast sdl seccomp semantic-desktop sound spell split-usr ssl startup-notification svg synaptics test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland webp widgets wxwidgets x264 xattr xcb xft xinerama xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF NVPTX WebAssembly X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres14" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="nvidia intel i915 i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 4 Michael Uleysky 2023-04-20 10:39:43 UTC
Created attachment 860428 [details, diff]
Fix build with the new abseil

Added -std=c++-17 flag for the flatgeobuf plugin.
Comment 5 Bernd 2023-04-21 07:00:42 UTC
I can confirm this. It looks like abseil-cpp being an automagic dependency in gdal-3.6.3 as well. At least it's not listed in the ebuild, nor have I noticed it in the configuration output, grepping for abseil and absl.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-23 06:05:13 UTC
(In reply to Bernd from comment #5)
> I can confirm this. It looks like abseil-cpp being an automagic dependency
> in gdal-3.6.3 as well. At least it's not listed in the ebuild, nor have I
> noticed it in the configuration output, grepping for abseil and absl.

It's via flatbuffers, I think.
Comment 7 Larry the Git Cow gentoo-dev 2023-04-23 06:06:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a196821e2f3783c1e40e318505c5c92d336237a7

commit a196821e2f3783c1e40e318505c5c92d336237a7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-04-23 06:03:29 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-23 06:03:54 +0000

    sci-libs/gdal: add 3.6.4
    
    Closes: https://bugs.gentoo.org/900106
    Closes: https://bugs.gentoo.org/904534
    Thanks-to: Michael Uleysky <uleysky@gmail.com> (abseil patch)
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-libs/gdal/Manifest                             |   2 +
 .../gdal-3.6.4-abseil-cpp-20230125.2-c++17.patch   |  12 +
 sci-libs/gdal/gdal-3.6.4.ebuild                    | 249 +++++++++++++++++++++
 3 files changed, 263 insertions(+)
Comment 8 Bernd 2023-04-23 08:39:29 UTC
(In reply to Sam James from comment #6)
> (In reply to Bernd from comment #5)
> > I can confirm this. It looks like abseil-cpp being an automagic dependency
> > in gdal-3.6.3 as well. At least it's not listed in the ebuild, nor have I
> > noticed it in the configuration output, grepping for abseil and absl.
> 
> It's via flatbuffers, I think.

That's possibly true. The error happened in a file which seemed related to flatbuffers from it's naming.