Giter VIP home page Giter VIP logo

Comments (13)

multiduplikator avatar multiduplikator commented on May 30, 2024

This problem persists on R 4.2.0 and RTOOLS 4.2 on Windows 11.

Anything I can do to help sort this out?

from rcbc.

multiduplikator avatar multiduplikator commented on May 30, 2024

Is this because R 4.2 is now on ucrt?

from rcbc.

cmber avatar cmber commented on May 30, 2024

Same issue with R 4.2.0 and RTools 4.2 on Windows 10 pro

from rcbc.

multiduplikator avatar multiduplikator commented on May 30, 2024

Is there anything happening on this issue? I am happy to help debug and test...

from rcbc.

dirkschumacher avatar dirkschumacher commented on May 30, 2024

Happy to look at a PR for it, but I don't have the capacity to look into it.

from rcbc.

multiduplikator avatar multiduplikator commented on May 30, 2024

No patches needed. CBC 2.10.8 is required and fixes the problem.

As a dirty hack, I tried building the package. It downloads cbc 2.10.5. Then I replaced the files in "windows\cbc-2.10.5" with the corresponding versions of the 2.10.8 official releases from https://github.com/coin-or/Cbc/releases namely

Cbc-releases.2.10.8-i686-w64-mingw32.zip:
lib\*.a -> windows\cbc-2.10.5\lib\i386

Cbc-releases.2.10.8-x86_64-w64-mingw64.zip:
include -> windows\cbc-2.10.5\include
share -> windows\cbc-2.10.5\share
lib\*.a -windows\cbc-2.10.5\lib\x64

Then edited DESCRIPTION to call for roxygen2 7.2.0 (new version, so doc builds).

After that, Clean and Rebuild. Then Test Package - all 12+33 tests pass.

All perfectly fine.

from rcbc.

BrunoCartu avatar BrunoCartu commented on May 30, 2024

Could you be a bit more specific @multiduplikator please? I'm not a computer science guy and I'm missing some key details here. And are you describing a fix you did or a procedure we should follow?
Thanks

from rcbc.

multiduplikator avatar multiduplikator commented on May 30, 2024

Before you start, you might want to update all packages first.

Download the rcbc master branch as zip and unpack.
You will get a directory named rcbc-master.
In that directory, open the file Rcbc.Rproj in RStudio.

Run Build > Check Package. Which will produce the error situation as described in #34.

Now comes the dirty fixing part.

You need to download two files from https://github.com/coin-or/Cbc/releases :

Cbc-releases.2.10.8-i686-w64-mingw32.zip
Cbc-releases.2.10.8-x86_64-w64-mingw64.zip

In the directory rcbc-master\windows\cbc-2.10.5\lib\i386 delete all files with ending .a.
Copy all files with ending .a from the lib directory in the downloaded zip Cbc-releases.2.10.8-i686-w64-mingw32.zip.
In shorthand pseudo code, I write:
copy Cbc-releases.2.10.8-i686-w64-mingw32.zip\lib\*.a TO rcbc-master\windows\cbc-2.10.5\lib\i386\

Now delete all files in rcbc-master\windows\cbc-2.10.5\include\coin.
copy Cbc-releases.2.10.8-x86_64-w64-mingw64.zip\include\coin\* TO rcbc-master\windows\cbc-2.10.5\include\coin\

Next, delete everything in rcbc-master\windows\cbc-2.10.5\share\coin\Data (two directories).
copy (directories) Cbc-releases.2.10.8-x86_64-w64-mingw64.zip\share\coin\Data\* TO rcbc-master\windows\cbc-2.10.5\share\coin\Data

Finally, delete all files in rcbc-master\windows\cbc-2.10.5\lib\x64 ending in .a.
copy Cbc-releases.2.10.8-x86_64-w64-mingw64.zip\lib\*.a TO rcbc-master\windows\cbc-2.10.5\lib\x64

What we have done effectively is to keep the folder structure of rcbc-master as is, but replaced the libraries of cbc-2.10.5 with the ones from cbc-2.10.8. This is dirty, but it works.

Finally, you have to check which version of roxygen2 you have installed. For me it is 7.2.1 version.
Hence, I check the file rcbc-master\DESCRIPTION to contain the line:

RoxygenNote: 7.2.1

Run Build > Build Binary Package.

This will produce rcbc_0.1.0.9001.zip in the directory above rcbc-master.

That zip can be installed via "Tools > Install > Install from: Package archive file".

Hope this helps.

PS: You might want to backup the zip you created, can be installed as is when you redo your R environment.

from rcbc.

BrunoCartu avatar BrunoCartu commented on May 30, 2024

Thank you so much @multiduplikator, works like a charm.

from rcbc.

multiduplikator avatar multiduplikator commented on May 30, 2024

A pleasure :)

from rcbc.

multiduplikator avatar multiduplikator commented on May 30, 2024

A bit more user friendly, I made a fork of the libraries.

So you can just download the rcbc-master, unpack, and then:

In the file rcbc-master\src\Makevars.win change line 1 to become

VERSION = 2.10.8

In the file rcbc-master\tools\winlibs.R change line https url in line 8 to become

https://github.com/multiduplikator/cbc/releases/download/2.10.8/cbc-2.10.8.zip

Now load rcbc-master\Rcbc.rproj in Rstudio and build as usual.

from rcbc.

jeffreyhanson avatar jeffreyhanson commented on May 30, 2024

Just in case it's helpful, I've been working on a PR for rcbc so that it will work on R version 4.2+ and older versions, and I think it's working now (#66). I've tested it on GitHub Actions and on a Windows PC and it installs and runs correctly. I'm waiting for a seperate PR to RWinLib before the PR to rcbc can be merged, but in the meantime, it can be installed with remotes::install_github("jeffreyhanson/rcbc@rwinlib"). Please let me know if anyone runs into any issues with it.

from rcbc.

multiduplikator avatar multiduplikator commented on May 30, 2024

I just did a build on Win11, R 4.2.2. Played a bit with it, executed the sample code from help. Looks good to me!

However, why did you choose 2.10.5b of cbc, when there is 2.10.8 at least since May 2022?

from rcbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.