From owner-freebsd-mips@freebsd.org Tue Jul 11 13:05:24 2017 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96938D9EECB; Tue, 11 Jul 2017 13:05:24 +0000 (UTC) (envelope-from gergely.czuczy@harmless.hu) Received: from marvin.harmless.hu (marvin.harmless.hu [195.56.55.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57263730BF; Tue, 11 Jul 2017 13:05:20 +0000 (UTC) (envelope-from gergely.czuczy@harmless.hu) Received: from business-89-133-214-251.business.broadband.hu ([89.133.214.251] helo=[10.160.11.182]) by marvin.harmless.hu with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1dUumH-0000Tj-Px; Tue, 11 Jul 2017 13:00:33 +0000 To: freebsd-current@freebsd.org, freebsd-mips@freebsd.org Cc: pkg@FreeBSD.org From: Gergely Czuczy Subject: strip: elf_strptr failed: Invalid argument Message-ID: Date: Tue, 11 Jul 2017 15:00:33 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2017 13:05:24 -0000 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