Giter VIP home page Giter VIP logo

pytracemalloc's People

Contributors

amirouche avatar cmuller avatar timgates42 avatar vstinner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytracemalloc's Issues

problem installing module

When trying to install the module with
Python-2.7.5\PCbuild\python.exe setup.py install

i get the following error:
Traceback (most recent call last):
File "setup.py", line 103, in
main()
File "setup.py", line 55, in main
pythonapi = ctypes.cdll.LoadLibrary(None)
File "Python-2.7.5\lib\ctypes__init__.py", line 443, in LoadLibrary
return self.dlltype(name)
File "Python-2.7.5\lib\ctypes__init
_.py", line 365, in init
self._handle = _dlopen(self._name, mode)
TypeError: expected string or Unicode object, NoneType found

Problem installing on Ubuntu 64 bit Python 2.7.8

This looks like the same error as this readthedocs build:
https://readthedocs.org/builds/pytracemalloc/1762048/

pip install -U pytracemalloc
Downloading/unpacking pytracemalloc
  Downloading pytracemalloc-1.2.tar.gz (42kB): 42kB downloaded
  Running setup.py (path:/mnt/data/home/stu/.virtualenvs/tmpv/build/pytracemalloc/setup.py) egg_info for package pytracemalloc
    WARNING: PyMem_SetAllocator: missing, /mnt/data/home/stu/.virtualenvs/tmpv/bin/python has not been patched

    warning: no files found matching 'TODO'
Installing collected packages: pytracemalloc
  Running setup.py install for pytracemalloc
    WARNING: PyMem_SetAllocator: missing, /mnt/data/home/stu/.virtualenvs/tmpv/bin/python has not been patched
    building '_tracemalloc' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _tracemalloc.c -o build/temp.linux-x86_64-2.7/_tracemalloc.o -DNDEBUG
    _tracemalloc.c:50:5: error: unknown type name ‘PyMemAllocator’
         PyMemAllocator mem;
         ^
    _tracemalloc.c:51:5: error: unknown type name ‘PyMemAllocator’
         PyMemAllocator raw;
         ^
    _tracemalloc.c:52:5: error: unknown type name ‘PyMemAllocator’
         PyMemAllocator obj;
         ^
    _tracemalloc.c: In function ‘raw_malloc’:
    _tracemalloc.c:250:26: error: request for member ‘malloc’ in something not a structure or union
         return allocators.raw.malloc(allocators.raw.ctx, size);
                              ^
    _tracemalloc.c:250:48: error: request for member ‘ctx’ in something not a structure or union
         return allocators.raw.malloc(allocators.raw.ctx, size);
                                                    ^
    _tracemalloc.c: In function ‘raw_free’:
    _tracemalloc.c:256:19: error: request for member ‘free’ in something not a structure or union
         allocators.raw.free(allocators.raw.ctx, ptr);
                       ^
    _tracemalloc.c:256:39: error: request for member ‘ctx’ in something not a structure or union
         allocators.raw.free(allocators.raw.ctx, ptr);
                                           ^
    _tracemalloc.c: In function ‘tracemalloc_malloc’:
    _tracemalloc.c:511:5: error: unknown type name ‘PyMemAllocator’
         PyMemAllocator *alloc = (PyMemAllocator *)ctx;
         ^
    _tracemalloc.c:511:30: error: ‘PyMemAllocator’ undeclared (first use in this function)
         PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                  ^
    _tracemalloc.c:511:30: note: each undeclared identifier is reported only once for each function it appears in
    _tracemalloc.c:511:46: error: expected expression before ‘)’ token
         PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                                  ^
    _tracemalloc.c:514:16: error: request for member ‘malloc’ in something not a structure or union
         ptr = alloc->malloc(alloc->ctx, size);
                    ^
    _tracemalloc.c:514:30: error: request for member ‘ctx’ in something not a structure or union
         ptr = alloc->malloc(alloc->ctx, size);
                                  ^
    _tracemalloc.c:522:14: error: request for member ‘free’ in something not a structure or union
             alloc->free(alloc->ctx, ptr);
                  ^
    _tracemalloc.c:522:26: error: request for member ‘ctx’ in something not a structure or union
             alloc->free(alloc->ctx, ptr);
                              ^
    _tracemalloc.c: In function ‘tracemalloc_realloc’:
    _tracemalloc.c:532:5: error: unknown type name ‘PyMemAllocator’
         PyMemAllocator *alloc = (PyMemAllocator *)ctx;
         ^
    _tracemalloc.c:532:30: error: ‘PyMemAllocator’ undeclared (first use in this function)
         PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                  ^
    _tracemalloc.c:532:46: error: expected expression before ‘)’ token
         PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                                  ^
    _tracemalloc.c:535:17: error: request for member ‘realloc’ in something not a structure or union
         ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);
                     ^
    _tracemalloc.c:535:32: error: request for member ‘ctx’ in something not a structure or union
         ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);
                                    ^
    _tracemalloc.c:566:18: error: request for member ‘free’ in something not a structure or union
                 alloc->free(alloc->ctx, ptr2);
                      ^
    _tracemalloc.c:566:30: error: request for member ‘ctx’ in something not a structure or union
                 alloc->free(alloc->ctx, ptr2);
                                  ^
    _tracemalloc.c: In function ‘tracemalloc_free’:
    _tracemalloc.c:577:5: error: unknown type name ‘PyMemAllocator’
         PyMemAllocator *alloc = (PyMemAllocator *)ctx;
         ^
    _tracemalloc.c:577:30: error: ‘PyMemAllocator’ undeclared (first use in this function)
         PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                  ^
    _tracemalloc.c:577:46: error: expected expression before ‘)’ token
         PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                                  ^
    _tracemalloc.c:585:10: error: request for member ‘free’ in something not a structure or union
         alloc->free(alloc->ctx, ptr);
              ^
    _tracemalloc.c:585:22: error: request for member ‘ctx’ in something not a structure or union
         alloc->free(alloc->ctx, ptr);
                          ^
    _tracemalloc.c: In function ‘tracemalloc_malloc_gil’:
    _tracemalloc.c:598:9: error: unknown type name ‘PyMemAllocator’
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
             ^
    _tracemalloc.c:598:34: error: ‘PyMemAllocator’ undeclared (first use in this function)
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                      ^
    _tracemalloc.c:598:50: error: expected expression before ‘)’ token
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                                      ^
    _tracemalloc.c:599:21: error: request for member ‘malloc’ in something not a structure or union
             return alloc->malloc(alloc->ctx, size);
                         ^
    _tracemalloc.c:599:35: error: request for member ‘ctx’ in something not a structure or union
             return alloc->malloc(alloc->ctx, size);
                                       ^
    _tracemalloc.c: In function ‘tracemalloc_realloc_gil’:
    _tracemalloc.c:623:9: error: unknown type name ‘PyMemAllocator’
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
             ^
    _tracemalloc.c:623:34: error: ‘PyMemAllocator’ undeclared (first use in this function)
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                      ^
    _tracemalloc.c:623:50: error: expected expression before ‘)’ token
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                                      ^
    _tracemalloc.c:625:21: error: request for member ‘realloc’ in something not a structure or union
             ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);
                         ^
    _tracemalloc.c:625:36: error: request for member ‘ctx’ in something not a structure or union
             ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);
                                        ^
    _tracemalloc.c: In function ‘tracemalloc_raw_malloc’:
    _tracemalloc.c:655:9: error: unknown type name ‘PyMemAllocator’
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
             ^
    _tracemalloc.c:655:34: error: ‘PyMemAllocator’ undeclared (first use in this function)
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                      ^
    _tracemalloc.c:655:50: error: expected expression before ‘)’ token
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                                      ^
    _tracemalloc.c:656:21: error: request for member ‘malloc’ in something not a structure or union
             return alloc->malloc(alloc->ctx, size);
                         ^
    _tracemalloc.c:656:35: error: request for member ‘ctx’ in something not a structure or union
             return alloc->malloc(alloc->ctx, size);
                                       ^
    _tracemalloc.c: In function ‘tracemalloc_raw_realloc’:
    _tracemalloc.c:686:9: error: unknown type name ‘PyMemAllocator’
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
             ^
    _tracemalloc.c:686:34: error: ‘PyMemAllocator’ undeclared (first use in this function)
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                      ^
    _tracemalloc.c:686:50: error: expected expression before ‘)’ token
             PyMemAllocator *alloc = (PyMemAllocator *)ctx;
                                                      ^
    _tracemalloc.c:688:21: error: request for member ‘realloc’ in something not a structure or union
             ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);
                         ^
    _tracemalloc.c:688:36: error: request for member ‘ctx’ in something not a structure or union
             ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);
                                        ^
    _tracemalloc.c: In function ‘tracemalloc_init’:
    _tracemalloc.c:765:5: warning: implicit declaration of function ‘PyMem_GetAllocator’ [-Wimplicit-function-declaration]
         PyMem_GetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);
         ^
    _tracemalloc.c:765:24: error: ‘PYMEM_DOMAIN_RAW’ undeclared (first use in this function)
         PyMem_GetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);
                            ^
    _tracemalloc.c: In function ‘tracemalloc_start’:
    _tracemalloc.c:907:5: error: unknown type name ‘PyMemAllocator’
         PyMemAllocator alloc;
         ^
    _tracemalloc.c:931:10: error: request for member ‘malloc’ in something not a structure or union
         alloc.malloc = tracemalloc_raw_malloc;
              ^
    _tracemalloc.c:932:10: error: request for member ‘realloc’ in something not a structure or union
         alloc.realloc = tracemalloc_raw_realloc;
              ^
    _tracemalloc.c:933:10: error: request for member ‘free’ in something not a structure or union
         alloc.free = tracemalloc_free;
              ^
    _tracemalloc.c:935:10: error: request for member ‘ctx’ in something not a structure or union
         alloc.ctx = &allocators.raw;
              ^
    _tracemalloc.c:936:24: error: ‘PYMEM_DOMAIN_RAW’ undeclared (first use in this function)
         PyMem_GetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);
                            ^
    _tracemalloc.c:937:5: warning: implicit declaration of function ‘PyMem_SetAllocator’ [-Wimplicit-function-declaration]
         PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &alloc);
         ^
    _tracemalloc.c:940:10: error: request for member ‘malloc’ in something not a structure or union
         alloc.malloc = tracemalloc_malloc_gil;
              ^
    _tracemalloc.c:941:10: error: request for member ‘realloc’ in something not a structure or union
         alloc.realloc = tracemalloc_realloc_gil;
              ^
    _tracemalloc.c:942:10: error: request for member ‘free’ in something not a structure or union
         alloc.free = tracemalloc_free;
              ^
    _tracemalloc.c:944:10: error: request for member ‘ctx’ in something not a structure or union
         alloc.ctx = &allocators.mem;
              ^
    _tracemalloc.c:945:24: error: ‘PYMEM_DOMAIN_MEM’ undeclared (first use in this function)
         PyMem_GetAllocator(PYMEM_DOMAIN_MEM, &allocators.mem);
                            ^
    _tracemalloc.c:948:10: error: request for member ‘ctx’ in something not a structure or union
         alloc.ctx = &allocators.obj;
              ^
    _tracemalloc.c:949:24: error: ‘PYMEM_DOMAIN_OBJ’ undeclared (first use in this function)
         PyMem_GetAllocator(PYMEM_DOMAIN_OBJ, &allocators.obj);
                            ^
    _tracemalloc.c: In function ‘tracemalloc_stop’:
    _tracemalloc.c:974:24: error: ‘PYMEM_DOMAIN_RAW’ undeclared (first use in this function)
         PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);
                            ^
    _tracemalloc.c:976:24: error: ‘PYMEM_DOMAIN_MEM’ undeclared (first use in this function)
         PyMem_SetAllocator(PYMEM_DOMAIN_MEM, &allocators.mem);
                            ^
    _tracemalloc.c:977:24: error: ‘PYMEM_DOMAIN_OBJ’ undeclared (first use in this function)
         PyMem_SetAllocator(PYMEM_DOMAIN_OBJ, &allocators.obj);
                            ^
    _tracemalloc.c: In function ‘raw_malloc’:
    _tracemalloc.c:251:1: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command /mnt/data/home/stu/.virtualenvs/tmpv/bin/python -c "import setuptools, tokenize;__file__='/mnt/data/home/stu/.virtualenvs/tmpv/build/pytracemalloc/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8wlxPH-record/install-record.txt --single-version-externally-managed --compile --install-headers /mnt/data/home/stu/.virtualenvs/tmpv/include/site/python2.7:
    WARNING: PyMem_SetAllocator: missing, /mnt/data/home/stu/.virtualenvs/tmpv/bin/python has not been patched

running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

copying tracemalloc.py -> build/lib.linux-x86_64-2.7

running build_ext

building '_tracemalloc' extension

creating build/temp.linux-x86_64-2.7

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c _tracemalloc.c -o build/temp.linux-x86_64-2.7/_tracemalloc.o -DNDEBUG

_tracemalloc.c:50:5: error: unknown type name ‘PyMemAllocator’

     PyMemAllocator mem;

     ^

_tracemalloc.c:51:5: error: unknown type name ‘PyMemAllocator’

     PyMemAllocator raw;

     ^

_tracemalloc.c:52:5: error: unknown type name ‘PyMemAllocator’

     PyMemAllocator obj;

     ^

_tracemalloc.c: In function ‘raw_malloc’:

_tracemalloc.c:250:26: error: request for member ‘malloc’ in something not a structure or union

     return allocators.raw.malloc(allocators.raw.ctx, size);

                          ^

_tracemalloc.c:250:48: error: request for member ‘ctx’ in something not a structure or union

     return allocators.raw.malloc(allocators.raw.ctx, size);

                                                ^

_tracemalloc.c: In function ‘raw_free’:

_tracemalloc.c:256:19: error: request for member ‘free’ in something not a structure or union

     allocators.raw.free(allocators.raw.ctx, ptr);

                   ^

_tracemalloc.c:256:39: error: request for member ‘ctx’ in something not a structure or union

     allocators.raw.free(allocators.raw.ctx, ptr);

                                       ^

_tracemalloc.c: In function ‘tracemalloc_malloc’:

_tracemalloc.c:511:5: error: unknown type name ‘PyMemAllocator’

     PyMemAllocator *alloc = (PyMemAllocator *)ctx;

     ^

_tracemalloc.c:511:30: error: ‘PyMemAllocator’ undeclared (first use in this function)

     PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                              ^

_tracemalloc.c:511:30: note: each undeclared identifier is reported only once for each function it appears in

_tracemalloc.c:511:46: error: expected expression before ‘)’ token

     PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                              ^

_tracemalloc.c:514:16: error: request for member ‘malloc’ in something not a structure or union

     ptr = alloc->malloc(alloc->ctx, size);

                ^

_tracemalloc.c:514:30: error: request for member ‘ctx’ in something not a structure or union

     ptr = alloc->malloc(alloc->ctx, size);

                              ^

_tracemalloc.c:522:14: error: request for member ‘free’ in something not a structure or union

         alloc->free(alloc->ctx, ptr);

              ^

_tracemalloc.c:522:26: error: request for member ‘ctx’ in something not a structure or union

         alloc->free(alloc->ctx, ptr);

                          ^

_tracemalloc.c: In function ‘tracemalloc_realloc’:

_tracemalloc.c:532:5: error: unknown type name ‘PyMemAllocator’

     PyMemAllocator *alloc = (PyMemAllocator *)ctx;

     ^

_tracemalloc.c:532:30: error: ‘PyMemAllocator’ undeclared (first use in this function)

     PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                              ^

_tracemalloc.c:532:46: error: expected expression before ‘)’ token

     PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                              ^

_tracemalloc.c:535:17: error: request for member ‘realloc’ in something not a structure or union

     ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);

                 ^

_tracemalloc.c:535:32: error: request for member ‘ctx’ in something not a structure or union

     ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);

                                ^

_tracemalloc.c:566:18: error: request for member ‘free’ in something not a structure or union

             alloc->free(alloc->ctx, ptr2);

                  ^

_tracemalloc.c:566:30: error: request for member ‘ctx’ in something not a structure or union

             alloc->free(alloc->ctx, ptr2);

                              ^

_tracemalloc.c: In function ‘tracemalloc_free’:

_tracemalloc.c:577:5: error: unknown type name ‘PyMemAllocator’

     PyMemAllocator *alloc = (PyMemAllocator *)ctx;

     ^

_tracemalloc.c:577:30: error: ‘PyMemAllocator’ undeclared (first use in this function)

     PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                              ^

_tracemalloc.c:577:46: error: expected expression before ‘)’ token

     PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                              ^

_tracemalloc.c:585:10: error: request for member ‘free’ in something not a structure or union

     alloc->free(alloc->ctx, ptr);

          ^

_tracemalloc.c:585:22: error: request for member ‘ctx’ in something not a structure or union

     alloc->free(alloc->ctx, ptr);

                      ^

_tracemalloc.c: In function ‘tracemalloc_malloc_gil’:

_tracemalloc.c:598:9: error: unknown type name ‘PyMemAllocator’

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

         ^

_tracemalloc.c:598:34: error: ‘PyMemAllocator’ undeclared (first use in this function)

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                  ^

_tracemalloc.c:598:50: error: expected expression before ‘)’ token

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                                  ^

_tracemalloc.c:599:21: error: request for member ‘malloc’ in something not a structure or union

         return alloc->malloc(alloc->ctx, size);

                     ^

_tracemalloc.c:599:35: error: request for member ‘ctx’ in something not a structure or union

         return alloc->malloc(alloc->ctx, size);

                                   ^

_tracemalloc.c: In function ‘tracemalloc_realloc_gil’:

_tracemalloc.c:623:9: error: unknown type name ‘PyMemAllocator’

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

         ^

_tracemalloc.c:623:34: error: ‘PyMemAllocator’ undeclared (first use in this function)

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                  ^

_tracemalloc.c:623:50: error: expected expression before ‘)’ token

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                                  ^

_tracemalloc.c:625:21: error: request for member ‘realloc’ in something not a structure or union

         ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);

                     ^

_tracemalloc.c:625:36: error: request for member ‘ctx’ in something not a structure or union

         ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);

                                    ^

_tracemalloc.c: In function ‘tracemalloc_raw_malloc’:

_tracemalloc.c:655:9: error: unknown type name ‘PyMemAllocator’

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

         ^

_tracemalloc.c:655:34: error: ‘PyMemAllocator’ undeclared (first use in this function)

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                  ^

_tracemalloc.c:655:50: error: expected expression before ‘)’ token

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                                  ^

_tracemalloc.c:656:21: error: request for member ‘malloc’ in something not a structure or union

         return alloc->malloc(alloc->ctx, size);

                     ^

_tracemalloc.c:656:35: error: request for member ‘ctx’ in something not a structure or union

         return alloc->malloc(alloc->ctx, size);

                                   ^

_tracemalloc.c: In function ‘tracemalloc_raw_realloc’:

_tracemalloc.c:686:9: error: unknown type name ‘PyMemAllocator’

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

         ^

_tracemalloc.c:686:34: error: ‘PyMemAllocator’ undeclared (first use in this function)

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                  ^

_tracemalloc.c:686:50: error: expected expression before ‘)’ token

         PyMemAllocator *alloc = (PyMemAllocator *)ctx;

                                                  ^

_tracemalloc.c:688:21: error: request for member ‘realloc’ in something not a structure or union

         ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);

                     ^

_tracemalloc.c:688:36: error: request for member ‘ctx’ in something not a structure or union

         ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);

                                    ^

_tracemalloc.c: In function ‘tracemalloc_init’:

_tracemalloc.c:765:5: warning: implicit declaration of function ‘PyMem_GetAllocator’ [-Wimplicit-function-declaration]

     PyMem_GetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);

     ^

_tracemalloc.c:765:24: error: ‘PYMEM_DOMAIN_RAW’ undeclared (first use in this function)

     PyMem_GetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);

                        ^

_tracemalloc.c: In function ‘tracemalloc_start’:

_tracemalloc.c:907:5: error: unknown type name ‘PyMemAllocator’

     PyMemAllocator alloc;

     ^

_tracemalloc.c:931:10: error: request for member ‘malloc’ in something not a structure or union

     alloc.malloc = tracemalloc_raw_malloc;

          ^

_tracemalloc.c:932:10: error: request for member ‘realloc’ in something not a structure or union

     alloc.realloc = tracemalloc_raw_realloc;

          ^

_tracemalloc.c:933:10: error: request for member ‘free’ in something not a structure or union

     alloc.free = tracemalloc_free;

          ^

_tracemalloc.c:935:10: error: request for member ‘ctx’ in something not a structure or union

     alloc.ctx = &allocators.raw;

          ^

_tracemalloc.c:936:24: error: ‘PYMEM_DOMAIN_RAW’ undeclared (first use in this function)

     PyMem_GetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);

                        ^

_tracemalloc.c:937:5: warning: implicit declaration of function ‘PyMem_SetAllocator’ [-Wimplicit-function-declaration]

     PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &alloc);

     ^

_tracemalloc.c:940:10: error: request for member ‘malloc’ in something not a structure or union

     alloc.malloc = tracemalloc_malloc_gil;

          ^

_tracemalloc.c:941:10: error: request for member ‘realloc’ in something not a structure or union

     alloc.realloc = tracemalloc_realloc_gil;

          ^

_tracemalloc.c:942:10: error: request for member ‘free’ in something not a structure or union

     alloc.free = tracemalloc_free;

          ^

_tracemalloc.c:944:10: error: request for member ‘ctx’ in something not a structure or union

     alloc.ctx = &allocators.mem;

          ^

_tracemalloc.c:945:24: error: ‘PYMEM_DOMAIN_MEM’ undeclared (first use in this function)

     PyMem_GetAllocator(PYMEM_DOMAIN_MEM, &allocators.mem);

                        ^

_tracemalloc.c:948:10: error: request for member ‘ctx’ in something not a structure or union

     alloc.ctx = &allocators.obj;

          ^

_tracemalloc.c:949:24: error: ‘PYMEM_DOMAIN_OBJ’ undeclared (first use in this function)

     PyMem_GetAllocator(PYMEM_DOMAIN_OBJ, &allocators.obj);

                        ^

_tracemalloc.c: In function ‘tracemalloc_stop’:

_tracemalloc.c:974:24: error: ‘PYMEM_DOMAIN_RAW’ undeclared (first use in this function)

     PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);

                        ^

_tracemalloc.c:976:24: error: ‘PYMEM_DOMAIN_MEM’ undeclared (first use in this function)

     PyMem_SetAllocator(PYMEM_DOMAIN_MEM, &allocators.mem);

                        ^

_tracemalloc.c:977:24: error: ‘PYMEM_DOMAIN_OBJ’ undeclared (first use in this function)

     PyMem_SetAllocator(PYMEM_DOMAIN_OBJ, &allocators.obj);

                        ^

_tracemalloc.c: In function ‘raw_malloc’:

_tracemalloc.c:251:1: warning: control reaches end of non-void function [-Wreturn-type]

 }

 ^

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /mnt/data/home/stu/.virtualenvs/tmpv/bin/python -c "import setuptools, tokenize;__file__='/mnt/data/home/stu/.virtualenvs/tmpv/build/pytracemalloc/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8wlxPH-record/install-record.txt --single-version-externally-managed --compile --install-headers /mnt/data/home/stu/.virtualenvs/tmpv/include/site/python2.7 failed with error code 1 in /mnt/data/home/stu/.virtualenvs/tmpv/build/pytracemalloc
Traceback (most recent call last):
  File "/mnt/data/home/stu/.virtualenvs/tmpv/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/mnt/data/home/stu/.virtualenvs/tmpv/local/lib/python2.7/site-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/mnt/data/home/stu/.virtualenvs/tmpv/local/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 50: ordinal not in range(128)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.