Assistance Needed: Error during PostgreSQL Configuration

Started by Ayush Vatsaover 2 years ago7 messagesgeneral
Jump to latest
#1Ayush 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 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

#2Ian Lawrence Barwick
barwick@gmail.com
In reply to: Ayush Vatsa (#1)
Re: Assistance Needed: Error during PostgreSQL Configuration

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 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.

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 suggestions you 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

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ian Lawrence Barwick (#2)
Re: Assistance Needed: Error during PostgreSQL Configuration

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

#4Ayush Vatsa
ayushvatsa1810@gmail.com
In reply to: Tom Lane (#3)
Re: Assistance Needed: Error during PostgreSQL Configuration

Hi,
Sorry, I should have included the required information initially itself. I
am new to the database field so please pardon my mistakes :)
What I have done till now is clone the source code files from Gihub in my
Mac laptop and then try to follow this documentation
<https://www.postgresql.org/docs/current/install-make.html&gt;, then I got an
error posted in the mail in the very first step itself i.e. ./configure
command.

The PostgreSQL version is the latest (i.e. 16) as I have cloned the source
code from GitHub.
I have tried using both shells including zsh and bash here but same response
For sed, I am using GNU sed and also included this GNU sed in the PATH
variable

ayuvatsa@bcd0745f2da7 ~ % sed --version

sed (GNU sed) 4.9

The configure script runs fine till the step given below:

configure: using CPPFLAGS=-isysroot $(PG_SYSROOT)

configure: using LDFLAGS=-isysroot $(PG_SYSROOT) -Wl,-dead_strip_dylibs

configure: creating ./config.status

Thanks
Ayush Vatsa

On Mon, 11 Dec 2023 at 20:20, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Show quoted text

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

#5Ron
ronljohnsonjr@gmail.com
In reply to: Ayush Vatsa (#4)
Re: Assistance Needed: Error during PostgreSQL Configuration

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

Hi,
Sorry, I should have included the required information initially itself. I
am new to the database field so please pardon my mistakes

Why are you building from source instead of using a packaged solution?
https://www.postgresql.org/download/macosx/

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ayush Vatsa (#4)
Re: Assistance Needed: Error during PostgreSQL Configuration

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

#7Ayush Vatsa
ayushvatsa1810@gmail.com
In reply to: Tom Lane (#6)
Re: Assistance Needed: Error during PostgreSQL Configuration

Hi all,
@Ron Johnson, I am building from the source because I wanted to contribute
to the open-source community, and for that, I want the source files. I had
a few things in mind currently for the same :).
@Tom Lane <tgl@sss.pgh.pa.us>, Thanks I am using a directory path with
spaces in it, and removing them solved my issue. Next time I will use '_'
in paths to be on the safer side.

Thanks and regards
Ayush Vatsa
SDE Amazon

On Tue, 12 Dec 2023 at 22:10, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Show quoted text

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