Skip to content

Uninformative error when using gecode from Windows cmd #206

Description

@arekpaterak

I've encountered a problem while trying to use gecode from Windows cmd, like in the Basic Usage example here: https://docs.minizinc.dev/en/stable/command_line.html

Only output is =====ERROR=====.

Running the same model from MiniZinc IDE with gecode works. Also running the command with other solvers works.

I've tried reinstalling the whole MiniZinc bundle but this hasn't fixed the problem.

Activity

  1. cyderize commented on Nov 3, 2024

    @cyderize
    Member

    I wonder if this is the same issue that's causing MiniZinc/minizinc-python#174

    Could you try running that command with -v for verbose output and see if it outputs anything else?

  2. arekpaterak commented on Nov 4, 2024

    @arekpaterak
    Author

    Sorry that I haven't mentioned that I had already tried running this with --verbose. It stops in the same place as in the linked issue, only difference is that there is also:

    =====ERROR=====
    

    I get an error when I try just open fzn-gecode.exe from File Explorer too.

  3. cyderize commented on Nov 4, 2024

    @cyderize
    Member

    Could you try running minizinc -c --solver gecode model.mzn data.dzn which should create model.fzn and then fzn-gecode model.fzn and see what error it gives you?

    And if you're using powershell, could you run echo $LastExitCode afterwards and see the exit code it ends up with?

    Thanks

  4. cyderize commented on Nov 5, 2024

    @cyderize
    Member

    Actually, after doing some thinking - I suspect what's happening is that we package a version of Gecode which requires the Qt DLLs to be available.

    Running from the IDE happens to allow them to be found since they're in the same folder as the IDE application, but then when running from the command line, the OS can't find them.

    As a workaround, could you try adding the MiniZinc install directory to your PATH? E.g. in PowerShell, you can temporarily change your PATH with

    $env:Path = $env:ProgramFiles + '\MiniZinc;' + $env:Path

    Or if you installed just for your user:

    $env:Path = $env:LocalAppData + '\Programs\MiniZinc;' + $env:Path
  5. arekpaterak commented on Nov 13, 2024

    @arekpaterak
    Author

    Thanks, adding the MiniZinc directory to PATH solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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