* [Buildroot] [PATCH 1/1] package/postgresql: needs threads
@ 2024-09-03 5:46 Maxim Kochetkov via buildroot
2024-09-03 20:45 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Maxim Kochetkov via buildroot @ 2024-09-03 5:46 UTC (permalink / raw)
To: buildroot; +Cc: Maxim Kochetkov
Threads are mandantory since bump to version 16.3 in commit
https://github.com/postgres/postgres/commit/52afe563206e753f4c45c014fee2459ad0855826
fe-misc.c: In function 'libpq_binddomain':
fe-misc.c:1235:16: error: unknown type name 'pthread_mutex_t'
1235 | static pthread_mutex_t binddomain_mutex = PTHREAD_MUTEX_INITIALIZER;
| ^~~~~~~~~~~~~~~
fe-misc.c:1235:51: error: 'PTHREAD_MUTEX_INITIALIZER' undeclared (first use in this function)
1235 | static pthread_mutex_t binddomain_mutex = PTHREAD_MUTEX_INITIALIZER;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
fe-misc.c:1235:51: note: each undeclared identifier is reported only once for each function it appears in
fe-misc.c:1246:24: warning: implicit declaration of function 'pthread_mutex_lock' [-Wimplicit-function-declaration]
1246 | (void) pthread_mutex_lock(&binddomain_mutex);
| ^~~~~~~~~~~~~~~~~~
fe-misc.c:1263:24: warning: implicit declaration of function 'pthread_mutex_unlock' [-Wimplicit-function-declaration]
1263 | (void) pthread_mutex_unlock(&binddomain_mutex);
| ^~~~~~~~~~~~~~~~~~~~
Fixes: 73dd1d6b96665574607c8b05189426ad3eb05a6f
- http://autobuild.buildroot.org/results/43dea0d3b618e826e866477124284bf89204113e
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
---
package/postgresql/Config.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/postgresql/Config.in b/package/postgresql/Config.in
index 899907d6a5..9faed419bc 100644
--- a/package/postgresql/Config.in
+++ b/package/postgresql/Config.in
@@ -32,9 +32,9 @@ config BR2_PACKAGE_POSTGRESQL_FULL
endif
-comment "postgresql needs a toolchain w/ dynamic library, wchar"
+comment "postgresql needs a toolchain w/ dynamic library, wchar, threads"
depends on BR2_USE_MMU
- depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR
+ depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
comment "postgresql can't be built with Optimize for fast"
depends on BR2_OPTIMIZE_FAST
--
2.45.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/postgresql: needs threads
2024-09-03 5:46 [Buildroot] [PATCH 1/1] package/postgresql: needs threads Maxim Kochetkov via buildroot
@ 2024-09-03 20:45 ` Thomas Petazzoni via buildroot
2024-09-04 5:52 ` Maxim Kochetkov via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-03 20:45 UTC (permalink / raw)
To: Maxim Kochetkov via buildroot; +Cc: Maxim Kochetkov
Hello Maxim,
On Tue, 3 Sep 2024 08:46:22 +0300
Maxim Kochetkov via buildroot <buildroot@buildroot.org> wrote:
> Threads are mandantory since bump to version 16.3 in commit
> https://github.com/postgres/postgres/commit/52afe563206e753f4c45c014fee2459ad0855826
to which Buildroot was updated in commit
73dd1d6b96665574607c8b05189426ad3eb05a6f.
> diff --git a/package/postgresql/Config.in b/package/postgresql/Config.in
> index 899907d6a5..9faed419bc 100644
> --- a/package/postgresql/Config.in
> +++ b/package/postgresql/Config.in
> @@ -32,9 +32,9 @@ config BR2_PACKAGE_POSTGRESQL_FULL
>
> endif
>
> -comment "postgresql needs a toolchain w/ dynamic library, wchar"
> +comment "postgresql needs a toolchain w/ dynamic library, wchar, threads"
> depends on BR2_USE_MMU
> - depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR
> + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
>
> comment "postgresql can't be built with Optimize for fast"
> depends on BR2_OPTIMIZE_FAST
Unfortunately, this is not sufficient to add a dependency, you also
need "depends on BR2_TOOLCHAIN_HAS_THREADS" in BR2_PACKAGE_POSTGRESQL.
Then, you need to go through all the reverse dependencies of postgresql:
package/bandwidthd/Config.in: select BR2_PACKAGE_POSTGRESQL
package/collectd/Config.in: select BR2_PACKAGE_POSTGRESQL
package/lighttpd/Config.in: select BR2_PACKAGE_POSTGRESQL
package/php/Config.ext: select BR2_PACKAGE_POSTGRESQL
package/php/Config.ext: select BR2_PACKAGE_POSTGRESQL
package/poco/Config.in: select BR2_PACKAGE_POSTGRESQL
package/python-psycopg2/Config.in: select BR2_PACKAGE_POSTGRESQL
package/qt5/qt5base/Config.in: select BR2_PACKAGE_POSTGRESQL
package/qt6/qt6base/Config.in: select BR2_PACKAGE_POSTGRESQL
package/zabbix/Config.in: select BR2_PACKAGE_POSTGRESQL
and check that they all have a BR2_TOOLCHAIN_HAS_THREADS dependency,
and if not, add it. And then look at their reverse dependencies.
Also, another thing is that postgresql.mk has:
ifneq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
POSTGRESQL_CONF_OPTS += --disable-thread-safety
endif
so does it mean that this option is no longer supported? No longer
exists?
Also, does it now need thread support, or NPTL thread support
specifically? (You can figure out by building with a Buildroot
configuration that has BR2_PTHREADS instead of BR2_PTHREADS_NATIVE).
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/postgresql: needs threads
2024-09-03 20:45 ` Thomas Petazzoni via buildroot
@ 2024-09-04 5:52 ` Maxim Kochetkov via buildroot
0 siblings, 0 replies; 3+ messages in thread
From: Maxim Kochetkov via buildroot @ 2024-09-04 5:52 UTC (permalink / raw)
To: buildroot
03.09.2024 23:45, Thomas Petazzoni via buildroot пишет:
> Also, another thing is that postgresql.mk has:
>
> ifneq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
> POSTGRESQL_CONF_OPTS += --disable-thread-safety
> endif
>
> so does it mean that this option is no longer supported? No longer
> exists?
It is totally dropped in PG 17:
https://github.com/postgres/postgres/commit/68a4b58eca032916e2aad78d63f717dcb147e906
But it is not released yet, and timescaledb have no PG 17 support.
It is looks like commit
https://github.com/postgres/postgres/commit/52afe563206e753f4c45c014fee2459ad0855826
is wrong. It has no #ifdef ENABLE_THREAD_SAFETY guard. All other code
with pthreads has this guard:
#ifdef ENABLE_THREAD_SAFETY
/* Interlock against concurrent executions of ECPGdebug() */
pthread_mutex_lock(&debug_init_mutex);
/* Prevent ecpg_log() from printing while we change settings */
pthread_mutex_lock(&debug_mutex);
#endif
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-04 5:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 5:46 [Buildroot] [PATCH 1/1] package/postgresql: needs threads Maxim Kochetkov via buildroot
2024-09-03 20:45 ` Thomas Petazzoni via buildroot
2024-09-04 5:52 ` Maxim Kochetkov via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox