Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697744 - app-office/gnucash-3.7 USE=-test without dev-cpp/gtest - CMake Error at common/cmake_modules/GncAddTest.cmake:139 (message): GTEST not found. Please install it or set GTEST_ROOT or GMOCK_ROOT
Summary: app-office/gnucash-3.7 USE=-test without dev-cpp/gtest - CMake Error at commo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Aaron W. Swenson
URL:
Whiteboard:
Keywords:
: 700188 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-15 07:09 UTC by Fabian Köster
Modified: 2020-05-21 13:02 UTC (History)
16 users (show)

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


Attachments
build.log (build.log,6.28 KB, text/plain)
2019-10-15 07:09 UTC, Fabian Köster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Köster 2019-10-15 07:09:38 UTC
Created attachment 592744 [details]
build.log

The build of gnucash-3.7 only depends on dev-cpp/gtest when the "test" use flag is enabled.

But the build fails due to missing gtest when the "test" flag is not set:

-- Checking for GTEST
CMake Error at common/cmake_modules/GncAddTest.cmake:139 (message):
  GTEST not found.  Please install it or set GTEST_ROOT or GMOCK_ROOT
Call Stack (most recent call first):
  CMakeLists.txt:625 (gnc_gtest_configure)
Comment 1 Fabian Köster 2019-10-15 07:10:10 UTC
Portage 2.3.76 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-8.3.0, glibc-2.29-r2, 4.19.72-gentoo x86_64)
=================================================================
System uname: Linux-4.19.72-gentoo-x86_64-Intel-R-_Core-TM-_i7-2720QM_CPU_@_2.20GHz-with-gentoo-2.6
KiB Mem:     8040484 total,   1919988 free
KiB Swap:   78148692 total,  77366364 free
Timestamp of repository gentoo: Tue, 15 Oct 2019 05:30:01 +0000
Head commit of repository gentoo: aef5d078232b4e375d04f200552acf96bdde76c4
Head commit of repository fabians: 1941bab862fde7ea84dc25bbd5d4cff7d34a0aaf

Head commit of repository flatpak-overlay: dba2292fa92fbe7f51a437ff89d27cbab6105b67

Head commit of repository gnome: b92eb1efb6698235d4a000fb8a56254914c53089

Head commit of repository sogo-connector: 8756b734155b1564e0e56d159d5c3bba42247024

Head commit of repository torbrowser: 3f5c5b2badf99525b7b64903fcece326a04eb6e1

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.7.2 [disabled]
app-shells/bash:          4.4_p23-r1::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.9::gentoo
dev-util/ccache:          3.7.2::gentoo
dev-util/cmake:           3.14.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

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

fabians
    location: /usr/local/overlay/fabians
    sync-type: git
    sync-uri: git+ssh://git@gitlab.com/metabolite/fabians-gentoo-overlay.git
    masters: gentoo

flatpak-overlay
    location: /usr/local/portage/flatpak-overlay
    sync-type: git
    sync-uri: https://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50

gnome
    location: /usr/local/portage/gnome
    sync-type: git
    sync-uri: https://github.com/gentoo/gnome.git
    masters: gentoo
    priority: 50

sogo-connector
    location: /usr/local/portage/sogo-connector
    sync-type: git
    sync-uri: git://anongit.gentoo.org/repo/user/sogo-connector.git
    masters: gentoo
    priority: 50

torbrowser
    location: /usr/local/portage/torbrowser
    sync-type: git
    sync-uri: https://github.com/MeisterP/torbrowser-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE freedist as-is CC-Sampling-Plus-1.0"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=sandybridge -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=sandybridge -fstack-protector-strong -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=sandybridge -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx -msse4.2 -msse4.1 -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=sandybridge -fstack-protector-strong -ggdb"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j9"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord crypt cryptsetup cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv icu idn introspection ipv6 jpeg lcms ldap libnotify libsecret libtirpc mad mng modemmanager mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell split-usr ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vaapi vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" 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="evdev synaptics" KERNEL="linux" L10N="de" 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="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" SANE_BACKENDS="genesys hp" USERLAND="GNU" VIDEO_CARDS="intel i965 nouveau" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 ad PC 2019-10-15 17:52:27 UTC
I can confirm this bug. Same error message here.
Comment 3 hangglider 2019-10-31 21:03:00 UTC
sees dev-cpp/gtest is required as build time dependency. Compiles after installing that.
Comment 4 ad PC 2019-11-05 18:29:22 UTC
Same here. Please adjust the ebuild.
Comment 5 Andreas Sturmlechner gentoo-dev 2019-11-17 21:36:26 UTC
*** Bug 700188 has been marked as a duplicate of this bug. ***
Comment 6 Peter Levine 2019-12-14 17:50:01 UTC
Looking at https://github.com/Gnucash/gnucash/blob/330687deb66faa58ee5d688349d9400ee97c8313/README.dependencies#L85, it appears that gnucash treats gtest as an unconditional build time dependancy.
Comment 7 Peter Levine 2019-12-15 07:14:59 UTC
Another alternative would be to conditionally sed out all offending gtest dependant references from the CMakeLists.txt files.  Including the following in src_prepare() should work:

>	if ! use test ; then
>		find . -name CMakeLists.txt -exec sed \
>			-e '/gnc_gtest_configure()/d' \
>			-e '/add_subdirectory\s*(.*test.*)/d' \
>			-e '/^\s*scm-test-core\s*$/d' -i {} \; || die
>	fi
Comment 8 Ștefan Talpalaru 2020-01-04 14:47:37 UTC
Dependency fixed in my overlay: https://github.com/stefantalpalaru/gentoo-overlay
Comment 9 elvis 2020-01-30 09:28:32 UTC
(In reply to hangglider from comment #3)
> sees dev-cpp/gtest is required as build time dependency. Compiles after
> installing that.

Confirm this worked for me too.
Comment 10 pva 2020-02-03 12:29:09 UTC
(In reply to Peter Levine from comment #7)
> >	if ! use test ; then
> >		find . -name CMakeLists.txt -exec sed \
> >			-e '/gnc_gtest_configure()/d' \
> >			-e '/add_subdirectory\s*(.*test.*)/d' \
> >			-e '/^\s*scm-test-core\s*$/d' -i {} \; || die
> >	fi

This solution allows to build gnucash without problems.