Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8W0l-0002Be-GN for pgsql-bugs@arkaria.postgresql.org; Sun, 20 Nov 2016 17:34:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c8W0k-0001cp-Lm for pgsql-bugs@arkaria.postgresql.org; Sun, 20 Nov 2016 17:34:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c8Vzg-0001bT-Ba for pgsql-bugs@postgresql.org; Sun, 20 Nov 2016 17:33:32 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c8Vzb-0007qm-VY for pgsql-bugs@postgresql.org; Sun, 20 Nov 2016 17:33:31 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7BDDD4E040; Sun, 20 Nov 2016 17:33:24 +0000 (UTC) Received: from localhost (ovpn-204-28.brq.redhat.com [10.40.204.28]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAKHXNMX032378; Sun, 20 Nov 2016 12:33:23 -0500 Date: Sun, 20 Nov 2016 17:33:22 +0000 From: "Richard W.M. Jones" To: Tom Lane Cc: pgsql-bugs@postgresql.org Subject: Re: PostgreSQL cannot be compiled on RISC-V Message-ID: <20161120173322.GA10475@redhat.com> References: <20161119230312.GA8656@redhat.com> <16690.1479611287@sss.pgh.pa.us> <20161120150905.GO11243@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161120150905.GO11243@redhat.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sun, 20 Nov 2016 17:33:24 +0000 (UTC) X-Pg-Spam-Score: -9.8 (---------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Sun, Nov 20, 2016 at 03:09:05PM +0000, Richard W.M. Jones wrote: > On Sat, Nov 19, 2016 at 10:08:07PM -0500, Tom Lane wrote: > > "Richard W.M. Jones" writes: > > > ../../../src/include/storage/s_lock.h:890:2: error: #error PostgreSQL does not have native spinlock support on this platform. To continue the compilation, rerun configure using --disable-spinlocks. However, performance will be poor. Please report this to pgsql-bugs@postgresql.org. > > > > Hi Richard, > > > > What's a RISC-V, and can you provide some gcc assembler implementing > > spinlocks for it? See commentary and code for other platforms in > > src/include/storage/s_lock.h. > > That attached patch allows PostgreSQL to compile successfully. I'm > still examining the test failures, but I think they are irrelevant to > this. > > Please note that you also need to update config/config.{sub,guess} to > the latest versions from upstream > (https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html) > since your current versions are too old to understand the riscv{32,64} > architectures. I'm happy with the patch I previously attached, and I don't think it would be controversial to apply it to upstream PostgreSQL now, along with updating config.guess/config.sub. I didn't test spinlocks, but if there was a bug in the GCC builtin, then we would fix it in GCC. (In fact, why not use the GCC builtin every time PostgreSQL is compiled with GCC?) For the sake of full disclosure, the test suite is rather "crashy", with about half of the tests failing. Basic database creation, creating tables, etc all works, but the detailed tests fail with "test process exited with exit code 2" often. None of this is surprising as the entire toolchain is pre-alpha. I found that dialing MAX_CONNECTIONS down to 2 or 3 helps. What would be helpful is to get more detail on how the tests fail. I don't even know if it is the client or server side which fails (although I assume the server, because `psql' will exit with code 2 if it loses the network connection). Is there some way to run tests with lots of extra verbosity? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs