pentoo / pentoo-overlay

Gentoo overlay for security tools as well as the heart of the Pentoo Livecd
323 stars 92 forks source link

Can't emerge Ghidra #446

Closed lovesegfault closed 5 years ago

lovesegfault commented 5 years ago

I'm trying to emerge Ghidra, but it fails on my system. Here are the logs/info on the error

emerge --info '=dev-util/ghidra-9.0.2-r1::pentoo'
Portage 2.3.63 (python 3.6.8-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-8.3.0, glibc-2.29-r2, 5.0.7-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.0.7-gentoo-x86_64-Intel-R-_Xeon-R-_E-2176M_CPU_@_2.70GHz-with-gentoo-2.6
KiB Mem:    32404948 total,   7181732 free
KiB Swap:          0 total,         0 free
Head commit of repository concaveoverlay: 324cc93536419b591c504565568b55c2f0b591a0

Head commit of repository jorgicio: 0976d05660a44448753b3a0870d6b2ebaa67f569

Head commit of repository lto-overlay: b54fe1515b986efac005f995fc2aeed867544e42

Head commit of repository mv: b23106df174bae9a43505ae11d84ebb0245328aa

Head commit of repository pentoo: 9800d67dd2c7a5d95b29e87d8abd736304fc204b

Head commit of repository powerman: 173a1712f254b78c81d24737b2d0c886e0a86aed

Head commit of repository seden: a3c83fcc3b9777681066604bc0817581b01f4694

Head commit of repository steam-overlay: eb6b5b1008950ac54d897f5426e1553d3a41ba69

Head commit of repository tastytea: 5daf99dfb068fe11f42b1edf1ff2395e2b856811

Head commit of repository throttled: 937b9ec326a5a2fb3f43c1045dccacd199ddaa91

Head commit of repository tlp: 3018ce82bee9a025dffc5592fea35b9e048dd2db

Timestamp of repository gentoo: Tue, 16 Apr 2019 20:44:28 +0000
Head commit of repository gentoo: 86fb4d403f84f9469828aa3f08a58aa8b285feb9

sh bash 5.0_p3-r1
ld GNU ld (Gentoo 2.32 p1) 2.32.0
ccache version 3.6 [enabled]
app-shells/bash:          5.0_p3-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.0-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo, 3.7.3::gentoo
dev-util/ccache:          3.6::gentoo
dev-util/cmake:           3.14.2::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.16.1-r1::gentoo
sys-devel/binutils:       2.32::gentoo
sys-devel/gcc:            7.4.0-r1::gentoo, 8.3.0-r1::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
Repositories:

concaveoverlay
    location: /var/db/repos/concaveoverlay
    sync-type: git
    sync-uri: https://gitlab.com/concavegit/concaveoverlay.git
    masters: gentoo

jorgicio
    location: /var/db/repos/jorgicio
    sync-type: git
    sync-uri: https://github.com/jorgicio/jorgicio-gentoo.git
    masters: gentoo

lto-overlay
    location: /var/db/repos/lto-overlay
    sync-type: git
    sync-uri: https://github.com/InBetweenNames/gentooLTO.git
    masters: gentoo mv

mv
    location: /var/db/repos/mv
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/user/mv.git
    masters: gentoo

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/pentoo/pentoo-overlay.git
    masters: gentoo

powerman
    location: /var/db/repos/powerman
    sync-type: git
    sync-uri: https://github.com/powerman/powerman-overlay.git
    masters: gentoo

seden
    location: /var/db/repos/seden
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/user/seden.git
    masters: gentoo

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

tastytea
    location: /var/db/repos/tastytea
    sync-type: git
    sync-uri: https://schlomp.space/tastytea/overlay.git
    masters: gentoo

throttled
    location: /var/db/repos/throttled
    sync-type: git
    sync-uri: https://github.com/erpalma/throttled-overlay.git
    masters: gentoo

tlp
    location: /var/db/repos/tlp-portage
    sync-type: git
    sync-uri: https://github.com/dywisor/tlp-portage
    masters: gentoo

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

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: 1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -flto=12 -fuse-linker-plugin -falign-functions=32"
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="-march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -flto=12 -fuse-linker-plugin -falign-functions=32"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 6"
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="-march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache clean-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="-march=native -pipe"
GENTOO_MIRRORS="http://mirror.sjc02.svwh.net/gentoo/ https://mirror.sjc02.svwh.net/gentoo/ http://gentoo.cs.utah.edu/ http://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j12"
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 bash-completion berkdb blas bluetooth bzip2 cairo cdda cdr cli colord crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg fftw flac fortran gdbm gif glamor gmp gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jemalloc jit jpeg lapack latex lcms ldap libnotify libsecret libtirpc lm_sensors lua luajit lzo mad mmap mng mp3 mp4 mpeg mpi multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf pie png policykit ppds pulseaudio python qt5 raw readline sdl seccomp slang smp spell ssl startup-notification svg systemd tcpd threads tiff tracker truetype udev udisks unicode unwind upower usb v4l vaapi vdpau vim-syntax vorbis wayland wifi wxwidgets x264 xattr xcb xml xv xvid zlib zsh-completion" ABI_X86="32 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="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 sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="efi-64 pc" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en" 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" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="i965 intel 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

emerge -pqv '=dev-util/ghidra-9.0.2-r1::pentoo'
[ebuild  N    ] dev-util/ghidra-9.0.2-r1 

cat /var/log/portage/dev-util:ghidra-9.0.2-r1:20190416-213256.log
 * Package:    dev-util/ghidra-9.0.2-r1
 * Repository: pentoo
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   ccache network-sandbox preserve-libs sandbox userpriv usersandbox
]0;emerge 14:32:56 1|1 ghidra (root@bergman)kemerge 14:32:56 1|1 ghidra (root@bergman)\ * FEATURES='assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache clean-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'
 * CFLAGS='-march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -flto=12 -fuse-linker-plugin -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * CXXFLAGS='-march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -flto=12 -fuse-linker-plugin -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * FFLAGS='-march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -flto=12 -fuse-linker-plugin -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * FCFLAGS='-march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -flto=12 -fuse-linker-plugin -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * F77FLAGS='-march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -flto=12 -fuse-linker-plugin -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * LDFLAGS='-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -march=native -pipe -O3 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -flto=12 -fuse-linker-plugin -falign-functions=32'
 * MAKEOPTS='-j12'
 * gcc (Gentoo 8.3.0-r1 p1.1) 8.3.0
 * Linux bergman 5.0.7-gentoo #2 SMP PREEMPT Thu Apr 11 09:48:39 PDT 2019 x86_64 Intel(R) Xeon(R) E-2176M CPU @ 2.70GHz GenuineIntel GNU/Linux
>>> Unpacking source...
>>> Unpacking Ghidra_9.0.2_build.tar.gz to /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work
>>> Unpacking dex-tools-2.0.zip to /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work
>>> Unpacking AXMLPrinter2.jar to /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work
>>> Unpacking hfsexplorer-0_21-bin.zip to /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work
>>> Unpacking jython-standalone-2.7.1.jar to /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work
>>> Unpacking yajsw-stable-12.12.zip to /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work
>>> Unpacking ghidra-9.0.2-gradle-cache.tar.gz to /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work
>>> Unpacking dex-tools-2.0.zip to /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work/ghidra-Ghidra_9.0.2_build/.gradle
>>> Unpacking hfsexplorer-0_21-bin.zip to /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work/ghidra-Ghidra_9.0.2_build/.gradle
>>> Source unpacked in /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work
>>> Preparing source in /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work/ghidra-Ghidra_9.0.2_build ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work/ghidra-Ghidra_9.0.2_build ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-util/ghidra-9.0.2-r1/work/ghidra-Ghidra_9.0.2_build ...
Picked up _JAVA_OPTIONS:  -Duser.home=/var/tmp/portage/dev-util/ghidra-9.0.2-r1/homedir

FAILURE: Build failed with an exception.

* What went wrong:
Could not open terminal for stdout: could not get termcap entry

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
 * ERROR: dev-util/ghidra-9.0.2-r1::pentoo failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_compile
 *   environment, line 1531:  Called die
 * The specific snippet of code:
 *       ${GRADLE} yajswDevUnpack -x check -x test || die;
 * 
 * If you need support, post the output of `emerge --info '=dev-util/ghidra-9.0.2-r1::pentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-util/ghidra-9.0.2-r1::pentoo'`.
 * The complete build log is located at '/var/log/portage/dev-util:ghidra-9.0.2-r1:20190416-213256.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-util/ghidra-9.0.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-util/ghidra-9.0.2-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-util/ghidra-9.0.2-r1/work/ghidra-Ghidra_9.0.2_build'
 * S: '/var/tmp/portage/dev-util/ghidra-9.0.2-r1/work/ghidra-Ghidra_9.0.2_build'

I hope this is enough info, I'm happy to provide anything else that might be necessary to debug this :)

blshkv commented 5 years ago

I have found the following: https://github.com/gradle/gradle/issues/4426 https://bugs.gentoo.org/648720#c12

So it seems there is a problem with gradle / term / ncurses.

I'm closing this bug for now, feel free to re-open if you think we can help

blshkv commented 5 years ago

btw, our profile is not affected because the tfino flag is enabled https://github.com/pentoo/pentoo-overlay/blob/master/profiles/pentoo/base/package.use/sys-libs#L3

I suggest you to symlink our keywords/use files at least

msva commented 5 years ago

@blshkv I've nothing to say about the issue itself (although, having 'tinfo' is not enough to dodge gradle's bug), but

feel free to re-open if you think we can help

Only project members can re-open issue, after it was closed by project member. Reporter can't do it.

// Btw, I fixed that in my overlay by "patching" gradle a bit: https://github.com/msva/mva-overlay/blob/master/dev-java/gradle/gradle-5.3.1.ebuild (see L33 and L45)

blshkv commented 5 years ago

I looked at the ebuild. The hack is ugly. We will not adapt it. I had some trouble with app-misc/mc (or a ```screen````?) recently and had to change my profile to the following:

COLORTERM=truecolor
TERM=xterm-color

Feel free to change it too. Let me know if you have a better solution.

lovesegfault commented 5 years ago

Running COLORTERM=truecolor TERM=xterm-color sudo emerge -j1 ghidra fixed it, surprisingly.

I am convinced Gradle is evil now :smile: