Error building Cbc

Was hoping I could get help with this issue regarding Cbc. I may have been wrong by assuming the package comes together with the Julia installation. I got this error while trying to solve an MILP. Not sure how else to try and remedy it.

julia> Pkg.build("Cbc")
WARNING: Base.Pkg is deprecated, run `using Pkg` instead
 in module Main
  Building LibCURL ─→ `C:\Users\Chiebuka\.julia\packages\LibCURL\OoXMv\deps\build.log`
  Building WinRPM ──→ `C:\Users\Chiebuka\.julia\packages\WinRPM\Y9QdZ\deps\build.log`
  Building Homebrew → `C:\Users\Chiebuka\.julia\packages\Homebrew\l8kUw\deps\build.log`
  Building Cbc ─────→ `C:\Users\Chiebuka\.julia\packages\Cbc\s0xmI\deps\build.log`
┌ Error: Error building `Cbc`:
│
│ ERROR: The system cannot find the file specified.
│ C:\Users\Chiebuka\.julia\packages\WinRPM\Y9QdZ\cache\2\mingw64-libstdc%2B%2B6-8.2.0-2.1.noarch.cpio
│
│
│
│ System ERROR:
│ The system cannot find the file specified.
│ [ Info: Updating WinRPM package list
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Leap_42.2/repodata/repomd.xml
│ ┌ Info: Packages to install:
│ └   join(names(todo), ", ") = "libstdc++6, Cbc"
│ ┌ Info: Downloading:
│ └   name = "libstdc++6"
│ ┌ Info: Extracting:
│ └   name = "libstdc++6"
│ ERROR: LoadError: MethodError: no method matching pipeline_error(::Int64)
│ Closest candidates are:
│   pipeline_error(!Matched::Base.ProcessChain) at process.jl:718
│   pipeline_error(!Matched::Base.Process) at process.jl:711
│ Stacktrace:
│  [1] macro expansion at .\logging.jl:309 [inlined] (repeats 2 times)
│  [2] do_install(::WinRPM.Package) at C:\Users\Chiebuka\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:465
│  [3] do_install at C:\Users\Chiebuka\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:456 [inlined]
│  [4] macro expansion at .\logging.jl:320 [inlined]
│  [5] #install#19(::Bool, ::Function, ::WinRPM.Package) at C:\Users\Chiebuka\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:385
│  [6] #install at .\none:0 [inlined]
│  [7] #install#17 at C:\Users\Chiebuka\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:372 [inlined]
│  [8] #install at .\none:0 [inlined] (repeats 2 times)
│  [9] (::getfield(WinRPM, Symbol("##34#35")){WinRPM.RPM})() at C:\Users\Chiebuka\.julia\packages\WinRPM\Y9QdZ\src\winrpm_bindeps.jl:42
│  [10] run(::getfield(WinRPM, Symbol("##34#35")){WinRPM.RPM}) at C:\Users\Chiebuka\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:478
│  [11] macro expansion at .\logging.jl:308 [inlined]
│  [12] run(::BinDeps.SynchronousStepCollection) at C:\Users\Chiebuka\.julia\packages\BinDeps\ZEval\src\BinDeps.jl:518
│  [13] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users\Chiebuka\.julia\packages\BinDeps\ZEval\src\dependencies.jl:944
│  [14] satisfy!(::BinDeps.LibraryDependency) at C:\Users\Chiebuka\.julia\packages\BinDeps\ZEval\src\dependencies.jl:922
│  [15] top-level scope at C:\Users\Chiebuka\.julia\packages\BinDeps\ZEval\src\dependencies.jl:977
│  [16] include at .\boot.jl:317 [inlined]
│  [17] include_relative(::Module, ::String) at .\loading.jl:1038
│  [18] include(::Module, ::String) at .\sysimg.jl:29
│  [19] include(::String) at .\client.jl:398
│  [20] top-level scope at none:0
│ in expression starting at C:\Users\Chiebuka\.julia\packages\Cbc\s0xmI\deps\build.jl:64
│
│ 7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
│
│ Scanning the drive for archives:
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v0.7\Pkg\src\Operations.jl:1068

julia>

Almost nothing “comes with” Julia, but it is all easily installable, e.g.

using Pkg   # load the package manager

Pkg.add("Cbc")  # install the Cbc package

using Cbc   # load the Cbc package

# stuff that actually uses the package here

From the REPL (command-line) version of Julia, instead just type

] add Cbc

The ] will put you in a special package manager mode. (Leave it with backspace.)

1 Like

Thanks for replying to me. I did try the Pkg.add option to install the Cbc package.

But then when I tried to run my .jl file, I had these errors:

[ Info: Precompiling Cbc [9961bab8-2fa3-5c5a-9d89-47fab24efd76]
ERROR: LoadError: Cbc not properly installed. Please run Pkg.build("Cbc")
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] top-level scope at C:\Users\Chiebuka\.julia\packages\Cbc\s0xmI\src\Cbc.jl:8
 [3] include at .\boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at .\loading.jl:1038
 [5] include(::Module, ::String) at .\sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at .\boot.jl:319 [inlined]
 [8] eval(::Expr) at .\client.jl:399
 [9] top-level scope at .\none:3
in expression starting at C:\Users\Chiebuka\.julia\packages\Cbc\s0xmI\src\Cbc.jl:5
ERROR: LoadError: Failed to precompile Cbc [9961bab8-2fa3-5c5a-9d89-47fab24efd76] to C:\Users\Chiebuka\.julia\compiled\v0.7\Cbc\ARPfV.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1185
 [4] macro expansion at .\logging.jl:311 [inlined]
 [5] _require(::Base.PkgId) at .\loading.jl:941
 [6] require(::Base.PkgId) at .\loading.jl:852
 [7] macro expansion at .\logging.jl:311 [inlined]
 [8] require(::Module, ::Symbol) at .\loading.jl:834
 [9] include_string(::Module, ::String, ::String) at .\loading.jl:1002
 [10] (::getfield(Atom, Symbol("##128#133")){String,String,Module})() at C:\Users\Chiebuka\.julia\packages\Atom\Fha1N\src\eval.jl:120
 [11] withpath(::getfield(Atom, Symbol("##128#133")){String,String,Module}, ::String) at C:\Users\Chiebuka\.julia\packages\CodeTools\hB4Hy\src\utils.jl:30
 [12] withpath at C:\Users\Chiebuka\.julia\packages\Atom\Fha1N\src\eval.jl:46 [inlined]
 [13] #127 at C:\Users\Chiebuka\.julia\packages\Atom\Fha1N\src\eval.jl:117 [inlined]
 [14] hideprompt(::getfield(Atom, Symbol("##127#132")){String,String,Module}) at C:\Users\Chiebuka\.julia\packages\Atom\Fha1N\src\repl.jl:84
 [15] macro expansion at C:\Users\Chiebuka\.julia\packages\Atom\Fha1N\src\eval.jl:116 [inlined]
 [16] (::getfield(Atom, Symbol("##126#131")){Dict{String,Any}})() at .\task.jl:85
in expression starting at H:\Work\Engineering Soft\Julia + ATOM\JuMP Examples\Philip Thomas\sudoku.jl:7

So I went ahead with the Pkg.build option and that’s when I got the error I posted initially.

It looks like this package hasn’t yet been updated for Julia 0.7 / 1.0?

What do you think might be a preferred solution? Should I revert to Julia 0.6? You think I may not have these problems with that version, or wait till its been updated for Julia 0.7/1.0?

You can try with 0.6 (which you can install alongside 0.7, without affecting the 0. 7 installation).

Are there other solvers you can try?

Ok cool. I’d install 0.6. Perhaps Gurobi would suffice for now. Thanks a lot for the help.

Try removing Cbc and re-adding it. It should work on v1.0.

However, make sure to read:

I am getting the same error with Windows 10 and Julia 1.0.1
I can build Cbc with Mac OSX without any problem but on Windows, it keeps giving an error.

Can you provide more information? Please provide a copy of the text of the error, not a screenshot.

Here is the error:

Error: Error building Cbc :

│ ERROR: The system cannot find the file specified.
│ C:\Users<user>.julia\packages\WinRPM\Y9QdZ\cache\2\mingw64-libstdc%2B%2B6-8.2.0-2.1.noarch.cpio



│ System ERROR:
│ The system cannot find the file specified.
│ [ Info: Updating WinRPM package list
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
│ [ Info: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Leap_42.2/repodata/repomd.xml
│ ┌ Info: Packages to install:
│ └ join(names(todo), “, “) = “libstdc++6, Cbc”
│ ┌ Info: Downloading:
│ └ name = “libstdc++6”
│ ┌ Info: Extracting:
│ └ name = “libstdc++6”
│ ERROR: LoadError: MethodError: no method matching pipeline_error(::Int64)
│ Closest candidates are:
│ pipeline_error(!Matched::Base.ProcessChain) at process.jl:711
│ pipeline_error(!Matched::Base.Process) at process.jl:704
│ Stacktrace:
│ [1] macro expansion at .\logging.jl:309 [inlined] (repeats 2 times)
│ [2] do_install(::WinRPM.Package) at C:\Users<user>.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:465
│ [3] do_install at C:\Users<user>.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:456 [inlined]
│ [4] macro expansion at .\logging.jl:320 [inlined]
│ [5] #install#19(::Bool, ::Function, ::WinRPM.Package) at C:\Users<user>.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:385
│ [6] #install at .\none:0 [inlined]
│ [7] #install#17 at C:\Users<user>.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:372 [inlined]
│ [8] #install at .\none:0 [inlined] (repeats 2 times)
│ [9] (::getfield(WinRPM, Symbol(”##34#35”)){WinRPM.RPM})() at C:\Users<user>.julia\packages\WinRPM\Y9QdZ\src\winrpm_bindeps.jl:42
│ [10] run(::getfield(WinRPM, Symbol(“##34#35”)){WinRPM.RPM}) at C:\Users<user>.julia\packages\BinDeps\ZEval\src\BinDeps.jl:478
│ [11] macro expansion at .\logging.jl:308 [inlined]
│ [12] run(::BinDeps.SynchronousStepCollection) at C:\Users<user>.julia\packages\BinDeps\ZEval\src\BinDeps.jl:518
│ [13] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users<user>.julia\packages\BinDeps\ZEval\src\dependencies.jl:944
│ [14] satisfy!(::BinDeps.LibraryDependency) at C:\Users<user>.julia\packages\BinDeps\ZEval\src\dependencies.jl:922
│ [15] top-level scope at C:\Users<user>.julia\packages\BinDeps\ZEval\src\dependencies.jl:977
│ [16] include at .\boot.jl:317 [inlined]
│ [17] include_relative(::Module, ::String) at .\loading.jl:1041
│ [18] include(::Module, ::String) at .\sysimg.jl:29
│ [19] include(::String) at .\client.jl:388
│ [20] top-level scope at none:0
│ in expression starting at C:\Users<user>.julia\packages\Cbc\s0xmI\deps\build.jl:64

│ 7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04

│ Scanning the drive for archives:
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1069

1 Like

I face the same issue (with WIN 10). Same error message. I tried to reinstall WinRPM, which seems to be part of the problem, but without success.

See build fails on Windows on 0.7/1.0 · Issue #56 · jump-dev/Cbc.jl · GitHub

I found a solution for that. The error is about finding a file in WinRPM package so when you change the file name

"mingw64-libstdc++6-8.2.0-2.1.noarch.cpio" to
"mingw64-libstdc%2B%2B6-8.2.0-2.3.noarch.cpio" in
C:\Users&lt;user&gt;.julia\packages\WinRPM\Y9QdZ\cache\2

folder it builds fine.
But we still need a generic solution.

Your solution works like a charm ! Many thanks.
I can go back to MILP problems using JuMP now :slight_smile: