From marc_schwartz at me.com  Mon Jun 20 17:00:01 2016
From: marc_schwartz at me.com (Marc Schwartz)
Date: Mon, 20 Jun 2016 10:00:01 -0500
Subject: [Rd] RODBC on Mac & _R_CHECK_FORCE_SUGGESTS_
In-Reply-To: <d8fa2836-d7e8-0858-9349-026b1f268029@prodsyse.com>
References: <d8fa2836-d7e8-0858-9349-026b1f268029@prodsyse.com>
Message-ID: <96CEA5EF-938B-4F42-BB95-166C6EBE1CD6@me.com>


> On Jun 20, 2016, at 9:19 AM, Spencer Graves <spencer.graves at prodsyse.com> wrote:
> 
>       "R CMD check sos" with R 3.3.0 under Mac OS X 10.11.5 ends as follows:
> 
> 
> >* checking package dependencies ... ERROR
> >Package suggested but not available: ?RODBC?
> >
> >The suggested packages are required for a complete check.
> >Checking can be attempted without them by setting the environment
> >variable _R_CHECK_FORCE_SUGGESTS_ to a false value.
> 
> 
>       Unfortunately, "install.packages('RODBC')" says it's only available in source form.  When I  attempt to install from sources, it fails as follows:
> 
> 
> >checking for sqlext.h... no
> >configure: error: "ODBC headers sql.h and sqlext.h not found"
> >ERROR: configuration failed for package ?RODBC?
> >* removing ?/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RODBC?
> >Warning in install.packages :
> >  installation of package ?RODBC? had non-zero exit status
> 
> 
>       The CRAN checks for RODBC also failed for the same reason (https://cloud.r-project.org/web/checks/check_results_RODBC.html).
> 
> 
> 
>       I'm not sure how to set "the environment variable _R_CHECK_FORCE_SUGGESTS_ to a false value" on my Mac, and I'd rather not do it permanently.  I tried various versions of "R CMD check _R_CHECK_FORCE_SUGGESTS_=FALSE sos_1.3-9.tar.gz" and "R CMD check _R_CHECK_FORCE_SUGGESTS_=0 sos_1.3-9.tar.gz", none of which worked. Somewhere I found a suggestion to try, "R CMD check --as-cran sos_1.3-9.tar.gz".  That also failed for me.
> 
> 
>       Suggestions?
>       Thanks,
>       Spencer Graves


Spencer,

The RODBC related error is a common issue and is covered in the vignette for the RODBC package in Appendix A "Installation":

  https://cran.r-project.org/web/packages/RODBC/vignettes/RODBC.pdf

You are missing the two iODBC header files that are required to compile the RODBC package from source code.

When I install RODBC on my Mac running 10.11.5 (El Capitan), I use:

install.packages("RODBC", type = "source", 
                 configure.args = "--with-odbc-include=/Users/marcschwartz/R.Files/SourceAndBinaries/OSX-Tools/iODBC/libiodbc-3.52.10/include/")

where I have placed the extracted iODBC source tarball in:

  /Users/marcschwartz/R.Files/SourceAndBinaries/OSX-Tools/iODBC

The:

  configure.args = "--with-odbc-include=..." 

part of the function call points to where the header files are located after extraction from the tarball as per the vignette.

The iODBC source tarball can be downloaded from:

  http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/Downloads


If you want to temporarily set the OS X environment variable, you can open an OS X Terminal and in the console, use:

  export _R_CHECK_FORCE_SUGGESTS_=FALSE 

You can then check to see if it is set by using:

  env 

in the Terminal and/or with the following in an R console run from within that same Terminal session:

> Sys.getenv("_R_CHECK_FORCE_SUGGESTS_")
[1] "FALSE"


Once you close that Terminal session, that modified environment is lost.

Also, at least the RODBC part of the issue should have been posted to R-SIG-DB (https://stat.ethz.ch/mailman/listinfo/r-sig-db), since it is DB interface specific. Most queries about RODBC are there in the archives, including those covering the missing headers.

The part that covers issues vis-a-vis checking your own package should go to R-Package-Devel:

  https://stat.ethz.ch/mailman/listinfo/r-package-devel

rather than R-Devel.

Regards,

Marc Schwartz



[Rd] RODBC on Mac & _R_CHECK_FORCE_SUGGESTS_
Marc Schwartz