Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: ./../folly/portability/Malloc.h:27:12: error: unknown type name 'size_t' #39

Closed
loretoparisi opened this issue Apr 13, 2016 · 4 comments

Comments

@loretoparisi
Copy link

I came out with this error:

In file included from portability/Malloc.cpp:17:
./../folly/portability/Malloc.h:27:12: error: unknown type name 'size_t'
extern "C" size_t malloc_usable_size(void* ptr);
           ^
1 error generated.
make[4]: *** [portability/Malloc.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
macbookproloreto:redex admin$ 

Reg:
MacOS X 10.10.5
Python 3.5.1

@loretoparisi
Copy link
Author

It seems to be the related to #8

As described I added the include in the headers in third-party/folly/folly/portability/Malloc.h

#include <malloc.h>
#include <stddef.h>

then

make clean
autoreconf -ivf && ./configure && make && make install

But I've got

loc.cpp  -fno-common -DPIC -o portability/.libs/Malloc.o
In file included from portability/Malloc.cpp:17:
portability/malloc.h:23:10: error: 'malloc.h' file not found with <angled> include; use "quotes" instead
#include <malloc.h>
         ^~~~~~~~~~
         "malloc.h"
portability/malloc.h:28:12: error: unknown type name 'size_t'
extern "C" size_t malloc_usable_size(void* ptr);
           ^
2 errors generated.
make[4]: *** [portability/Malloc.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 

@loretoparisi
Copy link
Author

So,
I have fixed the <> import issue and added the stddef.h stdlib
to third party/folly/folly/portability/Malloc.h

#include "stddef.h"
#include "malloc.h"

and this time it compiled!

@jrodbx
Copy link

jrodbx commented Apr 13, 2016

This appears to be a duplicate of #8

@bertmaher
Copy link
Contributor

Yep, this is #8 , thanks @jrodbx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants