Saturday, April 25, 2020

pywatchman/bser.c:31:20: error: Python.h: No such file or directory

pywatchman/bser.c:31:20: error: Python.h: No such file or directory
pywatchman/bser.c:68: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
pywatchman/bser.c:73: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bserobj_tuple_length’
pywatchman/bser.c:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:85: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bserobj_sq’
pywatchman/bser.c:96: error: expected ‘)’ before ‘*’ token
pywatchman/bser.c:104: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:138: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bserobj_map’
pywatchman/bser.c:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bserObjectType’
pywatchman/bser.c:186: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:196: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘next_power_2’
pywatchman/bser.c:213: error: expected declaration specifiers or ‘...’ before ‘uint32_t’
pywatchman/bser.c: In function ‘bser_append’:
pywatchman/bser.c:215: warning: implicit declaration of function ‘next_power_2’
pywatchman/bser.c:215: error: ‘len’ undeclared (first use in this function)
pywatchman/bser.c:215: error: (Each undeclared identifier is reported only once
pywatchman/bser.c:215: error: for each function it appears in.)
pywatchman/bser.c:217: warning: implicit declaration of function ‘realloc’
pywatchman/bser.c:217: warning: incompatible implicit declaration of built-in function ‘realloc’
pywatchman/bser.c:226: warning: implicit declaration of function ‘memcpy’
pywatchman/bser.c:226: warning: incompatible implicit declaration of built-in function ‘memcpy’
pywatchman/bser.c: In function ‘bser_init’:
pywatchman/bser.c:235: warning: implicit declaration of function ‘malloc’
pywatchman/bser.c:235: warning: incompatible implicit declaration of built-in function ‘malloc’
pywatchman/bser.c:245: error: too many arguments to function ‘bser_append’
pywatchman/bser.c: In function ‘bser_dtor’:
pywatchman/bser.c:252: warning: implicit declaration of function ‘free’
pywatchman/bser.c:252: warning: incompatible implicit declaration of built-in function ‘free’
pywatchman/bser.c:253: error: ‘NULL’ undeclared (first use in this function)
pywatchman/bser.c: At top level:
pywatchman/bser.c:256: error: expected declaration specifiers or ‘...’ before ‘int64_t’
pywatchman/bser.c: In function ‘bser_long’:
pywatchman/bser.c:258: error: ‘int8_t’ undeclared (first use in this function)
pywatchman/bser.c:258: error: expected ‘;’ before ‘i8’
pywatchman/bser.c:259: error: ‘int16_t’ undeclared (first use in this function)
pywatchman/bser.c:259: error: expected ‘;’ before ‘i16’
pywatchman/bser.c:260: error: ‘int32_t’ undeclared (first use in this function)
pywatchman/bser.c:260: error: expected ‘;’ before ‘i32’
pywatchman/bser.c:261: error: ‘int64_t’ undeclared (first use in this function)
pywatchman/bser.c:261: error: expected ‘;’ before ‘i64’
pywatchman/bser.c:263: error: ‘val’ undeclared (first use in this function)
pywatchman/bser.c:263: error: expected ‘)’ before ‘val’
pywatchman/bser.c:263: error: expected ‘)’ before ‘val’
pywatchman/bser.c:263: error: expected ‘)’ before ‘val’
pywatchman/bser.c:269: error: ‘i8’ undeclared (first use in this function)
pywatchman/bser.c:269: error: expected ‘;’ before ‘val’
pywatchman/bser.c:274: error: ‘i16’ undeclared (first use in this function)
pywatchman/bser.c:274: error: expected ‘;’ before ‘val’
pywatchman/bser.c:279: error: ‘i32’ undeclared (first use in this function)
pywatchman/bser.c:279: error: expected ‘;’ before ‘val’
pywatchman/bser.c:284: error: ‘i64’ undeclared (first use in this function)
pywatchman/bser.c:284: error: expected ‘;’ before ‘val’
pywatchman/bser.c:288: warning: implicit declaration of function ‘PyErr_SetString’
pywatchman/bser.c:288: error: ‘PyExc_RuntimeError’ undeclared (first use in this function)
pywatchman/bser.c:293: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:297: error: too many arguments to function ‘bser_append’
pywatchman/bser.c: At top level:
pywatchman/bser.c:300: error: expected declaration specifiers or ‘...’ before ‘PyObject’
pywatchman/bser.c: In function ‘bser_string’:
pywatchman/bser.c:302: error: ‘NULL’ undeclared (first use in this function)
pywatchman/bser.c:303: error: ‘Py_ssize_t’ undeclared (first use in this function)
pywatchman/bser.c:303: error: expected ‘;’ before ‘len’
pywatchman/bser.c:305: error: ‘PyObject’ undeclared (first use in this function)
pywatchman/bser.c:305: error: ‘utf’ undeclared (first use in this function)
pywatchman/bser.c:307: warning: implicit declaration of function ‘PyUnicode_Check’
pywatchman/bser.c:307: error: ‘sval’ undeclared (first use in this function)
pywatchman/bser.c:308: warning: implicit declaration of function ‘PyUnicode_AsEncodedString’
pywatchman/bser.c:312: warning: implicit declaration of function ‘PyString_AsStringAndSize’
pywatchman/bser.c:312: error: ‘len’ undeclared (first use in this function)
pywatchman/bser.c:318: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:323: error: too many arguments to function ‘bser_long’
pywatchman/bser.c:328: error: ‘UINT32_MAX’ undeclared (first use in this function)
pywatchman/bser.c:329: warning: implicit declaration of function ‘PyErr_Format’
pywatchman/bser.c:329: error: ‘PyExc_ValueError’ undeclared (first use in this function)
pywatchman/bser.c:334: error: ‘uint32_t’ undeclared (first use in this function)
pywatchman/bser.c:334: error: expected ‘)’ before ‘len’
pywatchman/bser.c:334: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:338: warning: implicit declaration of function ‘Py_DECREF’
pywatchman/bser.c: At top level:
pywatchman/bser.c:344: error: expected declaration specifiers or ‘...’ before ‘PyObject’
pywatchman/bser.c: In function ‘bser_recursive’:
pywatchman/bser.c:346: warning: implicit declaration of function ‘PyBool_Check’
pywatchman/bser.c:346: error: ‘val’ undeclared (first use in this function)
pywatchman/bser.c:347: error: ‘Py_True’ undeclared (first use in this function)
pywatchman/bser.c:348: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:350: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:353: error: ‘Py_None’ undeclared (first use in this function)
pywatchman/bser.c:354: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:357: warning: implicit declaration of function ‘PyInt_Check’
pywatchman/bser.c:358: warning: implicit declaration of function ‘PyInt_AS_LONG’
pywatchman/bser.c:358: error: too many arguments to function ‘bser_long’
pywatchman/bser.c:361: warning: implicit declaration of function ‘PyLong_Check’
pywatchman/bser.c:362: warning: implicit declaration of function ‘PyLong_AsLongLong’
pywatchman/bser.c:362: error: too many arguments to function ‘bser_long’
pywatchman/bser.c:365: warning: implicit declaration of function ‘PyString_Check’
pywatchman/bser.c:366: error: too many arguments to function ‘bser_string’
pywatchman/bser.c:370: warning: implicit declaration of function ‘PyFloat_Check’
pywatchman/bser.c:371: warning: implicit declaration of function ‘PyFloat_AS_DOUBLE’
pywatchman/bser.c:374: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:378: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:381: warning: implicit declaration of function ‘PyList_Check’
pywatchman/bser.c:382: error: ‘Py_ssize_t’ undeclared (first use in this function)
pywatchman/bser.c:382: error: expected ‘;’ before ‘i’
pywatchman/bser.c:384: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:388: error: ‘len’ undeclared (first use in this function)
pywatchman/bser.c:388: error: too many arguments to function ‘bser_long’
pywatchman/bser.c:392: error: ‘i’ undeclared (first use in this function)
pywatchman/bser.c:393: error: ‘PyObject’ undeclared (first use in this function)
pywatchman/bser.c:393: error: ‘ele’ undeclared (first use in this function)
pywatchman/bser.c:393: warning: implicit declaration of function ‘PyList_GET_ITEM’
pywatchman/bser.c:395: error: too many arguments to function ‘bser_recursive’
pywatchman/bser.c:403: warning: implicit declaration of function ‘PyTuple_Check’
pywatchman/bser.c:404: error: expected ‘;’ before ‘i’
pywatchman/bser.c:406: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:410: error: too many arguments to function ‘bser_long’
pywatchman/bser.c:415: warning: implicit declaration of function ‘PyTuple_GET_ITEM’
pywatchman/bser.c:417: error: too many arguments to function ‘bser_recursive’
pywatchman/bser.c:425: warning: implicit declaration of function ‘PyMapping_Check’
pywatchman/bser.c:426: error: expected ‘;’ before ‘len’
pywatchman/bser.c:427: error: expected ‘;’ before ‘pos’
pywatchman/bser.c:428: error: ‘key’ undeclared (first use in this function)
pywatchman/bser.c:428: warning: left-hand operand of comma expression has no effect
pywatchman/bser.c:430: error: too many arguments to function ‘bser_append’
pywatchman/bser.c:434: error: too many arguments to function ‘bser_long’
pywatchman/bser.c:438: warning: implicit declaration of function ‘PyDict_Next’
pywatchman/bser.c:438: error: ‘pos’ undeclared (first use in this function)
pywatchman/bser.c:439: error: too many arguments to function ‘bser_string’
pywatchman/bser.c:442: error: too many arguments to function ‘bser_recursive’
pywatchman/bser.c:450: error: ‘PyExc_ValueError’ undeclared (first use in this function)
pywatchman/bser.c: At top level:
pywatchman/bser.c:454: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:487: error: expected declaration specifiers or ‘...’ before ‘int64_t’
pywatchman/bser.c: In function ‘bunser_int’:
pywatchman/bser.c:491: error: ‘int8_t’ undeclared (first use in this function)
pywatchman/bser.c:491: error: expected ‘;’ before ‘i8’
pywatchman/bser.c:492: error: ‘int16_t’ undeclared (first use in this function)
pywatchman/bser.c:492: error: expected ‘;’ before ‘i16’
pywatchman/bser.c:493: error: ‘int32_t’ undeclared (first use in this function)
pywatchman/bser.c:493: error: expected ‘;’ before ‘i32’
pywatchman/bser.c:494: error: ‘int64_t’ undeclared (first use in this function)
pywatchman/bser.c:494: error: expected ‘;’ before ‘i64’
pywatchman/bser.c:510: error: ‘PyExc_ValueError’ undeclared (first use in this function)
pywatchman/bser.c:521: warning: incompatible implicit declaration of built-in function ‘memcpy’
pywatchman/bser.c:521: error: ‘i8’ undeclared (first use in this function)
pywatchman/bser.c:522: error: ‘val’ undeclared (first use in this function)
pywatchman/bser.c:525: error: ‘i16’ undeclared (first use in this function)
pywatchman/bser.c:529: error: ‘i32’ undeclared (first use in this function)
pywatchman/bser.c:533: error: ‘i64’ undeclared (first use in this function)
pywatchman/bser.c: At top level:
pywatchman/bser.c:542: error: expected declaration specifiers or ‘...’ before ‘int64_t’
pywatchman/bser.c: In function ‘bunser_string’:
pywatchman/bser.c:548: error: ‘len’ undeclared (first use in this function)
pywatchman/bser.c:548: error: too many arguments to function ‘bunser_int’
pywatchman/bser.c:553: error: ‘PyExc_ValueError’ undeclared (first use in this function)
pywatchman/bser.c: At top level:
pywatchman/bser.c:562: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:605: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:674: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:775: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:858: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:893: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pywatchman/bser.c:934: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bser_methods’
pywatchman/bser.c:941: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initbser’
error: command 'gcc' failed with exit status 1
make[1]: *** [py-build] Error 1
make[1]: Leaving directory `/tmp/watchman'
make: *** [all] Error 2



Solution:
Install python-devel for Redhat/Centos
yum install python-devel
Install python-dev Ubuntu 
apt-get install python-dev

No comments:

Post a Comment