From owner-freebsd-riscv@freebsd.org Sun Jun 9 01:10:00 2019 Return-Path: Delivered-To: freebsd-riscv@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C58A15B84FB for ; Sun, 9 Jun 2019 01:10:00 +0000 (UTC) (envelope-from dclarke@blastwave.org) Received: from atl4mhfb01.myregisteredsite.com (atl4mhfb01.myregisteredsite.com [209.17.115.55]) (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 CB9B981D99 for ; Sun, 9 Jun 2019 01:09:56 +0000 (UTC) (envelope-from dclarke@blastwave.org) Received: from atl4mhob12.registeredsite.com (atl4mhob12.registeredsite.com [209.17.115.50]) by atl4mhfb01.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id x5919oJl017920 for ; Sat, 8 Jun 2019 21:09:50 -0400 Received: from mailpod.hostingplatform.com (atl4qobmail02pod2.registeredsite.com [10.30.77.36]) by atl4mhob12.registeredsite.com (8.14.4/8.14.4) with ESMTP id x5919fts014188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 8 Jun 2019 21:09:42 -0400 Received: (qmail 24923 invoked by uid 0); 9 Jun 2019 01:09:41 -0000 X-TCPREMOTEIP: 99.253.177.25 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.3?) (dclarke@blastwave.org@99.253.177.25) by 0 with ESMTPA; 9 Jun 2019 01:09:41 -0000 Subject: Re: FreeBSD build for RISC-V blows up in make TARGET_ARCH=riscv64 buildworld To: Li-Wen Hsu Cc: freebsd-riscv References: From: Dennis Clarke Message-ID: <3803e532-00f2-06f2-6d1f-6f3c65292106@blastwave.org> Date: Sat, 8 Jun 2019 21:09:32 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Thunderbird/67.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: CB9B981D99 X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [2.24 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.48)[0.478,0]; IP_SCORE(0.11)[ip: (0.13), ipnet: 209.17.112.0/21(0.25), asn: 19871(0.20), country: US(-0.06)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-riscv@freebsd.org]; DMARC_NA(0.00)[blastwave.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.58)[0.575,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[mx1.netsolmail.net]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[55.115.17.209.list.dnswl.org : 127.0.5.0]; NEURAL_SPAM_LONG(0.19)[0.189,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:19871, ipnet:209.17.112.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-riscv@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD on the RISC-V instruction set architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jun 2019 01:10:00 -0000 On 5/28/19 11:27 AM, Li-Wen Hsu wrote: > On Fri, May 24, 2019 at 2:18 PM Dennis Clarke wrote: >> So on FreeBSD 13 CURRENT I hit the same brick walls as usual while >> trying to follow https://wiki.freebsd.org/riscv wherein I have the >> cross compiler built and in >> /opt/riscv_tools/bin/riscv64-unknown-freebsd13.0-foo as per usual. >> Nothing is a surprise until I hit >> the make TARGET_ARCH=riscv64 buildworld which blows up fast : > ... >> Any clues ?? > > Not from me, I haven't checked the status on 13 for a while. Just > wanted to let you know that we have regular build and boot check for > head: > > https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/ > https://ci.freebsd.org/job/FreeBSD-head-riscv64-test/ > > The difference with your setup is we're using toolchain installed from > pkg described in that wiki page and running on 12.0-RELEASE. > Thank you for the pointers but I tried to use the riscv64-xtoolchain-gcc pkgs today and that fails neatly : /usr/local/bin/riscv64-unknown-freebsd12.0-gcc --sysroot=/usr/home/root/obj/root/freebsd-riscv/riscv.riscv64/tmp -B/usr/local/riscv64-unknown-freebsd12.0/bin/ -O2 -pipe -march=rv64imafdc -mabi=lp64d -g -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-error=address -Wno-error=array-bounds -Wno-error=attributes -Wno-error=bool-compare -Wno-error=cast-align -Wno-error=clobbered -Wno-error=enum-compare -Wno-error=extra -Wno-error=inline -Wno-error=logical-not-parentheses -Wno-error=strict-aliasing -Wno-error=uninitialized -Wno-error=unused-but-set-variable -Wno-error=unused-function -Wno-error=unused-value -Wno-error=misleading-indentation -Wno-error=nonnull-compare -Wno-error=shift-negative-value -Wno-error=tautological-compare -Wno-error=unused-const-variable -Wno-error=bool-operation -Wno-error=deprecated -Wno-error=expansion-to-defined -Wno-error=format-overflow -Wno-error=format-truncation -Wno-error=implicit-fallthrough -Wno-error=int-in-bool-context -Wno-error=memset-elt-size -Wno-error=noexcept-type -Wno-error=nonnull -Wno-error=pointer-compare -Wno-error=stringop-overflow -Wno-error=aggressive-loop-optimizations -Wno-error=cast-function-type -Wno-error=catch-value -Wno-error=multistatement-macros -Wno-error=restrict -Wno-error=sizeof-pointer-memaccess -Wno-error=stringop-truncation -o binmiscctl.full binmiscctl.o /usr/local/riscv64-unknown-freebsd12.0/bin/objcopy --only-keep-debug binmiscctl.full binmiscctl.debug /usr/local/riscv64-unknown-freebsd12.0/bin/objcopy --strip-debug --add-gnu-debuglink=binmiscctl.debug binmiscctl.full binmiscctl gzip -cn /root/freebsd-riscv/usr.sbin/binmiscctl/binmiscctl.8 > binmiscctl.8.gz ===> usr.sbin/camdd (all) echo camdd.full: /usr/home/root/obj/root/freebsd-riscv/riscv.riscv64/tmp/usr/lib/libc.a /usr/home/root/obj/root/freebsd-riscv/riscv.riscv64/tmp/usr/lib/libcam.a /usr/home/root/obj/root/freebsd-riscv/riscv.riscv64/tmp/usr/lib/libmt.a /usr/home/root/obj/root/freebsd-riscv/riscv.riscv64/tmp/usr/lib/libutil.a /usr/home/root/obj/root/freebsd-riscv/riscv.riscv64/tmp/usr/lib/libpthread.a >> .depend /usr/local/bin/riscv64-unknown-freebsd12.0-gcc --sysroot=/usr/home/root/obj/root/freebsd-riscv/riscv.riscv64/tmp -B/usr/local/riscv64-unknown-freebsd12.0/bin/ -O2 -pipe -march=rv64imafdc -mabi=lp64d -g -MD -MF.depend.camdd.o -MTcamdd.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-error=address -Wno-error=array-bounds -Wno-error=attributes -Wno-error=bool-compare -Wno-error=cast-align -Wno-error=clobbered -Wno-error=enum-compare -Wno-error=extra -Wno-error=inline -Wno-error=logical-not-parentheses -Wno-error=strict-aliasing -Wno-error=uninitialized -Wno-error=unused-but-set-variable -Wno-error=unused-function -Wno-error=unused-value -Wno-error=misleading-indentation -Wno-error=nonnull-compare -Wno-error=shift-negative-value -Wno-error=tautological-compare -Wno-error=unused-const-variable -Wno-error=bool-operation -Wno-error=deprecated -Wno-error=expansion-to-defined -Wno-error=format-overflow -Wno-error=format-truncation -Wno-error=implicit-fallthrough -Wno-error=int-in-bool-context -Wno-error=memset-elt-size -Wno-error=noexcept-type -Wno-error=nonnull -Wno-error=pointer-compare -Wno-error=stringop-overflow -Wno-error=aggressive-loop-optimizations -Wno-error=cast-function-type -Wno-error=catch-value -Wno-error=multistatement-macros -Wno-error=restrict -Wno-error=sizeof-pointer-memaccess -Wno-error=stringop-truncation -c /root/freebsd-riscv/usr.sbin/camdd/camdd.c -o camdd.o /root/freebsd-riscv/usr.sbin/camdd/camdd.c: In function 'camdd_get_next_lba_len': /root/freebsd-riscv/usr.sbin/camdd/camdd.c:2751:25: warning: variable 'pass_dev' set but not used [-Wunused-but-set-variable] struct camdd_dev_pass *pass_dev; ^~~~~~~~ /root/freebsd-riscv/usr.sbin/camdd/camdd.c: In function 'camdd_queue': /root/freebsd-riscv/usr.sbin/camdd/camdd.c:2819:6: warning: variable 'error' set but not used [-Wunused-but-set-variable] int error; ^~~~~ /root/freebsd-riscv/usr.sbin/camdd/camdd.c:2813:25: warning: variable 'pass_dev' set but not used [-Wunused-but-set-variable] struct camdd_dev_pass *pass_dev; ^~~~~~~~ /root/freebsd-riscv/usr.sbin/camdd/camdd.c: In function 'camdd_probe_pass': /root/freebsd-riscv/usr.sbin/camdd/camdd.c:1560:26: error: 'scsi_dev_type' may be used uninitialized in this function [-Werror=maybe-uninitialized] pass_dev->scsi_dev_type = scsi_dev_type; ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors *** Error code 1 Stop. make[4]: stopped in /root/freebsd-riscv/usr.sbin/camdd *** Error code 1 Stop. make[3]: stopped in /root/freebsd-riscv/usr.sbin *** Error code 1 Stop. make[2]: stopped in /root/freebsd-riscv *** Error code 1 Stop. make[1]: stopped in /root/freebsd-riscv *** Error code 1 Stop. make: stopped in /root/freebsd-riscv vesta# So today was a full day of trying with the instructions at the wiki https://wiki.freebsd.org/riscv both with the toolchain built from here https://github.com/freebsd-riscv/riscv-gnu-toolchain and then again with the pkgs for FreeBSD 12. Fails. So not sure how you or anyone is getting a bootable result but it surely isn't documented anywhere. I am baffled by what I see at https://ci.freebsd.org/job/FreeBSD-head-riscv64-testvm/ as there can not be any way to build FreeBSD for rv64imafdc unless someone has some pointers? Has anyone anywhere actually done this? Recently ? -- Dennis Clarke RISC-V/SPARC/PPC/ARM/CISC UNIX and Linux spoken GreyBeard and suspenders optional