rajeshveerepalli / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

Error during installation: "-fstack-protector", `ssp-buffer-size' #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Log on to CentOS release 5.2 (Final)
2. Extract 2.1.6 zip and run "python setup.py build"

What is the expected output? What do you see instead?

pyodbc probably should compile, instead I'm getting error:

gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-
D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 
-m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -DPYODBC_MAJOR=2 -
DPYODBC_MINOR=1 -DPYODBC_MICRO=6 -DPYODBC_BUILD=0 -I/usr/include/python2.4 
-c /home/chernm/pyodbc-2.1.6/src/connection.cpp -o build/temp.linux-x86_64-
2.4/home/chernm/pyodbc-2.1.6/src/connection.o -Wno-write-strings
cc1plus: error: unrecognized command line option "-fstack-protector"
cc1plus: error: invalid parameter `ssp-buffer-size'
/home/chernm/pyodbc-2.1.6/src/connection.cpp:1: error: bad value (generic) 
for -mtune= switch
error: command 'gcc' failed with exit status 1

What version of the product are you using? On what operating system?
2.1.6, CentOS 5.2

Please provide any additional information below.

Original issue reported on code.google.com by maxim.ch...@gmail.com on 11 Nov 2009 at 6:16

GoogleCodeExporter commented 8 years ago
Forgot to mention Python version:
Python 2.4.3 (#1, May 24 2008, 13:57:05)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2

Original comment by maxim.ch...@gmail.com on 11 Nov 2009 at 6:17

GoogleCodeExporter commented 8 years ago
What is happening is the Python distutils library, which is responsible for
generating the compilation command line is passing two values that GCC 4.1.2 
doesn't
recognize:

  cc1plus: error: unrecognized command line option "-fstack-protector"
  cc1plus: error: invalid parameter `ssp-buffer-size'

If I am thinking about this correctly, I believe it means that Python was 
compiled
with these flags by CentOS, but the version of GCC provided does not recognize 
them.

It is also possible that Python's distutils generated incorrect flags and that 
Python
*wasn't* compiled that way.

The versions look correct.  Can you compile any Python C extensions?  I would 
expect
them all to fail the same way (since pyodbc isn't generating the command line). 
Also, try asking on the CentOS forums also.  Perhaps someone has seen this 
before.

Original comment by mkleehammer on 11 Nov 2009 at 7:34

GoogleCodeExporter commented 8 years ago
Thank you for prompt reply - you're right, other packages don't too. 

- python and gcc were not compiled but were installed with "yum install". I'll 
try to 
get the latest versions now.

I've doublechecked I have the latest gcc and python:

[root@hashed ~]# yum update python
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
 * base: mirror.rackspace.com
 * updates: pubmirrors.reflected.net
 * addons: mirrors.netdna.com
 * extras: www.muug.mb.ca
Setting up Update Process
Could not find update match for python
No Packages marked for Update
[root@hashed ~]# yum update gcc
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
 * base: mirror.rackspace.com
 * updates: pubmirrors.reflected.net
 * addons: mirrors.netdna.com
 * extras: mirrors.cmich.edu
Setting up Update Process
Could not find update match for gcc
No Packages marked for Update

Google gives no answers so far.

Thank you for help

Original comment by maxim.ch...@gmail.com on 11 Nov 2009 at 7:51

GoogleCodeExporter commented 8 years ago
Got it working on clean Ubuntu 9.04 after installing unixodbc-dev, gcc and some 
development stuff.

Thank you, 

Will try a clean CentOS 5.3

Original comment by maxim.ch...@gmail.com on 12 Nov 2009 at 4:51

GoogleCodeExporter commented 8 years ago
compiled it after uninstalling/reinstalling "gcc-c++" package. Thank you.

Original comment by maxim.ch...@gmail.com on 15 Nov 2009 at 4:14

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 31 Dec 2009 at 6:38

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 21 Nov 2010 at 4:43