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

Unknown type name 'uuid_t' #256

Closed
gbrsales opened this issue Mar 18, 2020 · 3 comments
Closed

Unknown type name 'uuid_t' #256

gbrsales opened this issue Mar 18, 2020 · 3 comments

Comments

@gbrsales
Copy link

I'm trying to build fs version 1.3.2.9000 on macOS 10.14.5. R is at version 3.6.3 (installed via Homebrew) and clang++ is 10.0.1 (clang-1001.0.46.4).

Compilation fails with the following:

$ clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.6.3_1/lib/R/include" -DNDEBUG -I. -pthread -I"/usr/local/lib/R/3.6/site-library/Rcpp/include" -fPIC  -g -O2  -c id.cc -o id.o
In file included from id.cc:4:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/grp.h:79:25: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
struct group *getgruuid(uuid_t);
                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;

I've omitted other error messages for brevity, but they all mention the uuid_t type.

The problem appears to be related to Rcpp. Indeed, I modified id.cc as follows:

#ifndef __WIN32
#include <grp.h>
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
#endif

#include <Rcpp.h>

Simply put, I have moved the Rcpp.h include after all others. Originally, it appeared on the fist line of the file. This change is sufficient to make the compilation succeed.

@gbrsales
Copy link
Author

I'm seeing the same error when installing dplyr.

It might be an Rcpp issue. Not sure how to report it, though.

@jimhester
Copy link
Member

This is a duplicate of #249, which is RcppCore/Rcpp#1046. It is fixed in the devel version of Rcpp, hopefully the Rcpp developers will release a patch version to CRAN soon which fixes the issue.

@apremkumar1989
Copy link

from @jimhester reply, found the commit which contains the fix.
https://github.com/RcppCore/Rcpp/pull/1047/commits

for quick fix:
copy contents from this link which contains fix into /usr/local/lib/R/3.6/site-library/Rcpp/include/Rcpp/exceptions_impl.h file on your macOS.

I tried the above and it worked.

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