Thread: Assistance Needed: Error during PostgreSQL Configuration

Assistance Needed: Error during PostgreSQL Configuration

From
Ayush Vatsa
Date:
Hello, PostgreSQL community,
I'm reaching out to you about an issue I've had while trying to configure PostgreSQL by cloning its files from the GitHub repository.
During the configuration process, I encountered an error message that appeared to be related to a syntax issue within the 'config.status' file. Specifically, the error message reads as follows:
./config.status: line 486: syntax error near unexpected token `)'
./config.status: line 486: ` *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;'
I have tried to resolve this on my own, but unfortunately, I haven't been successful in finding a solution.
Could you please provide guidance or assistance in resolving this issue? I would appreciate any insights or suggestions you have to help me move past this obstacle.
Looking forward to your response.

Thanks
Ayush Vatsa
SDE Amazon

Re: Assistance Needed: Error during PostgreSQL Configuration

From
Ian Lawrence Barwick
Date:
2023年12月11日(月) 18:09 Ayush Vatsa <ayushvatsa1810@gmail.com>:
>
> Hello, PostgreSQL community,
> I'm reaching out to you about an issue I've had while trying to configure PostgreSQL by cloning its files from the
GitHubrepository. 
> During the configuration process, I encountered an error message that appeared to be related to a syntax issue within
the'config.status' file. 

FWIW 'config.status' is the log file generated by 'configure'.

> Specifically, the error message reads as follows:
> ./config.status: line 486: syntax error near unexpected token `)'
> ./config.status: line 486: ` *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;'
> I have tried to resolve this on my own, but unfortunately, I haven't been successful in finding a solution.
> Could you please provide guidance or assistance in resolving this issue? I would appreciate any insights or
suggestionsyou have to help me move past this obstacle. 
> Looking forward to your response.

You should provide, at the very least, the following information:
- the PostgreSQL version you are trying to build
- the environment you are trying to build it in

A very hand-wavy guess, but possibly your local "sed" installation is
not GNU sed?

Regards

Ian Barwick



Re: Assistance Needed: Error during PostgreSQL Configuration

From
Tom Lane
Date:
Ian Lawrence Barwick <barwick@gmail.com> writes:
> 2023年12月11日(月) 18:09 Ayush Vatsa <ayushvatsa1810@gmail.com>:
>> ./config.status: line 486: syntax error near unexpected token `)'
>> ./config.status: line 486: ` *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;'

> You should provide, at the very least, the following information:
> - the PostgreSQL version you are trying to build
> - the environment you are trying to build it in

+1

> A very hand-wavy guess, but possibly your local "sed" installation is
> not GNU sed?

I'm also wondering if the shell in use is nonstandard.  The configure
script would likely already have failed if you tried to run it with,
say, csh; but maybe more-subtly-incompatible shells could give rise
to this symptom.

            regards, tom lane



Re: Assistance Needed: Error during PostgreSQL Configuration

From
Ayush Vatsa
Date:

On Mon, 11 Dec 2023 at 20:20, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Ian Lawrence Barwick <barwick@gmail.com> writes:
> 2023年12月11日(月) 18:09 Ayush Vatsa <ayushvatsa1810@gmail.com>:
>> ./config.status: line 486: syntax error near unexpected token `)'
>> ./config.status: line 486: ` *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;'

> You should provide, at the very least, the following information:
> - the PostgreSQL version you are trying to build
> - the environment you are trying to build it in

+1

> A very hand-wavy guess, but possibly your local "sed" installation is
> not GNU sed?

I'm also wondering if the shell in use is nonstandard.  The configure
script would likely already have failed if you tried to run it with,
say, csh; but maybe more-subtly-incompatible shells could give rise
to this symptom.

                        regards, tom lane

Re: Assistance Needed: Error during PostgreSQL Configuration

From
Ron Johnson
Date:
On Tue, Dec 12, 2023 at 11:02 AM Ayush Vatsa <ayushvatsa1810@gmail.com> wrote:

Why are you building from source instead of using a packaged solution?

Re: Assistance Needed: Error during PostgreSQL Configuration

From
Tom Lane
Date:
Ayush Vatsa <ayushvatsa1810@gmail.com> writes:
> Sorry, I should have included the required information initially itself. I
> am new to the database field so please pardon my mistakes :)

You still didn't mention the platform/environment, but I guess from
the reference to -isysroot that it must be macOS (Darwin).  I further
guess that you're using Homebrew or MacPorts, because bare macOS
doesn't supply GNU sed.  That doesn't get us much further though;
plenty of Postgres developers use one or the other of those setups
without difficulty.

One idea that comes to mind is that you might be trying to build in
a directory path that contains spaces or other odd characters.
That's generally not well supported by Unix-based tooling.
However, I'm not sure how that'd lead to this particular failure.

The only other idea I have is that maybe you have some weird
Homebrew or MacPorts package installed that changes the behavior
of your shell.  I have no idea what that would be though.

FWIW, on my own Mac laptop, line 486 in config.status in a
current build looks like

    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;

which seems identical to what you reported.  So that takes some
steam out of the idea that the file was generated incorrectly
in your build, pointing more to the idea that your shell is not
reading it as-expected.

            regards, tom lane



Re: Assistance Needed: Error during PostgreSQL Configuration

From
Ayush Vatsa
Date:

On Tue, 12 Dec 2023 at 22:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Ayush Vatsa <ayushvatsa1810@gmail.com> writes:
> Sorry, I should have included the required information initially itself. I
> am new to the database field so please pardon my mistakes :)

You still didn't mention the platform/environment, but I guess from
the reference to -isysroot that it must be macOS (Darwin).  I further
guess that you're using Homebrew or MacPorts, because bare macOS
doesn't supply GNU sed.  That doesn't get us much further though;
plenty of Postgres developers use one or the other of those setups
without difficulty.

One idea that comes to mind is that you might be trying to build in
a directory path that contains spaces or other odd characters.
That's generally not well supported by Unix-based tooling.
However, I'm not sure how that'd lead to this particular failure.

The only other idea I have is that maybe you have some weird
Homebrew or MacPorts package installed that changes the behavior
of your shell.  I have no idea what that would be though.

FWIW, on my own Mac laptop, line 486 in config.status in a
current build looks like

    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;

which seems identical to what you reported.  So that takes some
steam out of the idea that the file was generated incorrectly
in your build, pointing more to the idea that your shell is not
reading it as-expected.

                        regards, tom lane