pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard W.M. Jones <rjones@redhat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: PostgreSQL cannot be compiled on RISC-V
Date: Sun, 20 Nov 2016 10:36:52 +0000
Message-ID: <20161120103652.GN11243@redhat.com> (raw)
In-Reply-To: <16690.1479611287@sss.pgh.pa.us>
References: <20161119230312.GA8656@redhat.com>
	<16690.1479611287@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Sat, Nov 19, 2016 at 10:08:07PM -0500, Tom Lane wrote:
> "Richard W.M. Jones" <rjones@redhat.com> 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.

The answer to the first question is a lot easier than the second :-)

RISC-V is an open source instruction set architecture.  https://riscv.org/
I'm currently compiling Fedora for RISC-V and this was the thing
that stops PostgreSQL from being compiled.
https://fedoraproject.org/wiki/Architectures/RISC-V

I looked at the file you pointed to.  I believe it should be possible
to follow the ARM implementation and call __sync_lock_test_and_set (a
GCC builtin).  I will try this out, but note that compiling anything
on RISC-V by hand is currently a very tedious process that can take
many hours.

	- - -

Yesterday I added --disable-spinlocks and built PostgreSQL again
overnight, and it compiles fine but fails in the tests:

  https://fedorapeople.org/groups/risc-v/logs/postgresql/9.5.5-1.fc25.0.riscv64/build.log

The errors mostly seem to be:

  ERROR:  unexpected EOF on client connection with an open transaction

This is *probably* because our kernel lacks networking support, but
I didn't look at this in great detail yet.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (15+ messages)  latest in thread

Message-ID: <20161120103652.GN11243@redhat.com>
Permalink:  ../20161120103652.GN11243@redhat.com/
Also on:    postgresql.org/message-id/20161120103652.GN11243@redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: rjones@redhat.com, tgl@sss.pgh.pa.us
  Subject: Re: PostgreSQL cannot be compiled on RISC-V
  In-Reply-To: <20161120103652.GN11243@redhat.com>
  References: <20161119230312.GA8656@redhat.com> <16690.1479611287@sss.pgh.pa.us> <20161120103652.GN11243@redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox