Making package easily available across OSs

41 views
Skip to first unread message

Timothy Bates

unread,
Nov 11, 2013, 5:58:57 PM11/11/13
to rdev...@googlegroups.com
Hi,
Thanks to devtools, I have developed my fiirst package: A library of helpers for doing SEM with OpenMx


It's running well for me, and for install_github(tbates/umx) users on mac.

Just had my first PC user... they just can't get it to run.

It's just source R files, with roxygen help. No C/Fortran etc, so, some questions:

1. How can one release binary packages at github (to avoid the need for users to have compile tools)
2. How can one create windows and *nix binary packages from a mac?
3. Why can't a PC user install packages from source when a mac user can?
4. If  one pushes a package to CRAN, is it frowned on to then push updates often?

many thanks, t

Timothy Bates

unread,
Nov 11, 2013, 6:50:29 PM11/11/13
to rdev...@googlegroups.com
discovered build_win()
Is there a way to bulld packages with dependencies on packages that are not on CRAN? (umx requires OpenMx, which is currently installed  from http://openmx.psyc.virginia.edu  due to a non-open source optimiser being included in the package.

Also, does install_github detect the availability of the corect binary packages? i..e, I just push them up to github?

Hadley Wickham

unread,
Nov 12, 2013, 1:27:36 AM11/12/13
to Timothy Bates, rdev...@googlegroups.com
> Just had my first PC user... they just can't get it to run.

Error messages?

> It's just source R files, with roxygen help. No C/Fortran etc, so, some
> questions:
>
> 1. How can one release binary packages at github (to avoid the need for
> users to have compile tools)

You can't, but it doesn't sound like you need.

> 2. How can one create windows and *nix binary packages from a mac?

You can't easily - it's hard enough that I don't think it's worth bothering.

> 4. If one pushes a package to CRAN, is it frowned on to then push updates
> often?

Yes, CRAN gets antsy if you change too often.

Hadley


--
Chief Scientist, RStudio
http://had.co.nz/

Timothy Bates

unread,
Nov 12, 2013, 7:11:10 AM11/12/13
to rdev...@googlegroups.com, Timothy Bates
Many thanks for the reply: Is there a FAQ for devtools I can write these up on? Probably useful for others?

On Tuesday, November 12, 2013 6:27:36 AM UTC, Hadley Wickham wrote:
> Just had my first PC user... they just can't get it to run.
Error messages?

Seems to be expecting a different architecture for the required package OpenMx. But the user can load library(OpenMx) just fine...

> devtools::install_github("umx", "tbates")

Installing github repo(s) umx/master from tbates

Downloading umx.zip from https://github.com/tbates/umx/archive/master.zip

Installing package from C:\Users\s1127574\AppData\Local\Temp\RtmpALv0Kj/umx.zip

Installing umx

"C:/PROGRA~1/R/R-215~1.3/bin/i386/R" --vanilla CMD INSTALL "C:\Users\s1127574\AppData\Local\Temp\RtmpALv0Kj\umx-master" --library="m:/MY-R-LIBS"  \

  --with-keep.source --install-tests 


* installing *source* package 'umx' ...

** R

** inst

** preparing package for lazy loading

** help

*** installing help indices

** building package indices

** testing if installed package can be loaded

*** arch - i386

*** arch - x64

Error in library.dynam(lib, package, package.lib) : 

  DLL 'OpenMx' not found: maybe not installed for this architecture?

Error: loading failed

Execution halted

ERROR: loading failed for 'x64'

* removing 'm:/MY-R-LIBS/umx'

Error: Command failed (1)


and, there IS OpenMx installed, and it works fine otherwise 

Hadley Wickham

unread,
Nov 12, 2013, 7:26:41 AM11/12/13
to Timothy Bates, rdev...@googlegroups.com
Sounds like OpenMX isn't installed for 64-bit architecture.
Hadley
> --
> You received this message because you are subscribed to the Google Groups
> "devtools" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rdevtools+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Timothy Bates

unread,
Nov 12, 2013, 9:10:32 AM11/12/13
to rdev...@googlegroups.com, Timothy Bates
On Tuesday, November 12, 2013 12:26:41 PM UTC, Hadley Wickham wrote:
Sounds like OpenMX isn't installed for 64-bit architecture.

Yes: OpenMx is not installed for 64bit R. (a dll  it requires is not compiled for 64-bit windows).

But why does devtools require it to be? i.e., is it assuming a 64 bit install (perhaps the user's app and cmdline versions for R are discrepant?), or is it demanding that both versions be installable?

Can I give a setting somewhere to only try and install the 32 bit version?

tx, t

Timothy Bates

unread,
Nov 13, 2013, 7:23:11 AM11/13/13
to rdev...@googlegroups.com, Timothy Bates
OK: Looks like the user must delete R64 from their system to avoid the install error when a package is not available for that platform...

Hadley Wickham

unread,
Nov 14, 2013, 2:25:07 PM11/14/13
to Timothy Bates, rdev...@googlegroups.com
Or use install_github(..., args = "--no-multiarch")

Hadley

Timothy Bates

unread,
Nov 18, 2013, 4:47:49 PM11/18/13
to rdev...@googlegroups.com, Timothy Bates
Dear Hadley,
Many thanks! It did the trick, but I would never have guessed it (and couldn't see in a search).

I wonder if failing on a particular bit install, devtools could softfail with error 

"installed fine to R2^x, couldn't find <package> for R2^y"

or "try install_github(..., args = "--no-multiarch")"

that way the user wins...

Hadley Wickham

unread,
Nov 18, 2013, 4:58:04 PM11/18/13
to Timothy Bates, rdev...@googlegroups.com
Possibly, but it's hard to detect that error, and almost every package
is available on both 32 and 64-bit.
Hadley
Reply all
Reply to author
Forward
0 new messages