#1014082 libpg-query: ftbfs on riscv64: ( error: #error PostgreSQL does not have native spinlock support on this platform.)

Package:
src:libpg-query
Source:
libpg-query
Submitter:
Bo YU
Date:
2022-07-05 13:51:05 UTC
Severity:
minor
Tags:
#1014082#5
Date:
2022-06-30 02:16:30 UTC
From:
To:
Source: libpg-query
Version: 13-2.1.2-1
Severity: minor
Tags: ftbfs, patch
User: debian-riscv@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-riscv@lists.debian.org


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 pgsql-bugs@lists.postgresql.org.
  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 pgsql-bugs@lists.postgresql.org.
      |  ^~~~~
./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

#1014082#10
Date:
2022-06-30 02:56:24 UTC
From:
To:
在 2022/6/30 10:16, Bo YU 写道:
#1014082#15
Date:
2022-07-05 13:36:50 UTC
From:
To:
Hello,

Bug #1014082 in libpg-query reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/postgresql/libpg-query/-/commit/ae12bee7536fca2acf249f577ce2c39be2c69a84
------------------------------------------------------------------------
src/postgres/include/storage/s_lock.h: Import RISC-V tas definition.

Closes: #1014082, thanks Bo YU
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1014082

#1014082#22
Date:
2022-07-05 13:48:51 UTC
From:
To:
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 1014082@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christoph Berg <myon@debian.org> (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 ftpmaster@ftp-master.debian.org)
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 <team+postgresql@tracker.debian.org>
Changed-By: Christoph Berg <myon@debian.org>
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-----