Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 606970

Summary: dev-lang/go-1.7.4 fails to compile on amd64-musl-hardened (./make.bash: line 132: /var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap/bin/go: No such file or directory)
Product: Gentoo Linux Reporter: Franklin Diaz <dfrank>
Component: HardenedAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: gentoobugs
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Franklin Diaz 2017-01-24 01:24:08 UTC
musl portage # emerge --info go
Portage 2.3.1 (python 2.7.12-final-0, hardened/linux/musl/amd64, gcc-4.9.4, musl-1.1.15-r2, 4.8.5 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.8.5-x86_64-QEMU_Virtual_CPU_version_2.5+-with-gentoo-2.2
KiB Mem:     1536956 total,    657588 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 17 Jan 2017 17:30:01 +0000
sh bash 4.3_p48
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::musl
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4-r99::musl
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::musl (virtual/os-headers)
sys-libs/musl:            1.1.15-r2::gentoo
Repositories:

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

musl
    location: /var/lib/layman/musl
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-gentoo-linux-musl"
CFLAGS="-O2 -pipe -g"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -g"
DISTDIR="/usr/portage/distfiles"
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 sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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="amd64 cli crypt cxx dri iconv modules ncurses nptl openmp pax_kernel pcre readline seccomp session sqlite ssl tcpd unicode zlib" ABI_X86="64" CPU_FLAGS_X86="aes mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2 popcnt" ELIBC="musl" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" L10N="en" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


musl portage # more /var/tmp/portage/dev-lang/go-1.7.4/temp/build.log 
 * Package:    dev-lang/go-1.7.4
 * Repository: gentoo
 * Maintainer: williamh@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_musl kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 * GOROOT_BOOTSTRAP is /var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap
##### Building Go bootstrap tool.
cmd/dist
./make.bash: line 132: /var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap/bin/go: No such file or directory
 * ERROR: dev-lang/go-1.7.4::gentoo failed (compile phase):
 *   build failed
 * 
 * Call stack:
 *     ebuild.sh, line 115:  Called src_compile
 *   environment, line 1000:  Called die
 * The specific snippet of code:
 *       ./make.bash || die "build failed"
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/go-1.7.4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/go-1.7.4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-lang/go-1.7.4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/go-1.7.4/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/go-1.7.4/work/go/src'
 * S: '/var/tmp/portage/dev-lang/go-1.7.4/work/go'


musl portage # file /var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap/bin/go
/var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap/bin/go: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped
musl portage # ldd /var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap/bin/go
	/lib64/ld-linux-x86-64.so.2 (0x55a0d4864000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x55a0d4864000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x55a0d4864000)
Error relocating /var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap/bin/go: __vfprintf_chk: symbol not found
Error relocating /var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap/bin/go: __fprintf_chk: symbol not found
musl portage # nm /var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap/bin/go | egrep __.*fprintf_chk
                 U __fprintf_chk
                 U __vfprintf_chk
musl portage # nm /var/tmp/portage/dev-lang/go-1.7.4/work/go-linux-amd64-bootstrap/bin/go | egrep '.* U .*'
                 U __errno_location
                 U __fprintf_chk
                 U __stack_chk_fail
                 U __vfprintf_chk
                 U abort
                 U fputc
                 U free
                 U freeaddrinfo
                 U fwrite
                 U gai_strerror
                 U getaddrinfo
                 U getnameinfo
                 U malloc
                 U pthread_attr_destroy
                 U pthread_attr_getstacksize
                 U pthread_attr_init
                 U pthread_cond_broadcast
                 U pthread_cond_wait
                 U pthread_create
                 U pthread_mutex_lock
                 U pthread_mutex_unlock
                 U pthread_sigmask
                 U setenv
                 U sigfillset
                 U stderr
                 U strerror
                 U unsetenv
Comment 1 Aric Belsito 2017-03-03 21:41:24 UTC
Duplicate of https://bugs.gentoo.org/576920
Comment 2 Erik Dannenberg 2017-03-25 20:15:38 UTC
Typo in above comment, it's https://bugs.gentoo.org/show_bug.cgi?id=576290
Comment 3 Jory A. Pratt gentoo-dev 2020-01-22 13:57:51 UTC
commit 8308e81daac3cdfd1843be987072bba2ecc760c3
Author: William Hubbs <williamh@gentoo.org>
Date:   Tue Jan 21 23:55:09 2020 -0600

    dev-lang/go-1.13.6: new bootstrap binaries to allow build on musl
    
    closes: https://bugs.gentoo.org/576290
    closes: https://bugs.gentoo.org/606970
    
    Signed-off-by: William Hubbs <williamh@gentoo.org>