[Rd] RODBC on Mac & _R_CHECK_FORCE_SUGGESTS_

Spencer Graves spencer.graves at prodsyse.com
Tue Jun 21 01:36:36 CEST 2016


Hi, Marc:


       Thanks very much.  Your instructions provided the keys required 
to unlock the door.  Since I had to read your email several times before 
I got it to work, I will summarize here what I think were the crucial 
steps:


             1.   I went to 
"http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/Downloads", as you 
suggested, and clicked on "tarball from Sourceforge".  That downloaded 
"libiodbc-3.52.10.tar.gz".  (Before I did that, I found "Mac OS X" on 
that page and dowloaded and installed "mxkozzzz.dmg". That was not 
enough to install RODBC.)


             2.  I created a directory similar to what you described 
(/Users/sbgraves/R.Files/SourceAndBinaries/OSX-Tools/iODBC/libiodbc-3.52.10/include/) 
and moved "libiodbc-3.52.10.tar.gz" into it.  Then I extracted a folder 
"libiodbc-3.52.10" from it in the aforementioned directory.


             3.  In R, I then tried the following:


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


       It worked.


       Thanks,
       sg


On 6/20/2016 10:00 AM, Marc Schwartz wrote:
>> 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
>
>



More information about the R-devel mailing list