c - unknown type name 'glp_long' (mac osx python, pyglpk) -


i'm trying install pyglpk-0.3 use cobrapie, python version of matlab cobra toolbox. everytime start installation, following errors: (a part of it)

c -i/users/gadreel/anaconda/include/python2.7 -c src/tree.c -o build/temp.macosx-10.5-x86_64-2.7  /src/tree.o -m32 /usr/bin/clang -fno-strict-aliasing -i/users/gadreel/anaconda/include -arch x86_64 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -i/opt/local/include -isrc -i/users/gadreel/anaconda/include/python2.7 -c src/environment.c -o build/temp.macosx-10.5-x86_64-2.7/src/environment.o -m32 src/environment.c:80:26: error: unknown type name 'glp_long' static pyobject* long2py(glp_long l) {                          ^ src/environment.c:75:18: note: expanded macro 'glp_long' #define glp_long glp_long                  ^ src/environment.c:90:3: error: use of undeclared identifier 'glp_long'   glp_long b;   ^ src/environment.c:75:18: note: expanded macro 'glp_long' #define glp_long glp_long                  ^ src/environment.c:91:30: error: use of undeclared identifier 'b'   glp_mem_usage(null, null, &b, null);                              ^ src/environment.c:92:18: error: use of undeclared identifier 'b'   return long2py(b);                  ^ src/environment.c:97:3: error: use of undeclared identifier 'glp_long'   glp_long b;   ^ src/environment.c:75:18: note: expanded macro 'glp_long' #define glp_long glp_long                  ^ src/environment.c:98:36: error: use of undeclared identifier 'b'   glp_mem_usage(null, null, null, &b);                                    ^ src/environment.c:99:18: error: use of undeclared identifier 'b'   return long2py(b);                  ^ 7 errors generated. error: command '/usr/bin/clang' failed exit status 1 make: *** [all] error 1 

and here part of mentioned c file:

static pyobject* environment_getblocks_peak(environmentobject *self,                        void *closure) {   int cpeak;   glp_mem_usage(null, &cpeak, null, null);   return pyint_fromlong(cpeak); }  #if glpk_version(4,28) #define glp_long glp_long #else #define glp_long glp_ulong #endif  static pyobject* long2py(glp_long l) {   if ((l.hi==0 && l.lo>=0) || (l.hi==-1 && l.lo<0))     return pyint_fromlong(l.lo);   py_long_long ll = l.hi;   ll <<= 32;   ll |= (unsigned int)l.lo;   return pylong_fromlonglong(ll); }  static pyobject* environment_getbytes(environmentobject *self,void *closure) {   glp_long b;   glp_mem_usage(null, null, &b, null);   return long2py(b); } 

do miss install? use python 2.7.5 |anaconda 1.6.1 (x86_64)| , glpk @4.48_0 (active) osx 10.8.4

for me had downgrade glpk way down 4.39 later versions encounter glp_long issue.


Comments