Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jul 2017 15:47:55 +0200
From:      Gergely Czuczy <gergely.czuczy@harmless.hu>
To:        ports@freebsd.org, arm@freebsd.org
Subject:   strip: elf_strptr failed: Invalid argument
Message-ID:  <11b6936c-711c-87b4-9ecc-41ffc465c131@harmless.hu>
In-Reply-To: <a504da3e-4b56-795c-c65b-9f97c88fedf4@harmless.hu>
References:  <a504da3e-4b56-795c-c65b-9f97c88fedf4@harmless.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello,

I'm trying to build packages on an rpi3, on a freshly build image (with
crochet), and when it's trying to build pkg from ports, I'm getting the
following error message:

libtool: link: cc -D_BSD_SOURCE -I../libpkg -I../libpkg -I../compat
-I../external/libucl/klib -I../external/uthash -I../external/expat/lib
-DGITHASH=\"\" -O2 -pipe -Wno-error -fno-strict-aliasing -Wall
-Wno-unused-function -D_BSD_SOURCE -DINET6=1 -Wl,--enable-new-dtags -o
.libs/pkg pkg-add.o pkg-alias.o pkg-annotate.o pkg-audit.o
pkg-autoremove.o pkg-backup.o pkg-check.o pkg-clean.o pkg-config.o
pkg-convert.o pkg-create.o pkg-delete.o pkg-event.o pkg-fetch.o
pkg-globals.o pkg-info.o pkg-install.o pkg-lock.o pkg-main.o
pkg-plugins.o pkg-query.o pkg-register.o pkg-repo.o pkg-rquery.o
pkg-search.o pkg-set.o pkg-shell.o pkg-shlib.o pkg-ssh.o pkg-stats.o
pkg-update.o pkg-updating.o pkg-upgrade.o pkg-utils.o pkg-version.o
pkg-which.o  ../libpkg/.libs/libpkg.so ../compat/.libs/libbsd_compat.a
-lutil -lssl -lcrypto -lm -lelf -ljail -larchive -lz -lbz2 -llzma
-Wl,-rpath -Wl,/usr/local/lib
  /bin/mkdir -p '/usr/ports/ports-mgmt/pkg/work/stage/usr/local/etc'
  install  -m 0644 pkg.conf.sample
'/usr/ports/ports-mgmt/pkg/work/stage/usr/local/etc'
  /bin/mkdir -p '/usr/ports/ports-mgmt/pkg/work/stage/usr/local/sbin'
  STRIPPROG='strip' /bin/sh ../libtool   --mode=install /bin/sh
/usr/ports/ports-mgmt/pkg/work/pkg-1.10.1/install-sh -c -s pkg-static
pkg '/usr/ports/ports-mgmt/pkg/work/stage/usr/local/sbin'
libtool: install: /bin/sh
/usr/ports/ports-mgmt/pkg/work/pkg-1.10.1/install-sh -c -s pkg-static
/usr/ports/ports-mgmt/pkg/work/stage/usr/local/sbin/pkg-static
strip: elf_strptr failed: Invalid argument
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/ports-mgmt/pkg/work/pkg-1.10.1/src
*** Error code 1

Strange part, it says it's stripped already:

root@build:/usr/ports/ports-mgmt/pkg # file -s
./work/pkg-1.10.1/src/pkg-static
./work/pkg-1.10.1/src/pkg-static: ELF 64-bit LSB executable, ARM
aarch64, version 1 (FreeBSD), statically linked, stripped

However, trying to strip(1) manually reproduces the error:

# strip ~/pkg-static.1
strip: elf_strptr failed: Invalid argument

ktrace didn't reveal anything about the failing elf_strptr(3) call.

The system is:

FreeBSD build.aegir 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r320657: Tue
Jul  4 22:28:33 CEST 2017
aegir@marvin.harmless.hu:/tank/rpi3/crochet/work/obj/arm64.aarch64/tank/rpi3/src/sys/AEGIR
arm64

Could someone please help me with this? I don't really know how to solve
this, or where to start looking. Usually building pkg works out of box.

Best regards,
Gergely







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11b6936c-711c-87b4-9ecc-41ffc465c131>