Giter Site home page Giter Site logo

Build broken on Windows about dwnominate HOT 12 CLOSED

wmay avatar wmay commented on September 22, 2024
Build broken on Windows

from dwnominate.

Comments (12)

wmay avatar wmay commented on September 22, 2024

After that commit you need BLAS and LAPACK to compile it. They should be included in Rtools. Let me know if that helps.

from dwnominate.

knutwannheden avatar knutwannheden commented on September 22, 2024

I do have Rtools 4.0 and R.Project 4.0.4 installed. BLAS AND LAPACK appear to be part of R.Project and available as Rblas.dll and Rlapack.dll. And I assume the older versions of this library also use LAPACK and / or BLAS. Since I am able to install the oder versions just fine, I assume my setup is basically fine. I suspect this is some platform specific issue. I don't have much experience with R, so I am afraid I won't be able to help much. Possibly someone else could try to confirm these problems on Windows?

from dwnominate.

wmay avatar wmay commented on September 22, 2024

Not quite. You need the BLAS and LAPACK development headers to do compiling. R itself only comes with the shared libraries (the dll's). That's why there's a separate Rtools package for compiling packages. And that's why gcc complains about sgesvd, which is a LAPACK function.

Older versions of this package didn't use LAPACK. They used IMSL and EISPACK code included in the fortran source file. I replaced it with LAPACK in this commit because the IMSL code is proprietary.

So this almost certainly suggests that Rtools somehow isn't set up correctly. Your compiler just needs to be pointed to the LAPACK development headers.

from dwnominate.

knutwannheden avatar knutwannheden commented on September 22, 2024

My R on Windows does also have LAPACK and BLAS C header files. They are under include/R_ext and you can inspect them here: https://svn.r-project.org/R/trunk/src/include/R_ext/Lapack.h and https://svn.r-project.org/R/trunk/src/include/R_ext/BLAS.h.

I have no idea what the "R flavor" of these two libraries is or how it differs from the standard libraries. But I think I have my R and Rtools installed properly and suspect that only installing Rtools is not quite enough on Windows.

from dwnominate.

wmay avatar wmay commented on September 22, 2024

You're linking to the R source code, but if you install R on windows you would typically only have the binary. I'm not working on a windows machine at the moment but my understanding is that you won't end up with those files on your system. They may not be found by the compiler even if you do have the files.

The Rtools source code shows that it includes lapack, which is why I expect it to work.

But I also haven't used this new version of Rtools before, and I'm a bit confused about what they're doing. Let me try this out with my windows machine and get back to you.

from dwnominate.

wmay avatar wmay commented on September 22, 2024

Can you try following the Rtools instructions here?

It looks like you would need to run something along the lines of:

pacman -S  mingw-w64-{i686,x86_64}-lapack

And that should provide the development headers for you.

from dwnominate.

wmay avatar wmay commented on September 22, 2024

Wow, I got that wrong-- the lapack headers really are installed with R. The issue seems to be that the functions I'm calling aren't included in R's lapack. I'll have to ask around on some mailing lists, because I actually don't know how to make this work right now.

from dwnominate.

knutwannheden avatar knutwannheden commented on September 22, 2024

Thanks a lot for looking into this. If you figure out a way to solve this with using BLAS and LAPACK bundled with R, then great. Otherwise it would maybe be possible to publish a compiled package to CRAN to make it easier to use for Windows users.

from dwnominate.

wmay avatar wmay commented on September 22, 2024

Unfortunately it's not possible, because I literally can't compile it on windows right now (and putting the package on CRAN is not an option at the moment). After I get this sorted out though, if the compilation process is too complicated, I will definitely try to provide a binary version.

from dwnominate.

knutwannheden avatar knutwannheden commented on September 22, 2024

I am happy to help you test, if that is of any help.

from dwnominate.

wmay avatar wmay commented on September 22, 2024

I think I've got it. Try running

remotes::install_github('wmay/dwnominate', ref = 'lapack')

from dwnominate.

knutwannheden avatar knutwannheden commented on September 22, 2024

Yes, indeed. Like this it now works!

from dwnominate.

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.