From owner-freebsd-arm@freebsd.org Sat Oct 15 06:55:25 2016 Return-Path: Delivered-To: freebsd-arm@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 28DC1C11CD3 for ; Sat, 15 Oct 2016 06:55:25 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-38.reflexion.net [208.70.210.38]) (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 DD3C137D for ; Sat, 15 Oct 2016 06:55:24 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 20551 invoked from network); 15 Oct 2016 06:48:37 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 15 Oct 2016 06:48:37 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.10.0) with SMTP; Sat, 15 Oct 2016 02:48:49 -0400 (EDT) Received: (qmail 9960 invoked from network); 15 Oct 2016 06:48:49 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 15 Oct 2016 06:48:49 -0000 Received: from [192.168.0.104] (ip70-189-131-151.lv.lv.cox.net [70.189.131.151]) by iron2.pdx.net (Postfix) with ESMTPSA id 56B37EC8FFD; Fri, 14 Oct 2016 23:48:41 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: libx264 fails to build on a raspberry pi2 From: Mark Millard In-Reply-To: <20161014165021.GN99217@cicely7.cicely.de> Date: Fri, 14 Oct 2016 23:48:40 -0700 Cc: freebsd-arm , jbeich@freebsd.org, ticso@cicely.de Content-Transfer-Encoding: quoted-printable Message-Id: References: <20161014165021.GN99217@cicely7.cicely.de> To: Bernd Walter X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Oct 2016 06:55:25 -0000 On 2016-Oct-14, at 9:50 AM, Bernd Walter = wrote: > This seems to be a new problem, as I've installed the port before > on another Pi2 System (11-RC1): > libx264-0.144.2533_1 H.264/MPEG-4 AVC Video Encoding = (Library) >=20 > System is the official FreeBSD 11-RELEASE image for Pi2. > FreeBSD rpi2 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu = Sep 29 13:01:42 UTC 2016 = root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI2 arm >=20 > [61]cicely1# svn info /usr/ports/multimedia/libx264=20 > Path: multimedia/libx264 > Working Copy Root Path: /usr/ports > URL: file:///data/freebsd-svn/ports/head/multimedia/libx264 > Relative URL: ^/head/multimedia/libx264 > Repository Root: file:///data/freebsd-svn/ports > Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5 > Revision: 423971 > Node Kind: directory > Schedule: normal > Last Changed Author: jbeich > Last Changed Rev: 422675 > Last Changed Date: 2016-09-23 15:15:06 +0200 (Fri, 23 Sep 2016) >=20 > ... > cc -Wshadow -O3 -ffast-math -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -Wall -I. -I. -isystem = /usr/local/include -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -std=3Dgnu99 -D_GNU_SOURCE = -fPIC -fomit-frame-pointer -fno-tree-vectorize -isystem = /usr/local/include -c -o encoder/encoder.o encoder/encoder.c Above (and later below) -mcpu=3Darm1136jf-s is odd for an rpi2b. Is = "36jf" right for any raspberry pi version? "76jzf" I'm aware of for = older rpi's (if I remember right). -mcpu=3Dcortex-a7 would match an rpi2b as I understand. For rpi2b I by default use: # more /etc/make.conf DEFAULT_VERSIONS+=3Dperl5=3D5.22 WRKDIRPREFIX=3D/usr/obj/portswork WITH_DEBUG=3D WITH_DEBUG_FILES=3D MALLOC_PRODUCTION=3D CFLAGS+=3D -mcpu=3Dcortex-a7 CXXFLAGS+=3D -mcpu=3Dcortex-a7 CPPFLAGS+=3D -mcpu=3Dcortex-a7 (and similarly for buildworld and buildkernel as well, not just ports). But figuring out why -mcpu=3Darm1136jf-s is in use for your rpi2b = targeted build would seem to be a direction to go for what you were = building. > cc -Wshadow -O3 -ffast-math -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -Wall -I. -I. -isystem = /usr/local/include -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -std=3Dgnu99 -D_GNU_SOURCE = -fPIC -fomit-frame-pointer -fno-tree-vectorize -isystem = /usr/local/include -c -o encoder/lookahead.o encoder/lookahead.c > cc -Wshadow -O3 -ffast-math -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -Wall -I. -I. -isystem = /usr/local/include -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -std=3Dgnu99 -D_GNU_SOURCE = -fPIC -fomit-frame-pointer -fno-tree-vectorize -isystem = /usr/local/include -c -o common/threadpool.o common/threadpool.c > cc -Wshadow -O3 -ffast-math -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -Wall -I. -I. -isystem = /usr/local/include -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -std=3Dgnu99 -D_GNU_SOURCE = -fPIC -fomit-frame-pointer -fno-tree-vectorize -isystem = /usr/local/include -c -o common/arm/mc-c.o common/arm/mc-c.c > cc -Wshadow -O3 -ffast-math -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -Wall -I. -I. -isystem = /usr/local/include -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -std=3Dgnu99 -D_GNU_SOURCE = -fPIC -fomit-frame-pointer -fno-tree-vectorize -isystem = /usr/local/include -c -o common/arm/predict-c.o common/arm/predict-c.c > cc -Wshadow -O3 -ffast-math -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -Wall -I. -I. -isystem = /usr/local/include -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -std=3Dgnu99 -D_GNU_SOURCE = -fPIC -fomit-frame-pointer -fno-tree-vectorize -isystem = /usr/local/include -c -o common/opencl.o common/opencl.c > cc -Wshadow -O3 -ffast-math -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -Wall -I. -I. -isystem = /usr/local/include -O -pipe -isystem /usr/local/include = -fno-strict-aliasing -mcpu=3Darm1136jf-s -std=3Dgnu99 -D_GNU_SOURCE = -fPIC -fomit-frame-pointer -fno-tree-vectorize -isystem = /usr/local/include -c -o encoder/slicetype-cl.o encoder/slicetype-cl.c > cc -I. -I. -c -DSTACK_ALIGNMENT=3D4 -DPIC -DHIGH_BIT_DEPTH=3D0 = -DBIT_DEPTH=3D8 -o common/arm/cpu-a.o common/arm/cpu-a.S > cc -I. -I. -c -DSTACK_ALIGNMENT=3D4 -DPIC -DHIGH_BIT_DEPTH=3D0 = -DBIT_DEPTH=3D8 -o common/arm/pixel-a.o common/arm/pixel-a.S > cc -I. -I. -c -DSTACK_ALIGNMENT=3D4 -DPIC -DHIGH_BIT_DEPTH=3D0 = -DBIT_DEPTH=3D8 -o common/arm/mc-a.o common/arm/mc-a.S > cc -I. -I. -c -DSTACK_ALIGNMENT=3D4 -DPIC -DHIGH_BIT_DEPTH=3D0 = -DBIT_DEPTH=3D8 -o common/arm/dct-a.o common/arm/dct-a.S > cc -I. -I. -c -DSTACK_ALIGNMENT=3D4 -DPIC -DHIGH_BIT_DEPTH=3D0 = -DBIT_DEPTH=3D8 -o common/arm/quant-a.o common/arm/quant-a.S > :29:5: error: instruction requires: armv6t2 > rbit r1, r1 > ^ > common/arm/quant-a.S:362:1: note: while in macro instantiation > decimate_score_1x 15 > ^ > :29:5: error: instruction requires: armv6t2 > rbit r1, r1 > ^ > /tmp/quant-a-6e019c.s:515:1: note: while in macro instantiation > decimate_score_1x 16 > ^ Whatever caused the -mcpu=3Darm1136jf-s usage earlier above might also = cause misclassification here as well, so it is not even targeting an = armv6t2 (armv6 with Thumb-2 if I understand right), much less a armv-7a = (march)? "ARM1136 does not support Neon or Thumb-2 instructions from the = Cortex-A series": see = https://www.arm.com/products/processors/classic/arm11/arm1136.php ). > cc -I. -I. -c -DSTACK_ALIGNMENT=3D4 -DPIC -DHIGH_BIT_DEPTH=3D0 = -DBIT_DEPTH=3D8 -o common/arm/deblock-a.o common/arm/deblock-a.S > gmake[4]: *** [Makefile:217: common/arm/quant-a.o] Error 1 > gmake[4]: *** Waiting for unfinished jobs.... > gmake[4]: Leaving directory = '/usr/obj/usr/ports/multimedia/libx264/work/x264-snapshot-20160921-2245-st= able' > =3D=3D=3D> Compilation failed unexpectedly. > Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the = failure to > the maintainer. > *** Error code 1 >=20 > Stop. > make[3]: stopped in /usr/ports/multimedia/libx264 > *** Error code 1 >=20 > Stop. > make[2]: stopped in /usr/ports/multimedia/libx264 > *** Error code 1 >=20 > Stop. > make[1]: stopped in /usr/ports/multimedia/ffmpeg > *** Error code 1 >=20 > Stop. > make: stopped in /usr/ports/multimedia/ffmpeg > 377.491u 24.840s 2:59.62 223.9% 47346+407k 1+72io 17pf+0w > Exit 1 >=20 > --=20 > B.Walter http://www.bwct.de > Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. =3D=3D=3D Mark Millard markmi at dsl-only.net