From owner-freebsd-arm@freebsd.org Sat Oct 15 23:02:07 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 71262C13D45 for ; Sat, 15 Oct 2016 23:02:07 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [195.149.99.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "raven.bwct.de", Issuer "raven.bwct.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 194A4224; Sat, 15 Oct 2016 23:02:06 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.15.2/8.15.2) with ESMTPS id u9FN1s2k037582 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 15 Oct 2016 23:01:55 GMT (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id u9FN1oXC098718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 16 Oct 2016 01:01:50 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.15.2/8.15.2) with ESMTP id u9FN1nBY038284; Sun, 16 Oct 2016 01:01:49 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.15.2/8.15.2/Submit) id u9FN1m51038283; Sun, 16 Oct 2016 01:01:48 +0200 (CEST) (envelope-from ticso) Date: Sun, 16 Oct 2016 01:01:48 +0200 From: Bernd Walter To: Mark Millard Cc: Bernd Walter , freebsd-arm , jbeich@freebsd.org, ticso@cicely.de Subject: Re: libx264 fails to build on a raspberry pi2 Message-ID: <20161015230148.GR99217@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <20161014165021.GN99217@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 10.2-RELEASE amd64 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, RP_MATCHES_RCVD=-1.507 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de 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 23:02:07 -0000 On Fri, Oct 14, 2016 at 11:48:40PM -0700, Mark Millard wrote: > 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) > > > > 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 > > > > [61]cicely1# svn info /usr/ports/multimedia/libx264 > > 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) > > > > ... > > cc -Wshadow -O3 -ffast-math -O -pipe -isystem /usr/local/include -fno-strict-aliasing -mcpu=arm1136jf-s -Wall -I. -I. -isystem /usr/local/include -O -pipe -isystem /usr/local/include -fno-strict-aliasing -mcpu=arm1136jf-s -std=gnu99 -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=arm1136jf-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=cortex-a7 would match an rpi2b as I understand. > > For rpi2b I by default use: > > # more /etc/make.conf > DEFAULT_VERSIONS+=perl5=5.22 > WRKDIRPREFIX=/usr/obj/portswork > WITH_DEBUG= > WITH_DEBUG_FILES= > MALLOC_PRODUCTION= > CFLAGS+= -mcpu=cortex-a7 > CXXFLAGS+= -mcpu=cortex-a7 > CPPFLAGS+= -mcpu=cortex-a7 > > (and similarly for buildworld and buildkernel as well, not just ports). > > > But figuring out why -mcpu=arm1136jf-s is in use for your rpi2b targeted build would seem to be a direction to go for what you were building. I havn't touched make.conf beside adding WRKDIRPREFIX. After adding all *FLAGS: cc -Wshadow -O3 -ffast-math -O -pipe -mcpu=cortex-a7 -isystem /usr/local/include -fno-strict-aliasing -mcpu=arm1136jf-s -Wall -I. -I. -mcpu=cortex-a7 -isystem /usr/local/include -O -pipe -mcpu=cortex-a7 -isystem /usr/local/include -fno-strict-aliasing -mcpu=arm1136jf-s -std=gnu99 -D_GNU_SOURCE -fPIC -fomit-frame-pointer -fno-tree-vectorize -mcpu=cortex-a7 -isystem /usr/local/include -c -o common/opencl.o common/opencl.c cc -Wshadow -O3 -ffast-math -O -pipe -mcpu=cortex-a7 -isystem /usr/local/include -fno-strict-aliasing -mcpu=arm1136jf-s -Wall -I. -I. -mcpu=cortex-a7 -isystem /usr/local/include -O -pipe -mcpu=cortex-a7 -isystem /usr/local/include -fno-strict-aliasing -mcpu=arm1136jf-s -std=gnu99 -D_GNU_SOURCE -fPIC -fomit-frame-pointer -fno-tree-vectorize -mcpu=cortex-a7 -isystem /usr/local/include -c -o encoder/slicetype-cl.o encoder/slicetype-cl.c cc -I. -I. -c -DSTACK_ALIGNMENT=4 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/cpu-a.o common/arm/cpu-a.S cc -I. -I. -c -DSTACK_ALIGNMENT=4 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/pixel-a.o common/arm/pixel-a.S cc -I. -I. -c -DSTACK_ALIGNMENT=4 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/mc-a.o common/arm/mc-a.S cc -I. -I. -c -DSTACK_ALIGNMENT=4 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/dct-a.o common/arm/dct-a.S cc -I. -I. -c -DSTACK_ALIGNMENT=4 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/quant-a.o common/arm/quant-a.S cc -I. -I. -c -DSTACK_ALIGNMENT=4 -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/deblock-a.o common/arm/deblock-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-967f0b.s:515:1: note: while in macro instantiation decimate_score_1x 16 ^ gmake[2]: *** [Makefile:217: common/arm/quant-a.o] Error 1 gmake[2]: *** Waiting for unfinished jobs.... gmake[2]: Leaving directory '/usr/obj/usr/ports/multimedia/libx264/work/x264-snapshot-20160921-2245-stable' ===> Compilation failed unexpectedly. That -mcpu=arm1136jf-s is something from the multimedia/x264/Makefile, on which the libx264 port is based on. 413179 jbeich CFLAGS_armv6+= -mcpu=arm1136jf-s However the problem is at least with one of the assembly files, which don't get those args at all. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.