Bug 240796 - textproc/R-cran-readxl: fix build on GCC architectures
Summary: textproc/R-cran-readxl: fix build on GCC architectures
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: David Naylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-24 16:13 UTC by Piotr Kubaj
Modified: 2019-12-07 11:23 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (dbn)


Attachments
patch (785 bytes, patch)
2019-09-24 16:13 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (dbn)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2019-09-24 16:13:23 UTC
Created attachment 207774 [details]
patch

Include sys/time.h in src/ColSpec.h to fix build with GCC:
/usr/include/unistd.h:487:8: note: forward declaration of 'struct timeval'
  487 | struct timeval;    /* select(2) */
      |        ^~~~~~~
In file included from /usr/local/lib/R/library/progress/include/RProgress.h:7,
                 from Spinner.h:4,
                 from XlsWorkSheet.h:7,
                 from XlsWorkSheet.cpp:3:
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2019-09-25 15:28:30 UTC
This fails to build for me on ppcports:

  /usr/include/unistd.h:327:26: error: 'uid_t' has not been declared
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2019-09-28 15:34:59 UTC
Comment on attachment 207774 [details]
patch

>Index: files/patch-src_ColSpec.h
>===================================================================
>--- files/patch-src_ColSpec.h	(nonexistent)
>+++ files/patch-src_ColSpec.h	(working copy)
>@@ -0,0 +1,10 @@
>+--- src/ColSpec.h.orig	2019-09-24 16:05:20 UTC
>++++ src/ColSpec.h
>+@@ -1,6 +1,7 @@
>+ #ifndef READXL_COLSPEC_
>+ #define READXL_COLSPEC_
>+ 
>++#include <sys/types.h>
>+ #include <Rcpp.h>
>+ #include <libxls/xls.h>
>+ #include "StringSet.h"
>
>Property changes on: files/patch-src_ColSpec.h
>___________________________________________________________________
>Added: fbsd:nokeywords
>## -0,0 +1 ##
>+yes
>\ No newline at end of property
>Added: svn:eol-style
>## -0,0 +1 ##
>+native
>\ No newline at end of property
>Added: svn:mime-type
>## -0,0 +1 ##
>+text/plain
>\ No newline at end of property
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2019-09-28 15:36:02 UTC
Looks like edit option doesn't work the way I want it to.

Can you try again after replacing sys/time.h with sys/types.h?
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2019-09-29 01:45:33 UTC
Builds with types.h on ppcdevref, so, approved as mentor (pending maintainer review).
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-10-12 15:49:24 UTC
A commit references this bug:

Author: pkubaj
Date: Sat Oct 12 15:48:59 UTC 2019
New revision: 514339
URL: https://svnweb.freebsd.org/changeset/ports/514339

Log:
  textproc/R-cran-readxl: fix build on GCC architectures

  Include sys/types.h in src/ColSpec.h to fix build with GCC:
  /usr/include/unistd.h:327:26: error: 'uid_t' has not been declared

  PR:		240796
  Approved by:	linimon (mentor), dbn (maintainer timeout)

Changes:
  head/textproc/R-cran-readxl/files/
  head/textproc/R-cran-readxl/files/patch-src_ColSpec.h
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-12-07 11:23:14 UTC
A commit references this bug:

Author: linimon
Date: Sat Dec  7 11:22:21 UTC 2019
New revision: 519197
URL: https://svnweb.freebsd.org/changeset/ports/519197

Log:
  MFH: r514339

  textproc/R-cran-readxl: fix build on GCC architectures

  Include sys/types.h in src/ColSpec.h to fix build with GCC:
  /usr/include/unistd.h:327:26: error: 'uid_t' has not been declared

  PR:		240796
  Approved by:	portmgr (tier-2 blanket)

Changes:
_U  branches/2019Q4/
  branches/2019Q4/textproc/R-cran-readxl/files/