Re: Need help with the installation of psycopg2 module in a python virtual env - Mailing list psycopg

From Daniele Varrazzo
Subject Re: Need help with the installation of psycopg2 module in a python virtual env
Date
Msg-id CA+mi_8b6drtX103x8HSxh329MtARvoe7_cG6iDv8gR5W=fPyHQ@mail.gmail.com
Whole thread Raw
In response to Need help with the installation of psycopg2 module in a python virtual env  ("Vamsi Krishna Reddy -T (vamsredd - TATA CONSULTANCY SERVICES LIMITED at Cisco)" <vamsredd@cisco.com>)
Responses Re: Need help with the installation of psycopg2 module in a python virtual env  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
List psycopg
Hello,

On Fri, Apr 17, 2015 at 7:27 PM, Vamsi Krishna Reddy -T (vamsredd -
TATA CONSULTANCY SERVICES LIMITED at Cisco) <vamsredd@cisco.com>
wrote:
> gcc -pthread -m32 -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -m32 -fPIC
-DPSYCOPG_DEFAULT_PYDATETIME=1-DPSYCOPG_VERSION="2.6 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x080414
-I/ws/vamsredd-bxb/pyats_cel/include-I/auto/pysw/cel63/python/3.4.1/include/python3.4m -I. -I/usr/include
-I/usr/include/pgsql/server-c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.4/psycopg/psycopgmodule.o
-Wdeclaration-after-statement
>
> gcc.orig: (dt: No such file or directory
> gcc.orig: dec: No such file or directory
> gcc.orig: pq3: No such file or directory
> gcc.orig: ext)": No such file or directory
> <command-line>: warning: missing terminating " character
> psycopg/psycopgmodule.c: In function 'PyInit__psycopg':
> psycopg/psycopgmodule.c:877: error: missing terminating " character
> psycopg/psycopgmodule.c:877: error: expected expression before ')' token
> error: command 'gcc' failed with exit status 1

This is strange: it seems a problem with the quotes in the shell. What
is the shell used by your appliance?

The command seems ok in itself, but from the errors it seems that
-DPSYCOPG_VERSION= is parsed without accounting for the quotes, so it
stops at the 2.6 and the rest of the string is taken as separate
tokens. Even the closing quote after 'ext)' is joined to the string,
reinforcing the impression.

What happens if you run the above command pasting it in the shell?

It seems that your "gcc" command is a wrapper calling into "gcc.orig".
I suspect there's a bug in that wrapper messing up with the quotes.

-- Daniele


psycopg by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Need help with the installation of psycopg2 module in a python virtual env
Next
From: Daniele Varrazzo
Date:
Subject: Re: Need help with the installation of psycopg2 module in a python virtual env