vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.35k stars 3.52k forks source link

Build failure on Gentoo Linux #1792

Closed soleera closed 7 years ago

soleera commented 7 years ago

Issue

I've been trying to emerge Hyper using this ebuild, however NPM fails during the compile phase. Any input on the correctness of the ebuild or if I'm missing any dependencies that could cause this failure would be much appreciated! I've included a copy of my terminal output, NPM build log, and Gentoo system settings, although I'm not sure how much use that latter might be (if at all). Thanks!

Terminal Output:

┌───────────────────────────────────────────────────┐
│       electron-builder update check failed                                                                   │
│        Try running with sudo or get access                                                                  │
│       to the local update config store via                                                                     │
│ sudo chown -R $USER:$(id -gn $USER) /root/.config                                             │
└───────────────────────────────────────────────────┘

npm ERR! Linux 4.9.24-hardened
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "dist"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! @ dist: `npm run build && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js && build`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the @ dist script 'npm run build && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js && build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js && build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/tmp/portage/x11-terms/hyper-1.3.1/homedir/.npm/_logs/2017-05-07T08_50_04_581Z-debug.log
 * ERROR: x11-terms/hyper-1.3.1::seadep failed (compile phase):
 *   npm packaging failed!
 * 
 * Call stack:
 *     ebuild.sh, line 115:  Called src_compile
 *   environment, line 2279:  Called die
 * The specific snippet of code:
 *       npm run dist || die "npm packaging failed!"
 * 
 * If you need support, post the output of `emerge --info '=x11-terms/hyper-1.3.1::seadep'`,
 * the complete build log and the output of `emerge -pqv '=x11-terms/hyper-1.3.1::seadep'`.
 * The complete build log is located at '/var/tmp/portage/x11-terms/hyper-1.3.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-terms/hyper-1.3.1/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-terms/hyper-1.3.1/work/hyper-1.3.1'
 * S: '/var/tmp/portage/x11-terms/hyper-1.3.1/work/hyper-1.3.1'

 * Messages for package x11-terms/hyper-1.3.1:

 * ERROR: x11-terms/hyper-1.3.1::seadep failed (compile phase):
 *   npm packaging failed!
 * 
 * Call stack:
 *     ebuild.sh, line 115:  Called src_compile
 *   environment, line 2279:  Called die
 * The specific snippet of code:
 *       npm run dist || die "npm packaging failed!"
 * 
 * If you need support, post the output of `emerge --info '=x11-terms/hyper-1.3.1::seadep'`,
 * the complete build log and the output of `emerge -pqv '=x11-terms/hyper-1.3.1::seadep'`.
 * The complete build log is located at '/var/tmp/portage/x11-terms/hyper-1.3.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-terms/hyper-1.3.1/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-terms/hyper-1.3.1/work/hyper-1.3.1'
 * S: '/var/tmp/portage/x11-terms/hyper-1.3.1/work/hyper-1.3.1'

NPM Build Log:

0 info it worked if it ends with ok                                                                                                                                                            
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dist' ]                                                                                                                               
2 info using npm@4.2.0                                                                                                                                                                         
3 info using node@v7.9.0                                                                                                                                                                       
4 verbose run-script [ 'predist', 'dist', 'postdist' ]                                                                                                                                         
5 info lifecycle @~predist: @                                                                                                                                                                  
6 silly lifecycle @~predist: no script for predist, continuing                                                                                                                                 
7 info lifecycle @~dist: @                                                                                                                                                                     
8 verbose lifecycle @~dist: unsafe-perm in lifecycle true                                                                                                                                      
9 verbose lifecycle @~dist: PATH: /usr/lib64/node_modules/npm/bin/node-gyp-bin:/var/tmp/portage/x11-terms/hyper-1.3.1/work/hyper-1.3.1/node_modules/.bin:/usr/lib/portage/python3.4/ebuild-helpers/xattr:/usr/lib/portage/python3.4/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/6.3.0:/usr/lib/llvm/4/bin           
10 verbose lifecycle @~dist: CWD: /var/tmp/portage/x11-terms/hyper-1.3.1/work/hyper-1.3.1                                                                                                      
11 silly lifecycle @~dist: Args: [ '-c',                                                                                                                                                       
11 silly lifecycle   'npm run build && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js && build' ]                              
12 silly lifecycle @~dist: Returned: code: 255  signal: null                                                                                                                                   
13 info lifecycle @~dist: Failed to exec dist script                                                                                                                                           
14 verbose stack Error: @ dist: `npm run build && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js && build`                     
14 verbose stack Exit status 255                                                                                                                                                               
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib64/node_modules/npm/lib/utils/lifecycle.js:279:16)                                                                                   
14 verbose stack     at emitTwo (events.js:106:13)                                                                                                                                             
14 verbose stack     at EventEmitter.emit (events.js:194:7)                                                                                                                                    
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib64/node_modules/npm/lib/utils/spawn.js:40:14)                                                                                        
14 verbose stack     at emitTwo (events.js:106:13)                                                                                                                                             
14 verbose stack     at ChildProcess.emit (events.js:194:7)                                                                                                                                    
14 verbose stack     at maybeClose (internal/child_process.js:899:16)                                                                                                                          
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)                                                                                                  
15 verbose pkgid @                                                                                                                                                                             
16 verbose cwd /var/tmp/portage/x11-terms/hyper-1.3.1/work/hyper-1.3.1                                                                                                                         
17 error Linux 4.9.24-hardened                                                                                                                                                                 
18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "dist"                                                                                                                                      
19 error node v7.9.0                                                                                                                                                                           
20 error npm  v4.2.0                                                                                                                                                                           
21 error code ELIFECYCLE                                                                                                                                                                       
22 error errno 255                                                                                                                                                                             
23 error @ dist: `npm run build && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js && build`                                    
23 error Exit status 255                                                                                                                                                                       
24 error Failed at the @ dist script 'npm run build && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js && build'.               
24 error Make sure you have the latest version of node.js and npm installed.                                                                                                                   
24 error If you do, this is most likely a problem with the  package,                                                                                                                           
24 error not with npm itself.                                                                                                                                                                  
24 error Tell the author that this fails on your system:                                                                                                                                       
24 error     npm run build && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js && build                                          
24 error You can get information on how to open an issue for this project with:                                                                                                                
24 error     npm bugs                                                                                                                                                                          
24 error Or if that isn't available, you can get their info via:                                                                                                                               
24 error     npm owner ls                                                                                                                                                                      
24 error There is likely additional logging output above.                                                                                                                                      
25 verbose exit [ 255, true ] 

Gentoo System Settings:

Portage 2.3.5 (python 3.4.6-final-0, hardened/linux/amd64/selinux, gcc-6.3.0, glibc-2.23-r3, 4.9.24-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.24-hardened-x86_64-AMD_Ryzen_7_1800X_Eight-Core_Processor-with-gentoo-2.3
KiB Mem:    16246772 total,  13078956 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Sun, 07 May 2017 01:00:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13-r100::sage-on-gentoo, 3.4.6::gentoo
dev-util/cmake:           3.8.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.25::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

go-overlay
    location: /var/lib/layman/go-overlay
    masters: gentoo
    priority: 50

haskell
    location: /var/lib/layman/haskell
    masters: gentoo
    priority: 50

last-hope
    location: /var/lib/layman/last-hope
    masters: gentoo
    priority: 50

mva
    location: /var/lib/layman/mva
    masters: gentoo
    priority: 50

python
    location: /var/lib/layman/python
    masters: gentoo
    priority: 50

raiagent
    location: /var/lib/layman/raiagent
    masters: gentoo
    priority: 50

ruby
    location: /var/lib/layman/ruby
    masters: gentoo
    priority: 50

rust
    location: /var/lib/layman/rust
    masters: gentoo
    priority: 50

sage-on-gentoo
    location: /var/lib/layman/sage-on-gentoo
    masters: gentoo science
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

seadep
    location: /var/lib/layman/seadep
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 16 --load-average 16"
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 selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo ftp://ftp.swin.edu.au/gentoo"
LANG="en_NZ.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="--jobs 16 --load-average 16"
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 aalib acl alsa amd64 ao atm audiofile bash-completion berkdb bluetooth branding bzip2 bzlib cairo caps cdda cdinstall cdr cgi cjk cli consolekit cracklib crypt cscope css ctype cups curl cvs cxx dbus dedicated dga directfb dri dts dvd dvdr encode enscript exif expat fam fastcgi fbcon ffmpeg flac fontconfig ftp gd gdbm geoip geolocation gif gimp git glamor glut gmp gnuplot gpm gsl gstreamer gtk gzip hardened hscolour iconv icu idn imap imlib inotify introspection ipv6 jack java javascript jbig jpeg jpeg2k justify kerberos lame lash latex lcms ldap libass libcaca libffi libnotify libsamplerate libwww lzma lzo m17n-lib matroska memcached mhash migemo mime mmap mng modplug modules mp3 mp4 mpeg mplayer mtp mule multilib musepack nas ncurses netboot networkmanager nls nocd nptl nsplugin ogg open_perms openal openexr opengl openmp osc pam pax_kernel pcntl pcre pdf perl php pie plotutils png policykit portaudio posix pulseaudio python qt5 raw rdesktop readline recode ruby sasl sctp sdl seamonkey seccomp selinux session sharedmem shorten simplexml skey slang smp sndfile snmp soap sockets socks5 sound source sox speex spell ssl ssp subversion svg symlink syslog sysvipc szip taglib tcmalloc tcpd theora threads tidy tiff tokenizer truetype udev udisks unconfined unicode upnp upnp-av upower urandom usb vaapi vcd vdpau videos vim vim-syntax vnc vorbis wavpack wayland webkit webp wifi x264 xattr xcomposite xft xml xmlrpc xosd xpm xscreensaver xtpax xv xvid zeroconf zlib zsh-completion" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a 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" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en en-GB ja ja-jP zh zh-TW" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_EN en_GB ja ja_JP zh zh_TW" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
soleera commented 7 years ago

I've been able to successfully emerge hyper by adding these lines to the end of src_prepare() in the ebuild:

sed -i '/\s\+"deb"/ d' package.json                                                                                                                                                    
sed -i '/\s\+"rpm"/ d' package.json                                                                                                                                                    
sed -i '/\s\+"AppImage"/ d' package.json

This prevents npm from packaging the app into a .deb, .rpm, or .AppImage file, which is unnecessary for the ebuild to function and was the cause of my earlier issues (specifically, the .deb format).