[R-pkg-devel] golang based package for R msgpack and websocket work (RMQ)
Jason E. Aten
j.e.aten at gmail.com
Tue Oct 27 20:51:20 CET 2015
Re PPAs: good question.
I did some digging. The ubuntu 14 PPA that I found (
https://launchpad.net/~eugenesan/+ppa-packages) was already out of date
(having go1.5 not go1.5.1) when I tried it on a test cloud box running
ubuntu 14.
I think the best way to get Go on a CRAN build box is to do a simple binary
install with the following two lines. This has the big advantage that it
will work on any flavor of linux on amd64, since the go binaries are
statically linked. i.e. any version of ubuntu, fedora, centos, redhat, etc.
(Full details: https://golang.org/doc/install lists the exact
architectures that the binary tarballs support, encompassing FreeBSD,
Linux, Windows, and OSX and which architectures for each.)
*sudo curl https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
<https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz> | su**do
tar xz -C /usr/local/*
*sudo echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile*
NB This will install the "go" binary to /usr/local/go/bin/go. The install
location /usr/local/go is baked into the go1.5.1.linux-amd64.tar.gz binary
as the default GOROOT location, so it can't be moved without setting the
GOROOT env variable as well.
So that's what I would recommend. Any questions, let me know if know.
Jason
On Mon, Oct 26, 2015 at 9:57 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 26 October 2015 at 09:46, Jason E. Aten wrote:
> | Cool. Thanks for mentioning that. I'll send him a note.
>
> +1 -- I would have CC'ed him had I had his email handy. I'll try to reach
> out too.
>
> | You "just" make that
> | a) a SystemRequirements: entry and possibly add a line to say which
> | Debian/Ubuntu and/or Fedora/Yum packages need to be installed
> | b) possibly test for it in configure
> |
> |
> | I'll try to dig into the autotools docs and figure out how to add a
> configure
>
> If it is "all greek" to you let me know. I helped a few other packages over
> the years with simple configure tasks.
>
> | test. It's really just running "go version" and checking that the "go"
> | executalbe exists and the output of "go version" is 1.5.1 or later.
>
> Pretty much. Here is what I do in RQuantLib:
>
> pkg_version=`quantlib-config --version`
>
> # also test for quantlib version using result from quantlib-config
> --version
> case ${pkg_version} in
> 0.1.*|0.2.*|0.3.*|0.4.*|0.8.*|0.9.*|1.0.*|1.1.*|1.2.*|1.3.*)
> AC_MSG_WARN([RQuantLib requires QuantLib (>= 1.4.0).])
> AC_MSG_ERROR([Please upgrade to a current version.])
> ;;
> esac
>
> autoconf looks complicated, but is mostly just shell scripting ...
>
> | I added a human readable note to the SystemRequirements in the
> DESCRIPTION.
> | It's "apt-get install golang" on ubuntu, and "yum install golang" on
> fedora.
> | Should the SystemRequirements field be in some kind of machine
> parseable/CRAN
> | build-testable syntax?
>
> But I checked with eg
>
>
> http://metadata.ftp-master.debian.org/changelogs//main/g/golang/golang_1.5.1-1_changelog
>
> and few systems will have 1.5.1 yet. Ie it probably won't Ubuntu before
> 16.04 next year. Are there PPAs?
>
> Dirk
>
> PS Oh, and I forgot to mention that I like msgPack a lot too :) and have
> played a little bit with C++ bindings via Rcpp.
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list