tidyverse / readxl

Read excel files (.xls and .xlsx) into R 🖇

Home Page:https://readxl.tidyverse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error on 10.6: error: 'gid_t' has not been declared

barracuda156 opened this issue · comments

/opt/local/bin/g++-mp-12 -std=gnu++11 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -Iunix -I. -I'/opt/local/Library/Frameworks/R.framework/Versions/4.2/Resources/library/cpp11/include' -I'/opt/local/Library/Frameworks/R.framework/Versions/4.2/Resources/library/progress/include' -I/opt/local/include   -fPIC  -pipe -Os -arch ppc  -c Read.cpp -o Read.o
In file included from /opt/local/Library/Frameworks/R.framework/Versions/4.2/Resources/library/progress/include/RProgress.h:6,
                 from Spinner.h:3,
                 from XlsCellSet.h:4,
                 from SheetView.h:5,
                 from Read.cpp:1:
/usr/include/unistd.h:421:37: error: 'gid_t' has not been declared
  421 | int      chown(const char *, uid_t, gid_t);
      |                                     ^~~~~
/usr/include/unistd.h:439:29: error: 'gid_t' has not been declared
  439 | int      fchown(int, uid_t, gid_t);
      |                             ^~~~~
/usr/include/unistd.h:446:1: error: 'gid_t' does not name a type; did you mean 'uid_t'?
  446 | gid_t    getegid(void);
      | ^~~~~
      | uid_t
/usr/include/unistd.h:448:1: error: 'gid_t' does not name a type; did you mean 'uid_t'?
  448 | gid_t    getgid(void);
      | ^~~~~
      | uid_t
/usr/include/unistd.h:452:25: error: 'gid_t' has not been declared
  452 | int      getgroups(int, gid_t []);
      |                         ^~~~~
/usr/include/unistd.h:467:38: error: 'gid_t' has not been declared
  467 | int      lchown(const char *, uid_t, gid_t) __DARWIN_ALIAS(lchown);
      |                                      ^~~~~
/usr/include/unistd.h:480:18: error: 'gid_t' was not declared in this scope; did you mean 'xls::gid_t'?
  480 | int      setegid(gid_t);
      |                  ^~~~~
      |                  xls::gid_t
In file included from ./libxls/xlstypes.h:48,
                 from libxls/xls.h:42,
                 from ColSpec.h:6,
                 from XlsCell.h:3,
                 from CellLimits.h:3,
                 from SheetView.h:1:
/usr/include/sys/types.h:120:33: note: 'xls::gid_t' declared here
  120 | typedef __darwin_gid_t          gid_t;
      |                                 ^~~~~
/usr/include/unistd.h:482:17: error: 'gid_t' was not declared in this scope; did you mean 'xls::gid_t'?
  482 | int      setgid(gid_t);
      |                 ^~~~~
      |                 xls::gid_t
/usr/include/sys/types.h:120:33: note: 'xls::gid_t' declared here
  120 | typedef __darwin_gid_t          gid_t;
      |                                 ^~~~~
/usr/include/unistd.h:489:19: error: 'gid_t' was not declared in this scope; did you mean 'xls::gid_t'?
  489 | int      setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid);
      |                   ^~~~~
      |                   xls::gid_t
/usr/include/sys/types.h:120:33: note: 'xls::gid_t' declared here
  120 | typedef __darwin_gid_t          gid_t;
      |                                 ^~~~~
/usr/include/unistd.h:489:26: error: 'gid_t' was not declared in this scope; did you mean 'xls::gid_t'?
  489 | int      setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid);
      |                          ^~~~~
      |                          xls::gid_t
/usr/include/sys/types.h:120:33: note: 'xls::gid_t' declared here
  120 | typedef __darwin_gid_t          gid_t;
      |                                 ^~~~~
/usr/include/unistd.h:489:31: error: expression list treated as compound expression in initializer [-fpermissive]
  489 | int      setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid);
      |                               ^
/usr/include/unistd.h:508:1: error: 'useconds_t' does not name a type
  508 | useconds_t
      | ^~~~~~~~~~
/usr/include/unistd.h:511:17: error: 'useconds_t' was not declared in this scope; did you mean 'xls::useconds_t'?
  511 | int      usleep(useconds_t) __DARWIN_ALIAS_C(usleep);
      |                 ^~~~~~~~~~
      |                 xls::useconds_t
/usr/include/sys/types.h:245:33: note: 'xls::useconds_t' declared here
  245 | typedef __darwin_useconds_t     useconds_t;
      |                                 ^~~~~~~~~~
In file included from /usr/include/unistd.h:519:
/usr/include/sys/select.h:137:23: error: 'fd_set' has not been declared
  137 | int      pselect(int, fd_set * __restrict, fd_set * __restrict,
      |                       ^~~~~~
/usr/include/sys/select.h:137:44: error: 'fd_set' has not been declared
  137 | int      pselect(int, fd_set * __restrict, fd_set * __restrict,
      |                                            ^~~~~~
/usr/include/sys/select.h:138:17: error: 'fd_set' has not been declared
  138 |                 fd_set * __restrict, const struct timespec * __restrict,
      |                 ^~~~~~
In file included from /usr/include/sys/select.h:152:
/usr/include/sys/_select.h:39:22: error: 'fd_set' has not been declared
   39 | int      select(int, fd_set * __restrict, fd_set * __restrict,
      |                      ^~~~~~
/usr/include/sys/_select.h:39:43: error: 'fd_set' has not been declared
   39 | int      select(int, fd_set * __restrict, fd_set * __restrict,
      |                                           ^~~~~~
/usr/include/sys/_select.h:40:17: error: 'fd_set' has not been declared
   40 |                 fd_set * __restrict, struct timeval * __restrict)
      |                 ^~~~~~
/usr/include/unistd.h:536:35: error: 'gid_t' has not been declared
  536 | int      getpeereid(int, uid_t *, gid_t *);
      |                                   ^~~~~
/usr/include/unistd.h:553:36: error: 'gid_t' has not been declared
  553 | int      pthread_setugid_np(uid_t, gid_t);
      |                                    ^~~~~
/usr/include/unistd.h:554:39: error: 'gid_t' has not been declared
  554 | int      pthread_getugid_np( uid_t *, gid_t *);
      |                                       ^~~~~
/usr/include/unistd.h:565:31: error: 'gid_t' does not name a type; did you mean 'uid_t'?
  565 | int      setgroups(int, const gid_t *);
      |                               ^~~~~
      |                               uid_t
/usr/include/unistd.h:575:18: error: 'gid_t' was not declared in this scope; did you mean 'xls::gid_t'?
  575 | int      setrgid(gid_t);
      |                  ^~~~~
      |                  xls::gid_t
/usr/include/sys/types.h:120:33: note: 'xls::gid_t' declared here
  120 | typedef __darwin_gid_t          gid_t;
      |                                 ^~~~~
make: *** [Read.o] Error 1
ERROR: compilation failed for package ‘readxl’

There was an older issue with similar errors, but the problem has not been addressed really: #561

It has been fixed (again) in #708, but that hasn't been released on CRAN yet. You'll need the dev version to get the fix.

@jennybc I confirm it builds fine on macOS PPC from the master branch. No more errors.