Your message dated Tue, 05 Jul 2022 13:48:51 +0000
with message-id <[email protected]>
and subject line Bug#1014082: fixed in libpg-query 13-2.1.2-2
has caused the Debian Bug report #1014082,
regarding libpg-query: ftbfs on riscv64: ( error: #error PostgreSQL does not
have native spinlock support on this platform.)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1014082: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014082
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libpg-query
Version: 13-2.1.2-1
Severity: minor
Tags: ftbfs, patch
User: [email protected]
Usertags: riscv64
X-Debbugs-Cc: [email protected]
Dear libpg-query Maintainer,
The libpg-query has a ftbfs issue on riscv64:
```
...
In file included from ./src/postgres/include/storage/condition_variable.h:26,
from ./src/postgres/include/nodes/execnodes.h:25,
from ./src/postgres/include/catalog/index.h:18,
from src/pg_query_deparse.c:5:
./src/postgres/include/storage/s_lock.h:922: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 [email protected].
922 | #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
[email protected].
| ^~~~~
./src/postgres/include/storage/s_lock.h:994:30: error: unknown type name
‘slock_t’
994 | extern int tas(volatile slock_t *lock); /* in
port/.../tas.s, or
| ^~~~~~~
./src/postgres/include/storage/s_lock.h:1004:8: error: unknown type name
‘slock_t’
1004 | extern slock_t dummy_spinlock;
| ^~~~~~~
./src/postgres/include/storage/s_lock.h:1009:28: error: unknown type name
‘slock_t’
1009 | extern int s_lock(volatile slock_t *lock, const char *file, int line,
const char *func);
| ^~~~~~~
In file included from ./src/postgres/include/nodes/execnodes.h:25,
from ./src/postgres/include/catalog/index.h:18,
...
```
The patch attached is to fix the issue and I build libpg-query package
successfully on my locally real riscv64 hardware(Unmatched board).
If there are any issues please let me know. thank you.
Bo
--
Best Regards,
The code refer to:
https://github.com/postgres/postgres/blob/master/src/include/storage/s_lock.h
Bo YU <[email protected]>
--- a/src/postgres/include/storage/s_lock.h
+++ b/src/postgres/include/storage/s_lock.h
@@ -339,6 +339,27 @@
#endif /* HAVE_GCC__SYNC_INT32_TAS */
#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */
+/*
+ * RISC-V likewise uses __sync_lock_test_and_set(int *, int) if available.
+ */
+#if defined(__riscv)
+#ifdef HAVE_GCC__SYNC_INT32_TAS
+#define HAS_TEST_AND_SET
+
+#define TAS(lock) tas(lock)
+
+typedef int slock_t;
+
+static __inline__ int
+tas(volatile slock_t *lock)
+{
+ return __sync_lock_test_and_set(lock, 1);
+}
+
+#define S_UNLOCK(lock) __sync_lock_release(lock)
+
+#endif /* HAVE_GCC__SYNC_INT32_TAS */
+#endif /* __riscv */
/* S/390 and S/390x Linux (32- and 64-bit zSeries) */
#if defined(__s390__) || defined(__s390x__)
signature.asc
Description: PGP signature
--- End Message ---
--- Begin Message ---
Source: libpg-query
Source-Version: 13-2.1.2-2
Done: Christoph Berg <[email protected]>
We believe that the bug you reported is fixed in the latest version of
libpg-query, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Christoph Berg <[email protected]> (supplier of updated libpg-query package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Tue, 05 Jul 2022 15:30:22 +0200
Source: libpg-query
Architecture: source
Version: 13-2.1.2-2
Distribution: unstable
Urgency: medium
Maintainer: Debian PostgreSQL Maintainers <[email protected]>
Changed-By: Christoph Berg <[email protected]>
Closes: 1014082
Changes:
libpg-query (13-2.1.2-2) unstable; urgency=medium
.
* src/postgres/include/storage/s_lock.h: Import RISC-V tas definition.
(Closes: #1014082, thanks Bo YU)
Checksums-Sha1:
ac81e92a3becd5f2e63d585b12e35512478d9b85 2099 libpg-query_13-2.1.2-2.dsc
1b78603d66f654352ebe2252b5eb28fa208e4ad6 12348
libpg-query_13-2.1.2-2.debian.tar.xz
Checksums-Sha256:
c0591dd1e8b379546663800e6532240c0bd7e4c99c41c460ed5b7f2277eac9bf 2099
libpg-query_13-2.1.2-2.dsc
f5640353a10b42087c3cf555329c6da13073c5a4e89358ddd4db2ef0da9d3497 12348
libpg-query_13-2.1.2-2.debian.tar.xz
Files:
9addba384d33db8945b9509a9f74e686 2099 libs optional libpg-query_13-2.1.2-2.dsc
cd2d48574c56252cb9fe0dbaf334dd50 12348 libs optional
libpg-query_13-2.1.2-2.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEXEj+YVf0kXlZcIfGTFprqxLSp64FAmLEQJYACgkQTFprqxLS
p65kjA//bou9aNiz1tz+7GTf+iGBGnH73SWkkpJN+mCTjh4nsxqJ2T/6DdBlmTJk
Sm1CiGEEd5HquywId/tqDT7WQn6GCqQa0vgu6a3d6DtUVRXL2sDAsGxmt8ufbYYG
gfPmb/xlnuRgPqXaKPvRR5btD7xy1AMvSd8tUnV2j98F8UvuNG9drbTNynVa8ng9
6d0vG7do0JQRrfcgb+3X1p065M/0L0DU8y8RjGF+HseWMe23sjLnq5dswRR71XEW
MED3yTfD9IVIaOAAig7DWaxpeioJrLTLqnuWy6rthu5F2tkiw+lob9X5QheFsWlb
1bVJ2IdbMdSqbaDgf/XZ93gZYUkpCHpDFHXEw2/f2aVf5TeaO7EFiPzbh8rVBeee
cABHeGEa57yaqJpJ+wRXzrxz+MDC0juFKdonD9H6EttaesbEq/yaOba7vLM8NXlp
bapEJ2tBlsFt800bk2/pL3/B8bRTyF08X6k9GbBbFrywoMs3g1n3HbN83iFkxucj
XQk2bgvy2sm6dbMpe9mzl3SxL0zJr8MwT1ZOvWwN50vWDxVBbKN0EUAt+3Eqhd/f
Q/NnXg2yYFxtTi3CDDX1+5oQjVqPmis+2LzIdYE11kOk9Od2HzpxpFxNFMJWJ++T
o5vuMEoX1mcDOol4K8fifpJGV+tr85swLv9FPmw4tBFkv0silEQ=
=XefV
-----END PGP SIGNATURE-----
--- End Message ---