Skip to content

[Bioc-devel] Installing pkg with configure with support to multiple architectures

11 messages · Martin Morgan, Dan Tenenbaum, Steve Lianoglou +2 more

#
A package with a configure file is installed only on the architecture
that called the install script.

So I need to, manually, do:

R --arch x86_64 CMD INSTALL oligo_version.tar.gz
R --arch i386 CMD INSTALL --libs-only oligo_version.tar.gz

Is there anything I can add to the package in order to automate this?

Thanks,

b
#
On 01/26/2012 06:01 AM, Benilton Carvalho wrote:
Hi Benilton -- on a not-quite-current R-devel, I have

 > R CMD INSTALL --help
...
and on Windows only
       --force-biarch    attempt to build both architectures
                         even if there is a non-empty configure.win
       --merge-multiarch bi-arch by merging from a tarball

(from R-exts section 1.3.1 of a current R-devel it looks like this 
argument might be --force-multiarch)

Martin

  
    
#
On Thu, Jan 26, 2012 at 12:45 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
--force-multiarch is an argument to R CMD check, unfortunately not R
CMD INSTALL.

As far as I know, for Mac (which I am guessing you are asking about)
there is no R-centric way to do this; you could automate it with a
script.

Dan
#
Thanks Dan and Martin,

Dan, yes, your assumption is correct (I'm trying to do this on a Mac).

The major problem (actually, annoyance) for me is when something like
the following happens (running R under x86_64 and installing via
install.packages/biocLite):

- Install pkg1, which has a configure script... Then, pkg1 is
installed under x86_64;
- (try to) install pkg2, which does not have a configure script, but
depends on pkg1.... it installs the x86_64 part just fine, but the
i386 fails (because pkg1 isnt available under i386)... then the whole
installation of pkg2 fails.

Maybe it's just something basic I'm missing from my end?

b
On 26 January 2012 21:49, Dan Tenenbaum <dtenenba at fhcrc.org> wrote:
#
Hi,

Speaking for R-on-mac -- Isn't a multi-arch build the default as long
as your R was compiled as multi-arch?

For instance, if I try to source compile any packge (w/ c code) using
a "release" version of R (d/l'd from CRAN), it will by default compile
the package for x86_64 and i386, unless I specify `R CMD INSTALL
--no-multiarch`

Now, if I'm compiling the same package using a my own source-compiled
version of R (which is only compiled as 64 bit), then it won't build
the i386 version of the package.

So, I guess my question is if this behavior you are seeing is when
using an R you built yourself, or is it an official CRAN build?

If it's the official build, I'd also be confused as to how some
package were built w/o being multiarch (unless you specifically asked
them to be built that way).

HTH,
-steve

On Fri, Jan 27, 2012 at 8:29 AM, Benilton Carvalho
<beniltoncarvalho at gmail.com> wrote:

  
    
#
Hi Steve,

It's the CRAN build... and it behaves as expected, as long as the
package does not have a configure script (I should make it clear that
I always install packages from the source, ie, install.packages(...,
type='source') ).

For example, Biobase does not have a configure script. Then:

biocLite('Biobase')

gives me:

* installing *source* package ?Biobase? ...
** libs
*** arch - i386
<bunch of stuff>
*** arch - x86_64
<another bunch>
* DONE (Biobase)

Now, affyio and affy have a configure script:

biocLite(c('affyio', 'affy'))

gives me:

* installing *source* package ?affyio? ...
<./configure output>
** libs
*** arch - x86_64
<bunch of stuff>
* DONE (affyio)
* installing *source* package ?affy? ...
<./configure output>
** libs
*** arch - x86_64
<bunch of stuff>
* DONE (affy)

Note that affyio and affy were not installed under i386.

Now, try to install gcrma (has C code, but doesn't have a configure:

biocLite('gcrma')

gives:

* installing *source* package ?gcrma? ...
** libs
*** arch - i386
<bunch of stuff>
*** arch - x86_64
<bunch of stuff>
*** arch - i386
Error : package ?affy? is not installed for 'arch=i386'
Error: loading failed
Execution halted
*** arch - x86_64
ERROR: loading failed for ?i386?
* removing ?/Users/carval03/Rlibs/2.14/gcrma?

So, to get this to work, I need to download the tar.gz files and do

R --arch x86_64 CMD INSTALL pkg_version.tar.gz
R --arch i386 CMD INSTALL --libs-only pkg_version.tar.gz

for pkg = affyio, affy

and I was wondering if there was an automagic way of doing this
(which, I'd hopefully bring to oligo as well).

b

On 27 January 2012 14:36, Steve Lianoglou
<mailinglist.honeypot at gmail.com> wrote:
#
Oh... and the forgotten sessionInfo() is:
R version 2.14.1 Patched (2012-01-11 r58090)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base

other attached packages:
[1] BiocInstaller_1.2.1 RColorBrewer_1.0-5

loaded via a namespace (and not attached):
[1] tools_2.14.1
#
If you see this behaviour with the CRAN build (can't check it right
now), it smells like a bug to me.

Kasper

On Fri, Jan 27, 2012 at 10:29 AM, Benilton Carvalho
<beniltoncarvalho at gmail.com> wrote:
#
Yes, this is with the CRAN build... but... is it a bug if documented?

The "R Installation and Administration" manual says on Section 2.6:

<quote>
R CMD INSTALL will detect if more than one build is installed and try
to install packages with the appropriate library objects for each.
This will not be done if the package has an executable configure
script or a src/Makefile file. In such cases you can install for extra
builds by

     R --arch=name CMD INSTALL --libs-only pkg1 pkg2 ...
</quote>

which is the case for affyio and affy (so, they only get installed
under the architecture used to call the installer). This will also be
the case for oligo.... however, gcrma does not have a configure (nor a
Makefile)... and that's what rises the whole issue.

So, back to my initial point, it would be nice if there was something
we could add to the packages to work around this issue...

b
#
On Fri, Jan 27, 2012 at 7:48 AM, Benilton Carvalho
<beniltoncarvalho at gmail.com> wrote:
Agreed. There is no such thing now. Both CRAN and Bioconductor use
external shell scripts to take a source tarball and generate a
multi-arch binary (.tgz) tarball.
Dan