Summary: | >=dev-lang/go-1.7 fails to build on OS X 10.1{1,2}.x | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Stuart Shelton <srcshelton> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | OS X | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Log #1 - Build failure for >=dev-lang/go-1.8
Log #2 - Build output for dev-lang/go-1.7 |
Description
Stuart Shelton
2016-09-20 09:12:42 UTC
(Initial comment referred to dev-lang/go-1.7.1) The 'go' ebuilds pull in an (architecture/OS-specific) unversioned 'bootstrap' package. I'm not sure whether this has been changed, if there's a problem with LLVM, or if this is a breakage due to macOS 10.12, but I cannot upgrade go or even rebuild the version currently installed. It strikes me that the bootstrap tarballs need to be versioned along with the ebuild built against them... Attempting to build dev-lang/go-1.7.3: Using the system/Xcode compilers, the result is: >>> Compiling source in /Volumes/Scratch/tmp/portage/dev-lang/go-1.7.3/work/go ... * GOROOT_BOOTSTRAP is /Volumes/Scratch/tmp/portage/dev-lang/go-1.7.3/work/go-darwin-amd64-bootstrap ##### Building Go bootstrap tool. cmd/dist ##### Building Go toolchain using /Volumes/Scratch/tmp/portage/dev-lang/go-1.7.3/work/go-darwin-amd64-bootstrap. bootstrap/internal/sys bootstrap/internal/bio bootstrap/asm/internal/flags bootstrap/internal/gcprog bootstrap/compile/internal/big bootstrap/internal/obj # bootstrap/internal/obj runtime: newstack sp=0xc82004df40 stack=[0xc385421e88d8, 0xc82004dfe0] morebuf={pc:0x190b1 sp:0xc82004df50 lr:0x0} sched={pc:0x1c750 sp:0xc82004df48 lr:0x0 ctxt:0x0} runtime: gp=0xc8204bc480, gp->status=0x4 runtime: split stack overflow: 0xc82004df40 < 0xc385421e88d8 fatal error: runtime: split stack overflow runtime stack: runtime.throw(0x44bfe0, 0x1d) /tmp/go-darwin-amd64-bootstrap/src/runtime/panic.go:527 +0x90 runtime.newstack() /tmp/go-darwin-amd64-bootstrap/src/runtime/stack1.go:752 +0x89f runtime.morestack() /tmp/go-darwin-amd64-bootstrap/src/runtime/asm_amd64.s:330 +0x7f goroutine 20 [stack growth]: runtime.gcDrain(0xc820042720, 0x7d0) /tmp/go-darwin-amd64-bootstrap/src/runtime/mgcmark.go:718 fp=0xc82004df50 sp=0xc82004df48 runtime.gcBgMarkWorker(0xc820041500) /tmp/go-darwin-amd64-bootstrap/src/runtime/mgc.go:1320 +0x281 fp=0xc82004dfb8 sp=0xc82004df50 runtime.goexit() /tmp/go-darwin-amd64-bootstrap/src/runtime/asm_amd64.s:1721 +0x1 fp=0xc82004dfc0 sp=0xc82004dfb8 created by runtime.gcBgMarkStartWorkers /tmp/go-darwin-amd64-bootstrap/src/runtime/mgc.go:1239 +0x93 goroutine 1 [runnable]: cmd/compile/internal/gc.mergetemp(0xc8211e39e0) /tmp/go-darwin-amd64-bootstrap/src/cmd/compile/internal/gc/popt.go:587 +0x185 cmd/compile/internal/gc.regopt(0xc8211e39e0) /tmp/go-darwin-amd64-bootstrap/src/cmd/compile/internal/gc/reg.go:1037 +0x4f cmd/compile/internal/gc.compile(0xc8207fcfc0) /tmp/go-darwin-amd64-bootstrap/src/cmd/compile/internal/gc/pgen.go:508 +0xe82 cmd/compile/internal/gc.funccompile(0xc8207fcfc0) /tmp/go-darwin-amd64-bootstrap/src/cmd/compile/internal/gc/dcl.go:1484 +0x1c9 cmd/compile/internal/gc.Main() /tmp/go-darwin-amd64-bootstrap/src/cmd/compile/internal/gc/lex.go:473 +0x1f08 cmd/compile/internal/amd64.Main() /tmp/go-darwin-amd64-bootstrap/src/cmd/compile/internal/amd64/galign.go:127 +0x58d main.main() /tmp/go-darwin-amd64-bootstrap/src/cmd/compile/main.go:26 +0x189 ... at which point the process hangs. If I use Gentoo Prefix LLVM, the output is: >>> Compiling source in /Volumes/Scratch/tmp/portage/dev-lang/go-1.7.3/work/go ... * GOROOT_BOOTSTRAP is /Volumes/Scratch/tmp/portage/dev-lang/go-1.7.3/work/go-darwin-amd64-bootstrap ##### Building Go bootstrap tool. cmd/dist ... at which point the process hangs, spinning on CPU. dtrussing the process shows only two operations being performed by the './cmd/dist/dist bootstrap -a -v' process: gettimeofday(0xC820063EC0, 0x0, 0x0) = 0 0 select(0x0, 0x0, 0x0, 0x0, 0xC820063EF0) = 0 0 The version of the bootstrap distribution used in go-1.7.4.ebuild for darwin is 1.5.3. There is a VERSION file in it. It seems it's a little bit outdated. Update it to a newer binary distribution for MacOS should work. Anyway, I tried to bootstrap go-1.7.4 using go-1.7.4 binary. It worked. Maybe there should be bindist USE flag for dev-lang/go since google has already pre-compiled go for various platforms. I have been advised on irc that this issue is resolved in go 1.8. Please re-open if it isn't. Thanks much. Created attachment 464722 [details]
Log #1 - Build failure for >=dev-lang/go-1.8
Created attachment 464724 [details]
Log #2 - Build output for dev-lang/go-1.7
For me, go-1.8 & go-9999 are both failing with: [See log #1] ... which may be due to the clang '--gdwarf2' error, or this may be circumstantial. Attempting to build go-1.7, the process hangs with: [See log #2] ... which eventually eats up all of the host's memory if not interrupted. What OS release/compiler combination was used by people for whom this worked? Can you please post 'emerge --info' output? And also with which flags clang and llvm was built on your system? ('emerge -pv --nodeps clang llvm' output). I also have OSX Prefix but I can't reproduce your problem. 1.8 compiles/installs for me. macOS Sierra % clang --version clang version 3.9.1 (tags/RELEASE_391/final) Target: x86_64-apple-darwin16.4.0 Thread model: posix InstalledDir: /Library/Gentoo-Sierra/usr/bin % go version go version go1.8 darwin/amd64 I remember seeing the spontaneous die on my laptop though, but there I use a Capitan prefix on top of Sierra, which I suspect as a possible cause. (In reply to Vladimir Smirnov from comment #7) > Can you please post 'emerge --info' output? And also with which flags clang > and llvm was built on your system? ('emerge -pv --nodeps clang llvm' > output). I also have OSX Prefix but I can't reproduce your problem. It's notable that when building with the platform default compiler ('Apple LLVM version 8.0.0 (clang-800.0.42.1)') rather than the Prefix one ('clang version 3.9.1 (tags/RELEASE_391/final)'), I get the same failure in the same place. If there is anything weird about the *FLAGS, compilers, or other development packages, it's not affected the 312 other packages currently installed! $ emerge -pv --nodeps clang llvm These are the packages that would be merged, in order: [ebuild R ] sys-devel/clang-3.9.1-r100:0/3.9.1::gentoo_prefix USE="python static-analyzer -debug -multitarget" LLVM_TARGETS="AMDGPU (X86) -AArch64 -ARM -BPF -Hexagon -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -XCore" 0 KiB [ebuild R ] sys-devel/llvm-3.9.1-r1:0/3.9.1:: gentoo_prefix USE="(clang) default-libcxx libedit libffi ncurses python static-analyzer xml -debug -default-compiler-rt -doc -gold (-lldb) -multitarget -ocaml -sanitize {-test}" LLVM_TARGETS="AMDGPU (X86) -AArch64 -ARM -BPF -Hexagon -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -XCore" PYTHON_TARGETS="python2_7" 0 KiB Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB $ emerge --info Portage 2.3.2-prefix (python 2.7.12-final-0, prefix/darwin/macos/10.12/x64, gcc-4.2.1, unavailable, 16.4.0 x86_64) ================================================================= System uname: Darwin-16.4.0-x86_64-i386-64bit Timestamp of repository gentoo_prefix: Tue, 21 Feb 2017 19:26:59 +0000 sh bash 4.3_p48-r1 app-shells/bash: 4.3_p48-r1::srcshelton dev-lang/perl: 5.24.1::srcshelton dev-lang/python: 2.7.12::srcshelton dev-util/cmake: 3.7.2::gentoo_prefix dev-util/pkgconfig: 0.29.1::gentoo_prefix sys-devel/autoconf: 2.69::gentoo_prefix sys-devel/automake: 1.14.1::gentoo_prefix, 1.15::gentoo_prefix sys-devel/gcc-config: 1.8-r1::gentoo_prefix sys-devel/libtool: 2.4.6-r1::gentoo_prefix sys-devel/make: 4.2.1::gentoo_prefix Repositories: gentoo_prefix location: /opt/gentoo/var/db/repo/gentoo sync-type: rsync sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix priority: -1000 aliases: gentoo srcshelton location: /opt/gentoo/var/db/repo/srcshelton sync-type: git sync-uri: https://github.com/srcshelton/gentoo-ebuilds.git masters: gentoo_prefix ACCEPT_KEYWORDS="amd64 amd64-linux x64-macos ~x64-macos" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-apple-darwin16" CC="/opt/gentoo/usr/bin/clang" CFLAGS="-arch x86_64 -march=core-avx-i -fcolor-diagnostics -O3 -pipe -fno-builtin -Wno-implicit-function-declaration -mmacosx-version-min=10.12" CHOST="x86_64-apple-darwin16" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/ssl/certs /etc/terminfo /opt/gentoo/etc/ssl/certs" CXX="/opt/gentoo/usr/bin/clang++" CXXFLAGS=" -arch x86_64 -march=core-avx-i -fcolor-diagnostics -O3 -pipe -fno-builtin -Wno-implicit-function-declaration -mmacosx-version-min=10.12" DISTDIR="/opt/gentoo/var/cache/portage/dist" FCFLAGS="" FEATURES="assume-digests binpkg-logs buildpkg candy case-insensitive-fs clean-logs collision-protect compress-build-logs compressdebug config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles force-prefix merge-sync news nostrip parallel-fetch parallel-install preserve-libs protect-owned sfperms split-elog split-log splitdebug strict stricter unknown-features-warn unmerge-backup unmerge-logs unmerge-orphans unprivileged userfetch userpriv usersandbox usersync" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LC_ALL="C" LDFLAGS="-Wl,-dead_strip_dylibs -L/opt/gentoo/usr/lib -L/usr/lib" MAKEOPTS="-j7" PKGDIR="/opt/gentoo/var/cache/portage/pkg/clang" PORTAGE_CONFIGROOT="/opt/gentoo/" 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="/Volumes/Scratch/tmp" USE="aqua berkdb bzip2 clang coreaudio cracklib crypt cvs cxx expat gdbm git gmp http2 iconv icu idn ipv6 jemalloc libcxx libedit lto lzma lzo mercurial modules mpfr ncurses nls objc objc++ openmp pcre perl pgo prefix prefix-guest python python2 readline sqlite ssl subversion threads unicode vim-syntax x64-macos xml zlib" ABI_X86="64" CPU_FLAGS_X86="mmx sse sse2 ssse3" ELIBC="Darwin" KERNEL="Darwin" LINGUAS="en en_GB" LLVM_TARGETS="X86 AMDGPU" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="radeon" USE_PYTHON="2.7" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS I think you could try to drop the -mmacosx-version-min=10.12, or with default cflags. (In reply to yuex from comment #2) > The version of the bootstrap distribution used in go-1.7.4.ebuild for darwin > is 1.5.3. There is a VERSION file in it. It seems it's a little bit > outdated. Update it to a newer binary distribution for MacOS should work. > > Anyway, I tried to bootstrap go-1.7.4 using go-1.7.4 binary. It worked. > > Maybe there should be bindist USE flag for dev-lang/go since google has > already pre-compiled go for various platforms. I ran into the same issue when installing go-1.7.5 on Sierra. I was able to bootstrap 1.7.5 by using the 1.7.5 binary. Looking back at my old prefix on El Capitan I installed dev-lang/go-1.5.3 by bootstrapping with 1.4.3. Note that the bootstrap in that case was a separate package named dev-lang/go-bootstrap. It seems that they've removed the separate bootstrapping package for the 1.7 series. John Tried again with only CFLAGS='-pipe' CXXFLAGS='-pipe' - and got the same failure as attached above (log #1). (In reply to Fabian Groffen from comment #10) > I think you could try to drop the -mmacosx-version-min=10.12, or with > default cflags. Ping, any updates on this? how are things with go-1.8.1? I could install 1.8.1, would like to know if it still fails for Stuart 'fraid so :( > ##### Building packages and commands for darwin/amd64. > > ... > > # runtime/cgo > clang-3.9: error: unsupported option '--gdwarf2' > cmd/compile/internal/gc > cmd/compile/internal/arm > cmd/compile/internal/amd64 > cmd/compile/internal/mips > cmd/compile/internal/arm64 > cmd/compile/internal/mips64 > cmd/compile/internal/ppc64 > cmd/compile/internal/s390x > cmd/compile/internal/x86 > cmd/compile > * ERROR: dev-lang/go-1.8.1::gentoo_prefix failed (compile phase): > * build failed ... as before. If this is working for everyone else, I wonder what it's tripping over on this system... ? Indeed, but now it seems to complain about --gdwarf option or something? I would only expect that on ELF-targets, not Darwin (Mach-O). I just checked and it doesn't do this for me, so perhaps it misdetects your system for some reason. Hmm - that's a long-running issue rather than a new one, it's pretty much always done that for me. A while ago I did have a bit of a dig to find out where it was coming from, but wasn't able to resolve anything. If I'm the only one seeing this, though, then that's new information - I'll have another look to see what causes it to be included. (In reply to Fabian Groffen from comment #16) > Indeed, but now it seems to complain about --gdwarf option or something? I > would only expect that on ELF-targets, not Darwin (Mach-O). > > I just checked and it doesn't do this for me, so perhaps it misdetects your > system for some reason. go 1.8.1 merges for me. Portage 2.3.5-prefix (python 3.5.2-final-0, prefix/darwin/macos/10.12/x64, clang-3.9.1, unavailable, 16.5.0 x86_64) ================================================================= System uname: Darwin-16.5.0-x86_64-i386-64bit Timestamp of repository gentoo_prefix: Fri, 12 May 2017 17:26:51 +0000 sh bash 4.3_p48 app-shells/bash: 4.3_p48::gentoo_prefix dev-java/java-config: 2.2.0-r3::gentoo_prefix dev-lang/perl: 5.24.1-r1::gentoo_prefix dev-lang/python: 2.7.12::gentoo_prefix, 3.5.2::gentoo_prefix dev-util/cmake: 3.8.1::gentoo_prefix dev-util/pkgconfig: 0.29.1::gentoo_prefix sys-devel/autoconf: 2.69-r3::gentoo_prefix sys-devel/automake: 1.14.1-r1::gentoo_prefix, 1.15-r2::gentoo_prefix sys-devel/libtool: 2.4.6-r4::gentoo_prefix sys-devel/make: 4.2.1-r1::gentoo_prefix Repositories: gentoo_prefix location: /Users/yegortimoshenko/Documents/Gentoo/usr/portage sync-type: rsync sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix priority: -1000 yegortimoshenko location: /Users/yegortimoshenko/Documents/Projects/overlay masters: gentoo_prefix priority: 0 ACCEPT_KEYWORDS="~x64-macos" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-apple-darwin16" CC="x86_64-apple-darwin16-clang" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-apple-darwin16" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXX="x86_64-apple-darwin16-clang++" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/Users/yegortimoshenko/Documents/Gentoo/usr/portage/distfiles" FCFLAGS="" FEATURES="assume-digests binpkg-logs case-insensitive-fs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-dead_strip_dylibs" MAKEOPTS="-j3" PKGDIR="/Users/yegortimoshenko/Documents/Gentoo/usr/portage/packages" PORTAGE_CONFIGROOT="/Users/yegortimoshenko/Documents/Gentoo/" 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="/Users/yegortimoshenko/Documents/Gentoo/var/tmp" USE="aqua coreaudio cracklib cxx ipv6 modules ncurses objc objc++ prefix prefix-guest readline ssl unicode x64-macos zlib" ABI_X86="64" 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="mmx mmxext sse sse2" ELIBC="Darwin" 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" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" 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: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON Can we get an update on this bug? I think the version of MacOS listed is now pretty old, and I know the versions of go listed have been out of support for some time. FWIW, I've got go-1.13.1 installed on 10.13.6. Doesn't mean much for OP though, as back then we already confirmed that what worked for me didn't work for him. I think we ran out of ideas for how to fix the issue. Feel free to obsolete this bug then if you would like to. |