From: | "Richard W(dot)M(dot) Jones" <rjones(at)redhat(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: PostgreSQL cannot be compiled on RISC-V |
Date: | 2016-11-20 10:36:52 |
Message-ID: | 20161120103652.GN11243@redhat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Sat, Nov 19, 2016 at 10:08:07PM -0500, Tom Lane wrote:
> "Richard W.M. Jones" <rjones(at)redhat(dot)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(at)postgresql(dot)org(dot)
>
> 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/
From | Date | Subject | |
---|---|---|---|
Next Message | Richard W.M. Jones | 2016-11-20 15:09:05 | Re: PostgreSQL cannot be compiled on RISC-V |
Previous Message | John R Pierce | 2016-11-20 03:24:48 | Re: PostgreSQL cannot be compiled on RISC-V |