From owner-freebsd-emulation@freebsd.org Wed Dec 5 10:00:11 2018 Return-Path: Delivered-To: freebsd-emulation@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 18E4C130CED8 for ; Wed, 5 Dec 2018 10:00:11 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 866168D6B0 for ; Wed, 5 Dec 2018 10:00:10 +0000 (UTC) (envelope-from soralx@cydem.org) Received: by mailman.ysv.freebsd.org (Postfix) id 43D5E130CED7; Wed, 5 Dec 2018 10:00:10 +0000 (UTC) Delivered-To: emulation@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 07A61130CED6 for ; Wed, 5 Dec 2018 10:00:10 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CFDB8D6AA for ; Wed, 5 Dec 2018 10:00:09 +0000 (UTC) (envelope-from soralx@cydem.org) Received: by freefall.freebsd.org (Postfix) id 742168F1C; Wed, 5 Dec 2018 10:00:09 +0000 (UTC) Delivered-To: vbox@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 44B468F1B; Wed, 5 Dec 2018 10:00:09 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from smtp.triumf.ca (smtp.triumf.ca [142.90.100.195]) by mx1.freebsd.org (Postfix) with ESMTP id 7BB3C8D6A4; Wed, 5 Dec 2018 10:00:08 +0000 (UTC) (envelope-from soralx@cydem.org) Received: from mscad14 (mscad14.triumf.ca [142.90.115.36]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.triumf.ca (Postfix) with ESMTP id 15025F804; Wed, 5 Dec 2018 02:00:01 -0800 (PST) Date: Wed, 5 Dec 2018 02:00:00 -0800 From: To: , Cc: Subject: Re: [virtualbox-ose] Build failure: global register variable Message-ID: <20181205020000.644a2776@mscad14> In-Reply-To: References: <20170917195419.431341e7@mscad14> <20170920191710.58d335df@mscad14> <20170921160000.689755f8@mscad14> <5c68323f-5fed-342b-ad92-e74d178f9daf@FreeBSD.org> <20170924180619.23e149be@mscad14> <6b02f95f-207b-0f55-8e30-11512979804e@FreeBSD.org> <20170928025555.032ce67a@mscad14> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; amd64-portbld-freebsd9.3) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 866168D6B0 X-Spamd-Result: default: False [-6.25 / 15.00]; ARC_NA(0.00)[]; R_SPF_FAIL(0.00)[-all]; FORGED_RECIPIENTS_FORWARDING(0.00)[]; FORWARDED(0.00)[emulation@mailman.ysv.freebsd.org]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[cydem.org]; SPF_FAIL_FORWARDING(0.00)[]; IP_SCORE(-3.57)[ip: (-9.87), ipnet: 2001:1900:2254::/48(-4.56), asn: 10310(-3.31), country: US(-0.09)]; RCVD_IN_DNSWL_MED(-0.20)[5.0.0.0.0.5.0.0.0.0.0.0.0.0.0.0.a.6.0.2.4.5.2.2.0.0.9.1.1.0.0.2.list.dnswl.org : 127.0.9.2]; MX_GOOD(-0.01)[cached: spamtrap.bmcorp.ca]; FROM_NO_DN(0.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:10310, ipnet:2001:1900:2254::/48, country:US]; FORGED_RECIPIENTS(0.00)[jkim@FreeBSD.org ..,freebsd-emulation@freebsd.org]; RCVD_COUNT_SEVEN(0.00)[8] X-Rspamd-Server: mx1.freebsd.org X-Mailman-Approved-At: Wed, 05 Dec 2018 11:43:45 +0000 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2018 10:00:11 -0000 I see that 'pkg-help' was added to devel/kBuild explaining the new GCC option. I think that the help text can be expanded to say that kBuild and virtualbox-ose can be compiled with clang (i.e., without using gcc) when the virtual machines use hardware virtualization (VT-x/AMD-V) exclusively. Jung-uk's patches would have to be included for the emulators/virtualbox-ose port & an option added, but this set-up works for those who would like to avoid using gcc for VirtualBox. P.S.: I've been forced to use the old VirtualBox 5.1.30 for quite a while now, because of the annoying Linux dbus dependency. But recently I've managed to compile and run the latest port with out dbus. Perhaps I can submit the patches, if there is some interest in cleaning them up and adding a DBUS option? > >>>>> [0] clang/lib/Basic/Targets/X86.h: > >>>>> 860 bool validateGlobalRegisterVariable(StringRef RegName, > >>>>> unsigned RegSize, 861 bool > >>>>> &HasSizeMismatch) const override { 862 // rsp and rbp are the > >>>>> only 64-bit registers the x86 backend can currently 863 // > >>>>> handle. 864 if (RegName.equals("rsp") || > >>>>> RegName.equals("rbp")) { 865 // Check that the register > >>>>> size is 64-bit. 866 HasSizeMismatch = RegSize != 64; > >>>>> 867 return true; > >>>>> 868 } > >>>> > >>>> Please try the attached patch. > >>> > >>> Thanks for the patch! I gave it a quick try (not an extensive test), > >>> and VirtualBox, compiled fully with clang, seems to work as > >>> usual. > >> > >> Committed (r450636), thanks! > > > > Sadly, I forgot to disable VT-x when testing. My bad. > > > > I tested again, and found that, on unpatched VBox, the virtual > > machine boots and works fine with both VT-x on and off, while > > patched version fails to start the VM when VT-x is turned off: > > VBoxManage: error: No error info > > VBoxManage: error: Details: code NS_ERROR_CALL_FAILED (0x800706be), > > component ProgressProxy, interface IProgress > > > > How would one go about debugging this? > > Hmm... Unfortunately, I don't think we can "fix" it easily. I'll take > a look but I just reverted it for now. > > Jung-uk Kim > > >> For more detailed information, please read the commit log. > >> > >> https://svnweb.freebsd.org/changeset/ports/45063 -- [SorAlx] ridin' VN2000 Classic LT