Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] postgresql issue
@ 2025-02-16 12:41 Waldemar Brodkorb
  2025-02-16 14:14 ` Peter Seiderer via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Waldemar Brodkorb @ 2025-02-16 12:41 UTC (permalink / raw)
  To: buildroot

Hi,

I am using Buildroot master. I try to use Postgresql Server.
I have locales enabled and building for a raspberry pi5.

wbx@neon:~/buildroot$ grep LOCALE .config
BR2_NEEDS_HOST_UTF8_LOCALE=y
BR2_ENABLE_LOCALE=y
# BR2_ENABLE_LOCALE_PURGE is not set
BR2_GENERATE_LOCALE="en_US"
# BR2_PACKAGE_SYSTEMD_LOCALED is not set

Journalctl reports:
Oct 08 15:42:34 buildroot systemd[1]: Starting PostgreSQL database server...
Oct 08 15:42:35 buildroot postgres[268]: The files belonging to this database system will be owned by user "postgres".
Oct 08 15:42:35 buildroot postgres[268]: This user must also own the server process.
Oct 08 15:42:35 buildroot postgres[268]: initdb: error: invalid locale settings; check LANG and LC_* environment variables
Oct 08 15:42:35 buildroot postgres[261]: pg_ctl: database system initialization failed
Oct 08 15:42:35 buildroot systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
Oct 08 15:42:35 buildroot systemd[1]: :5:185m:5:185mpostgresql.service: Failed with result 'exit-code'.
Oct 08 15:42:35 buildroot systemd[1]: Failed to start PostgreSQL database server.

Any idea? I have set the environment variable LANG to en_US.UTF-8.

best regards
 Waldemar
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] postgresql issue
  2025-02-16 12:41 [Buildroot] postgresql issue Waldemar Brodkorb
@ 2025-02-16 14:14 ` Peter Seiderer via buildroot
  2025-02-19  5:45   ` Waldemar Brodkorb
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Seiderer via buildroot @ 2025-02-16 14:14 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: buildroot

Hello Waldemar,

On Sun, 16 Feb 2025 13:41:51 +0100, Waldemar Brodkorb <wbx@openadk.org> wrote:

> Hi,
>
> I am using Buildroot master. I try to use Postgresql Server.
> I have locales enabled and building for a raspberry pi5.
>
> wbx@neon:~/buildroot$ grep LOCALE .config
> BR2_NEEDS_HOST_UTF8_LOCALE=y
> BR2_ENABLE_LOCALE=y
> # BR2_ENABLE_LOCALE_PURGE is not set
> BR2_GENERATE_LOCALE="en_US"
> # BR2_PACKAGE_SYSTEMD_LOCALED is not set
>
> Journalctl reports:
> Oct 08 15:42:34 buildroot systemd[1]: Starting PostgreSQL database server...
> Oct 08 15:42:35 buildroot postgres[268]: The files belonging to this database system will be owned by user "postgres".
> Oct 08 15:42:35 buildroot postgres[268]: This user must also own the server process.
> Oct 08 15:42:35 buildroot postgres[268]: initdb: error: invalid locale settings; check LANG and LC_* environment variables
> Oct 08 15:42:35 buildroot postgres[261]: pg_ctl: database system initialization failed
> Oct 08 15:42:35 buildroot systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
> Oct 08 15:42:35 buildroot systemd[1]: :5:185m:5:185mpostgresql.service: Failed with result 'exit-code'.
> Oct 08 15:42:35 buildroot systemd[1]: Failed to start PostgreSQL database server.
>
> Any idea? I have set the environment variable LANG to en_US.UTF-8.

Reminds me of an aged patch set

  [v1,1/3] package/glibc: install locale cmd independent of NLS (see [1])
  [v1,2/3] package/postgresql: needs locale command (see [2])
  [v1,3/3] package/postgresql: set locale for initdb to C (see [3])

...not sure if still appropriate...

Regards,
Peter

[1] https://patchwork.ozlabs.org/project/buildroot/patch/20200920150659.7562-1-ps.report@gmx.net/
[2] https://patchwork.ozlabs.org/project/buildroot/patch/20200920150659.7562-2-ps.report@gmx.net/
[3] https://patchwork.ozlabs.org/project/buildroot/patch/20200920150659.7562-3-ps.report@gmx.net/

>
> best regards
>  Waldemar
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] postgresql issue
  2025-02-16 14:14 ` Peter Seiderer via buildroot
@ 2025-02-19  5:45   ` Waldemar Brodkorb
  2025-02-19  6:36     ` Maxim Kochetkov via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Waldemar Brodkorb @ 2025-02-19  5:45 UTC (permalink / raw)
  To: Peter Seiderer; +Cc: buildroot

Hi,
Peter Seiderer wrote,

> Hello Waldemar,
> 
> On Sun, 16 Feb 2025 13:41:51 +0100, Waldemar Brodkorb <wbx@openadk.org> wrote:
> 
> > Hi,
> >
> > I am using Buildroot master. I try to use Postgresql Server.
> > I have locales enabled and building for a raspberry pi5.
> >
> > wbx@neon:~/buildroot$ grep LOCALE .config
> > BR2_NEEDS_HOST_UTF8_LOCALE=y
> > BR2_ENABLE_LOCALE=y
> > # BR2_ENABLE_LOCALE_PURGE is not set
> > BR2_GENERATE_LOCALE="en_US"
> > # BR2_PACKAGE_SYSTEMD_LOCALED is not set
> >
> > Journalctl reports:
> > Oct 08 15:42:34 buildroot systemd[1]: Starting PostgreSQL database server...
> > Oct 08 15:42:35 buildroot postgres[268]: The files belonging to this database system will be owned by user "postgres".
> > Oct 08 15:42:35 buildroot postgres[268]: This user must also own the server process.
> > Oct 08 15:42:35 buildroot postgres[268]: initdb: error: invalid locale settings; check LANG and LC_* environment variables
> > Oct 08 15:42:35 buildroot postgres[261]: pg_ctl: database system initialization failed
> > Oct 08 15:42:35 buildroot systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
> > Oct 08 15:42:35 buildroot systemd[1]: :5:185m:5:185mpostgresql.service: Failed with result 'exit-code'.
> > Oct 08 15:42:35 buildroot systemd[1]: Failed to start PostgreSQL database server.
> >
> > Any idea? I have set the environment variable LANG to en_US.UTF-8.
> 
> Reminds me of an aged patch set
> 
>   [v1,1/3] package/glibc: install locale cmd independent of NLS (see [1])
>   [v1,2/3] package/postgresql: needs locale command (see [2])
>   [v1,3/3] package/postgresql: set locale for initdb to C (see [3])
> 
> ...not sure if still appropriate...

Patch 3 worked for me! I get an error about missing locale command,
but the database is starting. Let's see if zabbix works, too.

@Maintainers, what you think about adding this patch?

best regards
 Waldemar
 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] postgresql issue
  2025-02-19  5:45   ` Waldemar Brodkorb
@ 2025-02-19  6:36     ` Maxim Kochetkov via buildroot
  0 siblings, 0 replies; 4+ messages in thread
From: Maxim Kochetkov via buildroot @ 2025-02-19  6:36 UTC (permalink / raw)
  To: buildroot

19.02.2025 08:45, Waldemar Brodkorb wrote:
> Hi,
> Peter Seiderer wrote,
> 
>> Hello Waldemar,
>>
>> On Sun, 16 Feb 2025 13:41:51 +0100, Waldemar Brodkorb <wbx@openadk.org> wrote:
>>
>>> Hi,
>>>
>>> I am using Buildroot master. I try to use Postgresql Server.
>>> I have locales enabled and building for a raspberry pi5.
>>>
>>> wbx@neon:~/buildroot$ grep LOCALE .config
>>> BR2_NEEDS_HOST_UTF8_LOCALE=y
>>> BR2_ENABLE_LOCALE=y
>>> # BR2_ENABLE_LOCALE_PURGE is not set
>>> BR2_GENERATE_LOCALE="en_US"
>>> # BR2_PACKAGE_SYSTEMD_LOCALED is not set
>>>
>>> Journalctl reports:
>>> Oct 08 15:42:34 buildroot systemd[1]: Starting PostgreSQL database server...
>>> Oct 08 15:42:35 buildroot postgres[268]: The files belonging to this database system will be owned by user "postgres".
>>> Oct 08 15:42:35 buildroot postgres[268]: This user must also own the server process.
>>> Oct 08 15:42:35 buildroot postgres[268]: initdb: error: invalid locale settings; check LANG and LC_* environment variables
>>> Oct 08 15:42:35 buildroot postgres[261]: pg_ctl: database system initialization failed
>>> Oct 08 15:42:35 buildroot systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
>>> Oct 08 15:42:35 buildroot systemd[1]: :5:185m:5:185mpostgresql.service: Failed with result 'exit-code'.
>>> Oct 08 15:42:35 buildroot systemd[1]: Failed to start PostgreSQL database server.
>>>
>>> Any idea? I have set the environment variable LANG to en_US.UTF-8.
>>
>> Reminds me of an aged patch set
>>
>>    [v1,1/3] package/glibc: install locale cmd independent of NLS (see [1])
>>    [v1,2/3] package/postgresql: needs locale command (see [2])
>>    [v1,3/3] package/postgresql: set locale for initdb to C (see [3])
>>
>> ...not sure if still appropriate...
> 
> Patch 3 worked for me! I get an error about missing locale command,
> but the database is starting. Let's see if zabbix works, too.
> 
> @Maintainers, what you think about adding this patch?

About locale command in musl:
https://git.adelielinux.org/adelie/musl-locales/

We can try to integrate it into buildroot.



_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-19  6:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-16 12:41 [Buildroot] postgresql issue Waldemar Brodkorb
2025-02-16 14:14 ` Peter Seiderer via buildroot
2025-02-19  5:45   ` Waldemar Brodkorb
2025-02-19  6:36     ` 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