krlmlr / r-appveyor

Tools for using R with AppVeyor (https://appveyor.com)
132 stars 60 forks source link

RBGL errors: single architecture? #87

Closed rdiaz02 closed 6 years ago

rdiaz02 commented 7 years ago

I am getting errors in a package that I think can be traced to a problem I have not seen in the past with RBGL.

When my appeyor.yml file has travis-tool.sh install_bioc RBGL it seems to run successfully as I eventually see (https://ci.appveyor.com/project/rdiaz02/OncoSimul/build/job/0wwqwkbq5ldw0qai) (this is for a x64 build; similar but referring to i386 in the i386 build)

installing to c:/RLibrary/RBGL/libs/x64
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (RBGL

But I see the message

Warning: this package has a non-empty 'configure.win' file,
so building only the main architecture

And then, further down below, when another package (nem in this case) that depends on RBGL has to be installed I see

*** arch - i386
Error: package or namespace load failed for 'nem' in library.dynam(lib, package, package.lib):
 DLL 'RBGL' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'c:/RLibrary/nem'RBGL

If I do not directly try to install RBGL and leave it for the dependencies to be resolved, the same thing happens (https://ci.appveyor.com/project/rdiaz02/oncosimul/build/1.0.372/job/5837y47575gax7mi) .

It seems I would need to use the proper magical combination of --merge-multiarch and/or --force-multiarch (http://r.789695.n4.nabble.com/R-CMD-check-force-multiarch-does-not-install-all-the-archs-for-testing-td3629129.html) but I have not been able to get it to work, as appveyor seems to have the INSTALL_opts="--no-multiarch" harcoded.

Any possible workarounds?

krlmlr commented 7 years ago

Thanks. Can we safely change --no-multiarch to --merge-multiarch? It would be great if you could try this in a fork.

rdiaz02 commented 7 years ago

Sorry, I am not sure to understand. I cannot try to use --merge-multiarch because appveyor seems to have no-multiarch hardcoded.

If the question is whether the build system in appveyor can use --merge-multiarch well... I am not sure I follow the intricacies of the thread in http://r.789695.n4.nabble.com/R-CMD-check-force-multiarch-does-not-install-all-the-archs-for-testing-td3629129.html But BioConductor seems to use

(This is an example http://bioconductor.org/checkResults/devel/bioc-LATEST/OncoSimulR/tokay1-checksrc.html)

So my understanding (again, take with many grains of salt) is that allowing something like the following should work:

and the problem seems to arise because I cannot use anything like the first, as INSTALL_opts="--no-multiarch" is hardcoded.

krlmlr commented 7 years ago

Thanks. I was suggesting that you fork r-appveyor and try the changes you propose there on your project. If this works I'm happy to integrate them in this repository.

As for the hard-coded value, we might just need to provide one or two new environment variables which allow overriding the --no-multiarch setting.

rdiaz02 commented 7 years ago

Thanks! It is working fine now, though. I forked the repo and I'll try what you are suggesting when it fails again. The problem seems to be building some packages from source: now that the binaries are available, things work again.

nfultz commented 6 years ago

We are using appveyor to generate windows packages that we put straight into drat, so it would be nice for biarch builds in that use case (eg https://github.com/DeclareDesign/randomizr/issues/46).

I forked this repo, edited out the --no-multiarch here (https://github.com/nfultz/r-appveyor/commit/0ed58534af1a5c61387891c90eac409a69e77e6b) and got a clean build: https://ci.appveyor.com/project/DeclareDesign/randomizr/build/job/fb09vel0ujow41gm

It sucessfully made a biarch package that got placed in to drat: https://github.com/DeclareDesign/declaredesign.github.io/blob/master/bin/windows/contrib/3.4/PACKAGES#L33

krlmlr commented 6 years ago

@nfultz: Thanks, would you like to submit a PR?

krlmlr commented 6 years ago

/remind me on Tuesday

reminders[bot] commented 6 years ago

@krlmlr set a reminder for Mar 6th 2018

reminders[bot] commented 6 years ago

:wave: @krlmlr,