From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Sumit Chaturvedi <sumit.chaturvedi@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: postgres with xcode
Date: Sat, 28 Jul 2018 07:11:50 -0700
Message-ID: <9c60d4da-b090-bba8-86af-4bdd267bd722@aklaver.com> (raw)
In-Reply-To: <CAKR8o6o7OMq3fd5+GHkpb9NR01W+0CATBtn_xh3bwC+jC42e5g@mail.gmail.com>
References: <CAKR8o6o7OMq3fd5+GHkpb9NR01W+0CATBtn_xh3bwC+jC42e5g@mail.gmail.com>
On 07/28/2018 04:04 AM, Sumit Chaturvedi wrote:
> Hello everyone. I'm a third year student from IIT Bombay, India. Since
> I'm currently learning about databases, I wanted to debug postgresql
> with xcode. However, I am having a lot of problems.
> OS - 10.13.6 (High Sierra)
> Xcode - 9.4.1
>
> To set up my system, I tried to replicate the instructions found at
> https://wiki.postgresql.org/wiki/Working_with_Eclipse
> <https://wiki.postgresql.org/wiki/Working_with_Eclipse; for my case.
>
> Everything proceeded fine until a point where I had to change the run
> configuration (scheme in xcode terms). I set the executable as postgre
> from /src/backend and gave the appropriate arguments. Then, when I
> pressed run, I got an error as shown in the attachment.
I can tell you where the error comes from:
postmaster.c
/*
* On macOS, libintl replaces setlocale() with a version that calls
* CFLocaleCopyCurrent() when its second argument is "" and every relevant
* environment variable is unset or empty. CFLocaleCopyCurrent() makes
* the process multithreaded. The postmaster calls sigprocmask() and
* calls fork() without an immediate exec(), both of which have undefined
* behavior in a multithreaded program. A multithreaded postmaster is the
* normal case on Windows, which offers neither fork() nor sigprocmask().
*/
if (pthread_is_threaded_np() != 0)
ereport(FATAL,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("postmaster became multithreaded during
startup"),
errhint("Set the LC_ALL environment variable to
a valid locale.")));
> To solve it, I set up my environment variables in xcode appropriately to
> make sure that locale information was reaching wherever it was needed.
> But even now, when I press run I get the same error.
I do not see that the LC_ALL environment variable is set, per the HINT
to the FATAL message.
>
> Hoping someone can share with me how they went about with their setup.
>
> --
> Sumit Chaturvedi
--
Adrian Klaver
adrian.klaver@aklaver.com
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-general@postgresql.org
Cc: adrian.klaver@aklaver.com, sumit.chaturvedi@gmail.com
Subject: Re: postgres with xcode
In-Reply-To: <9c60d4da-b090-bba8-86af-4bdd267bd722@aklaver.com>
References: <CAKR8o6o7OMq3fd5+GHkpb9NR01W+0CATBtn_xh3bwC+jC42e5g@mail.gmail.com> <9c60d4da-b090-bba8-86af-4bdd267bd722@aklaver.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