My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 130: Alloca isn't declared automagicaly on Solaris 10, breaks build
1 person starred this issue and may be notified of changes. Back to list
Status:  Complete
Owner:  ----
Closed:  Nov 2010


 
Reported by pedri...@gmail.com, Oct 21, 2010
What steps will reproduce the problem?
1. Use a solaris 10 box
2. python setup.py build
3. gcc complains about no declaration for alloca

What is the expected output? What do you see instead?
continued compilation is expected, actual output looks like this:
gcc -DNDEBUG -g -O3 -m64 -g -I/usr/local/include -fPIC -DPYODBC_VERSION=2.1.8 -c /tmp/pyodbc-2.1.8/src/getdata.cpp -o build/temp.solaris-2.10-i86pc-2.6/tmp/pyodbc-2.1.8/src/getdata.o -Wno-write-strings
/tmp/pyodbc-2.1.8/src/getdata.cpp: In function 'PyObject* GetDataDecimal(Cursor*, Py_ssize_t)':
/tmp/pyodbc-2.1.8/src/getdata.cpp:401: error: 'alloca' was not declared in this scope
error: command 'gcc' failed with exit status 1


What version of the product are you using? On what operating system?
2.1.8 on Solaris 10

Please provide any additional information below.

To fix:
--- pyodbc.h.dist       2010-10-21 18:38:21.394755226 -0400
+++ pyodbc.h    2010-10-21 18:38:25.759881525 -0400
@@ -47,6 +47,7 @@
 #include <unicodeobject.h>
 #include <structmember.h>
 #include <datetime.h>
+#include <alloca.h>

 // Whoever wrote the datetime C module declared a static variable in the header file.  A properly conforming C/C++
 // compiler will create a new copy in every source file, meaning you can't set the value globally.  Criminy.  We'll

Nov 21, 2010
Project Member #1 mkleehammer
Fixed in 2.1.9-beta01 4d39e500d9ae43542d27dadb77a40fe9213d6edc

Status: Complete
Nov 22, 2010
#2 pedri...@gmail.com
I see that a macro called __SUN__ is being tested now, but it doesn't appear to be defined on a solaris box:

/tmp/pyodbc/src/getdata.cpp: In function 'PyObject* GetDataDecimal(Cursor*, Py_ssize_t)':
/tmp/pyodbc/src/getdata.cpp:401: error: 'alloca' was not declared in this scope
error: command 'gcc' failed with exit status 1
/tmp/pyodbc $ ls
/tmp/pyodbc $ uname -a
SunOS sys2 5.10 Generic_142901-13 i86pc i386 i86pc Solaris

Powered by Google Project Hosting