Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 852962 - dev-util/gitlab-runner-15.0.0: fails to build for arm64
Summary: dev-util/gitlab-runner-15.0.0: fails to build for arm64
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-19 00:24 UTC by Sam James
Modified: 2022-11-08 18:08 UTC (History)
1 user (show)

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


Attachments
build.log (file_852962.txt,3.36 KB, text/plain)
2022-06-19 00:25 UTC, Sam James
Details
add-arm64.patch (add-arm64.patch,2.04 KB, patch)
2022-06-21 22:22 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-19 00:24:57 UTC
Know it's not keyworded there but upstream support it so wanted to try it out.

----
make runner-bin BUILD_PLATFORMS="-osarch=linux/aarch64"
make[1]: Entering directory '/var/tmp/portage/dev-util/gitlab-runner-15.0.0/work/gitlab-runner-v15.0.0'
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
# Building gitlab-runner in version 15.0.0 for -osarch=linux/aarch64
/usr/bin/gox -osarch=linux/aarch64 \
           -ldflags "-X gitlab.com/gitlab-org/gitlab-runner/common.NAME=gitlab-runner -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=15.0.0 -X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=c6bb62f6a -X gitlab.com/gitlab-org/gitlab-runner/common.BUILT=2022-06-19T00:23:17+00:00 -X gitlab.com/gitlab-org/gitlab-runner/common.BRANCH= -w" \
           -output="out/binaries/gitlab-runner-{{.OS}}-{{.Arch}}" \
           gitlab.com/gitlab-org/gitlab-runner
No valid platforms to build for. If you specified a value
for the 'os', 'arch', or 'osarch' flags, make sure you're
using a valid value.
make[1]: *** [Makefile.build.mk:3: runner-bin] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-util/gitlab-runner-15.0.0/work/gitlab-runner-v15.0.0'
make: *** [Makefile.build.mk:41: runner-bin-host] Error 2
 * ERROR: dev-util/gitlab-runner-15.0.0::gentoo failed (compile phase):
 *   emake failed

----
Portage 3.0.30 (python 3.9.12-final-0, default/linux/arm64/17.0/systemd, gcc-11.3.0, glibc-2.34-r13, 5.15.46-gentoo-dist aarch64)
=================================================================
System uname: Linux-5.15.46-gentoo-dist-aarch64-with-glibc2.34
KiB Mem:   262955296 total, 241036508 free
KiB Swap:    9767620 total,   9767620 free
Timestamp of repository gentoo: Sat, 18 Jun 2022 23:17:58 +0000
Head commit of repository gentoo: 0aa330597fa67ce4c82d33496a780c9a40ceb56c

sh dash 0.5.11.5
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           3.9.12::gentoo, 3.10.4::gentoo
dev-lang/rust-bin:         1.58.1::gentoo
dev-util/cmake:            3.22.4::gentoo
dev-util/meson:            0.61.4-r2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          250.6::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/llvm:            13.0.0::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r13::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: true
    sync-git-clone-extra-opts: -b master

ACCEPT_KEYWORDS="arm64"
ACCEPT_LICENSE="@FREE"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=native -pipe"
CHOST="aarch64-unknown-linux-gnu"
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/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mcpu=native -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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 -mcpu=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -mcpu=native -pipe"
GENTOO_MIRRORS="https://mirror.rackspace.com/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j80 -l80"
PKGDIR="/var/cache/binpkgs"
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"
SHELL="/bin/bash"
USE="acl arm64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl systemd udev unicode xattr zlib" ADA_TARGET="gnat_2020" 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_ARM="aes crc32 edsp sha1 sha2 thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" 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="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-19 00:25:47 UTC
Created attachment 786089 [details]
build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-19 00:31:30 UTC
Works if I add ARCH=arm64 to the emake call in src_compile.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-19 01:46:06 UTC
I think maybe we should add the go_arch etc functions to one of the go eclasses to make it easier to use in ebuilds.

I think if we use that same logic from the Go ebuilds to pass ARCH=... to emake here, we should be good.
Comment 4 William Hubbs gentoo-dev 2022-06-21 17:55:21 UTC
I need to see the name of the binary that gets built on arm64 to figure
out what is going on.

Please run the following commands (assuming the default locations) and
show me the output of the ls command.

$cd /var/db/repos/gentoo/dev-util/gitlab-runner
$ sudo ebuild gitlab-runner-15.1.0.ebuild clean compile
$ cd /var/tmp/portage/dev-util/gitlab-runner-15.1.0/work/gitlab-runner-v15.1.0
$ ls -1 out/binaries

Thanks,

William
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-21 19:42:00 UTC
No binary gets built because of how early it bails out.

/var/tmp/portage/dev-util/gitlab-runner-15.0.0-r1/work/gitlab-runner-v15.0.0 # find . | grep -i out/
Comment 6 William Hubbs gentoo-dev 2022-06-21 20:57:33 UTC
In that case, can you attach the output from the build?

Thanks,

William
Comment 7 William Hubbs gentoo-dev 2022-06-21 22:22:12 UTC
Created attachment 786611 [details, diff]
add-arm64.patch

This patch adds arm64 support to the makefiles.

Please test with this patch and report back.

Thanks,

William
Comment 8 Larry the Git Cow gentoo-dev 2022-06-21 23:14:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23c14ef8c96c49228be5605e24e464d4490cc116

commit 23c14ef8c96c49228be5605e24e464d4490cc116
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2022-06-21 23:11:37 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2022-06-21 23:14:18 +0000

    dev-util/gitlab-runner: add patch for arm64
    
    Bug: https://bugs.gentoo.org/852962
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 dev-util/gitlab-runner/files/build-for-arm64.patch | 48 ++++++++++++++++++++++
 .../gitlab-runner/gitlab-runner-14.10.1-r1.ebuild  |  5 +++
 .../gitlab-runner/gitlab-runner-15.0.0-r1.ebuild   |  5 +++
 dev-util/gitlab-runner/gitlab-runner-15.1.0.ebuild |  5 +++
 4 files changed, 63 insertions(+)
Comment 9 William Hubbs gentoo-dev 2022-11-08 18:08:45 UTC
Hey Sam,

did we get any movement on this, or did upstream fix it another way?

Thanks,

William