Skip to content

Windows error with initial compiling #217

@arranhamlet

Description

@arranhamlet

Describe the bug
A rather annoying bug that appears to occur because Windows has not included the Rtools environment in its paths. I've found a solution, and flagging here in case this happens to other people who are running the package for the first time.

To Reproduce
Steps to reproduce the behavior:

  1. Installing Rtools, cmdstanr and ww-inference on my CDC VAP.
  2. Successful install of required packages.
  3. Running compile_model() produces the following error
INFO: Could not find files for the given pattern(s).

mingw32-make.exe: Interrupt/Exception caught (code = 0xc0000005, addr = 0x00007ffb221f746b)

Error: An error occured during compilation! See the message above for more information.

Solution
Add new PATH to the windows environment. The issue appears to be that CmdStanR doesnt know where the mingw32-make.exe file is which is required to compile the model.

  1. Type "environment" in the Windows search bar - click on "Edit the system environment variables".
  2. This will open a "System Properties" window on the "Advanced" tab.
  3. Click on "Environment Variables" on the bottom right.
  4. Click on the variable "Path" and then click edit.
  5. Click "New" and then paste in the file path to the folder within your Rtools folder called "mingw64". I.e. C:\rtools44\mingw64.
  6. Click okay.

After completing these steps, compile_model() was able to run successfully.

Session info
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions