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 17:33:22 +0000
Message-ID: <20161120173322.GA10475@redhat.com> (raw)
In-Reply-To: <20161120150905.GO11243@redhat.com>
References: <20161119230312.GA8656@redhat.com>
<16690.1479611287@sss.pgh.pa.us>
<20161120150905.GO11243@redhat.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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" <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.
>
> 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
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: <20161120173322.GA10475@redhat.com>
References: <20161119230312.GA8656@redhat.com> <16690.1479611287@sss.pgh.pa.us> <20161120150905.GO11243@redhat.com> <20161120173322.GA10475@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