Rcpp on Solaris - r

I am trying to compile Rcpp_0.9.7 from source on sparc-sun-solaris2.10. I am getting the following error when I try to use install.packages:
sh: make: not found
ERROR: compilation failed for package 'Rcpp'
From research on the internet, it appears others have had similar problems with solaris. Unfortunately I do not know very much about which compilers I should or should not be using. One thing I am beginning to realize, however, is that solaris seems to be a sub-optimal environment for running R (in terms of performance as well as convenience).

Solaris can mean different things: it could be Solaris on x86, or Solaris on Sparc.
According to the Rcpp build results page on CRAN, Rcpp does now build on x86 Solaris (thanks to a recent patch by Martyn Plummer) but not Sparc Solaris. We were just discussing that this week on the rcpp-devel list.
As for your error, you are lacking critical components, namely the make tool. You likely lack more. Your conclusion is correct, though. Depending your level of Unix knowledge, you may be best off to simply install Ubuntu and enjoy tens of thousands of pre-built packages, including R and well over a hundred related packages.

Not really a solution but too long for a comment.
First of all get a decent environment for your testing of building Rccp on Solaris. Personally I use VirtualBox on my Windows workstation. This way I have an environment that I can control myself and do not depend on any grumpy SysAdmin. Best of all: there's no cost involved! When you are confident with your build you can either (1) move the binaries over to your target host or (2) replicate the build setup on your target host.
Secondly you can use these instructions to set up a proper build host on Solaris. (you seem to be lacking some crucial tools!). Remember to use gmake when building as per the instructions in the posting.

As Dirk mentioned, you're lacking the make command. If you're running Solaris 10
or earlier, then you need to find your installation media and pkgadd SUNWsprot.
If you're running Solaris 11 or later, then
pkg install developer/build/make
will get you that utility. You probably need the system headers as well, which are in pkg://solaris/system/header for Solaris 11 and later, or SUNWhea in earlier releases.
I see that you mention sparc-sun-solaris2.10 in your question - is there any opportunity for you to update to Solaris 11 or later? The developer environment is muchmuch nicer in the newer releases. Certainly easier to get a copy of a compiler....

Related

Getting the latest version of R with Linux Mint

When I run apt install r-base it provides me with a slightly out-dated version of R. When I tried to look up how to get a newer version, much of what I found did something to the file /etc/apt/source.list. The content of this file is
#deb cdrom:[Linux Mint 18.3 _Sylvia_ - Release amd64 20171124]/ xenial contrib $
Most instructions suggest appending something like
deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3/
But none of the various suggestions I've read have worked--presumably either because they were for non-Mint distros or they were for outdated versions of Mint. I tried taking something that I found, like
http://cran.ma.imperial.ac.uk/bin/linux/ubuntu trusty/
and editing it with the codename that I found elsewhere which seems to be the most recent, hence making it
http://cran.ma.imperial.ac.uk/bin/linux/ubuntu sylvia/
But when I ran the update it couldn't find the repo, presumably because places that have Trusty don't necessarily have Sylvia--although maybe it didn't work for some other reason. (And I notice the UK address which probably is bad for me to be using in America, but I don't really get how I'm supposed to find an address that will have the right files.)
Since I see a number of times when this question has been asked and solutions always seem to be short-lived, applying only so long as that particular version is hosted by that particular address and is the latest version--can I ask something where the answer might have a little more longevity: In general, how do you find the right thing to add to your /etc/apt/source.list file to make this work? How do you find the right repo source (same thing as a mirror?), the current codename, and so on? (It would also be nice to have a generalized procedure for how to solve this, because I basically ran into the same problem on my old computer with a 32-bit architecture, and would like to have R running on that too without having to ask the question a second time--but presumably the specific thing and place I'll have to download for that is different.)

R FAQ for package tcltk mentions "teacup". What is this and how can I use it?

In the R FAQ section 4.6 (Package TclTk does not work) I found the following sentence:
... although they [missing Tcl/tk packages] may be downloaded via the Teacup facility
What is "teacup"? How can I install and use it?
I am using RStudio running on Ubuntu Linux and Windows 7.
Teacup is a program that ships as part of ActiveTcl, a commercial zero-cost distribution of Tcl (and Tk and many other packages) for various platforms. It does package management, looking after the key part that is download, installation and upgrading of packages from a remote repository. It is not open source, though Tcl itself is (as are the majority of packages that aren't single-company-specific).
If you've got it installed, you use these commands from a shell:
teacup update-self
teacup update
Depending on where your Tcl installation is, you might need to elevate privileges to make these command calls work. How you do this is platform-dependent; on Unix it's usually simplest to use sudo for each of the commands, whereas on Windows it is probably easier to create an elevated command shell and run inside that.
Depending on your site, you might need to configure a web proxy with teacup proxy. Try without first.
If you're using a non-ActiveTcl installation but you have an ActiveTcl installation present, you can still use teacup. You just need to use teacup link to connect that Tcl installation to the teacup local repository. This is slightly more complex because you can have multiple repositories on the one system (though I've never needed that).
First, you find where the repository is:
teacup default
Then you need to link the shell to the repository:
teacup link make $PATH_FROM_TEACUP_DEFAULT $LOCATION_OF_TCLSH_TO_LINK
Making this work with R Studio will be a matter of determining which Tcl installation it is using. If it's already an ActiveTcl, you just need the first part of this answer. Otherwise, you need the second part as well. Also note that pretty much requires that you be using either Tcl 8.5 or 8.6; there are no guarantees for older, unsupported versions.

:version shows "Dependencies: python27.dll, which is not on my computer

I downloaded Vim 7.3 and installed it on my Windows7 64 bit system. I coded a simple python 3.4 program and tried to run it without success using the :!python COMMAND. When I checked version, bottom of output said:
Dependency: python27.dll, python33.dll, x64-msvcrt-ruby200.dll, lva52.dll, libintl.dll, lidiconv.dll, iconv.dll.
When I checked, python27.dll is not found on my system at all, python33.dll is in a directory for a program called "Autodesk 123D Design". I didn't check for the others yet. Can someone explain if these are required and if so, where they go? I have no idea why they would not have downloaded with the program during install.
They are used for writing vim plugins in Python. They are not required for normal operation.
They are also unrelated to your problem; check the value of %PATH% to see if python.exe is accessible.

building brackets was "Done, without errors" in Debian Wheezy, but

i was trying to build "brackets sprint 40" from source code (by following #jasonsanjose instructions look #4816 and the official wiki's page here) in my 32bit Wheezy, Using CEF3 (Verion 3.1547.1406_linux32_release with glibc 2.13) and everything was OK .
when i ran grunt build and grunt installer the output was: Running "build" task
Running "build-linux" task
Done, without errors.
and when i installed .deb package and executed it in the terminal , this error has been thrown:brackets: libcef_dll/wrapper/libcef_dll_wrapper.cc:120: int CefExecuteProcess(const CefMainArgs&, CefRefPtr): Assertion `false' failed.
Aborted
I did rebuild it many times, but the problem persist.
And this is where i stopped, i don't know where the problem lies.
some help will be appreciated, thank you in advance.
There's a duplicate of this question with longer discussion posted here - https://github.com/adobe/brackets/issues/8170.
Note: This problem shouldn't affect a "vanilla" brackets-shell build on Linux -- it's specific to a hack some people have developed to support an older version of Debian than Brackets officially supports. This requires swapping in a newer version of the CEF library, which is not always easy to do since they are not usually backwards-compatible.

Virtual environment in R?

I've found several posts about best practice, reproducibility and workflow in R, for example:
How to increase longer term reproducibility of research (particularly using R and Sweave)
Complete substantive examples of reproducible research using R
One of the major preoccupations is ensuring portability of code, in the sense that moving it to a new machine (possibly running a different OS) is relatively straightforward and gives the same results.
Coming from a Python background, I'm used to the concept of a virtual environment. When coupled with a simple list of required packages, this goes some way to ensuring that the installed packages and libraries are available on any machine without too much fuss. Sure, it's no guarantee - different OSes have their own foibles and peculiarities - but it gets you 95% of the way there.
Does such a thing exist within R? Even if it's not as sophisticated. For example simply maintaining a plain text list of required packages and a script that will install any that are missing?
I'm about to start using R in earnest for the first time, probably in conjunction with Sweave, and would ideally like to start in the best way possible! Thanks for your thoughts.
I'm going to use the comment posted by #cboettig in order to resolve this question.
Packrat
Packrat is a dependency management system for R. Gives you three important advantages (all of them focused in your portability needs)
Isolated : Installing a new or updated package for one project won’t break your other projects, and vice versa. That’s because packrat gives each project its own private package library.
Portable: Easily transport your projects from one computer to another, even across different platforms. Packrat makes it easy to install the packages your project depends on.
Reproducible: Packrat records the exact package versions you depend on, and ensures those exact versions are the ones that get installed wherever you go.
What's next?
Walkthrough guide: http://rstudio.github.io/packrat/walkthrough.html
Most common commands: http://rstudio.github.io/packrat/commands.html
Using Packrat with RStudio: http://rstudio.github.io/packrat/rstudio.html
Limitations and caveats: http://rstudio.github.io/packrat/limitations.html
Update: Packrat has been soft-deprecated and is now superseded by renv, so you might want to check this package instead.
The Anaconda package manager conda supports creating R environments.
conda create -n r-environment r-essentials r-base
conda activate r-environment
I have had a great experience using conda to maintain different Python installations, both user specific and several versions for the same user. I have tested R with conda and the jupyter-notebook and it works great. At least for my needs, which includes RNA-sequencing analyses using the DEseq2 and related packages, as well as data.table and dplyr. There are many bioconductor packages available in conda via bioconda and according to the comments on this SO question, it seems like install.packages() might work as well.
It looks like there is another option from RStudio devs, renv. It's available on CRAN and supersedes Packrat.
In short, you use renv::init() to initialize your project library, and use renv::snapshot() / renv::restore() to save and load the state of your library.
I prefer this option to conda r-enviroments because here everything is stored in the file renv.lock, which can be committed to a Git repo and distributed to the team.
To add to this:
Note:
1. Have Anaconda installed already
2. Assumed your working directory is "C:"
To create desired environment -> "r_environment_name"
C:\>conda create -n "r_environment_name" r-essentials r-base
To see available environments
C:\>conda info --envs
.
..
...
To activate environment
C:\>conda activate "r_environment_name"
(r_environment_name) C:\>
Launch Jupyter Notebook and let the party begins
(r_environment_name) C:\> jupyter notebook
For a similar "requirements.txt", perhaps this link will help -> Is there something like requirements.txt for R?
Check out roveR, the R container management solution. For details, see https://www.slideshare.net/DavidKunFF/ownr-technical-introduction, in particular slide 12.
To install roveR, execute the following command in R:
install.packages("rover", repos = c("https://lair.functionalfinances.com/repos/shared", "https://lair.functionalfinances.com/repos/cran"))
To make full use of the power of roveR (including installing specific versions of packages for reproducibility), you will need access to a laiR - for CRAN, you can use our laiR instance at https://lair.ownr.io, for uploading your own packages and sharing them with your organization you will need a laiR license. You can contact us on the email address in the presentation linked above.

Resources