Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails on Windows on 0.7/1.0 #56

Closed
jcheyns opened this issue Jul 24, 2018 · 19 comments · Fixed by #92
Closed

build fails on Windows on 0.7/1.0 #56

jcheyns opened this issue Jul 24, 2018 · 19 comments · Fixed by #92

Comments

@jcheyns
Copy link

jcheyns commented Jul 24, 2018

seems to be looking for
mingw64-libstdc **%2B%2B**6-7.2.0-3.2.noarch.cpio
in stead of mingw64-libstdc**++**6-7.2.0-3.2.noarch.cpio.
Encoding issue I presume?

@jcheyns jcheyns changed the title build on 0.7.0 beat2 fails build on 0.7.0 beta2 fails Jul 24, 2018
@jcheyns
Copy link
Author

jcheyns commented Aug 1, 2018

The root cause seems to be JuliaPackaging/WinRPM.jl#150

@mlubin mlubin changed the title build on 0.7.0 beta2 fails build fails on Windows on 0.7/1.0 Sep 16, 2018
@orhanabar
Copy link

Is there any solution for this error?

@jcheyns
Copy link
Author

jcheyns commented Oct 16, 2018

see JuliaPackaging/WinRPM.jl#157

I still need to create a test for the solution, need to find some time to do so...

@jwveysey
Copy link

For what it's worth, I'd also be grateful to see a solution to this issue. Thanks!

@jcheyns
Copy link
Author

jcheyns commented Oct 17, 2018 via email

@orhanabar
Copy link

In order to build Cbc on windows 10, should I install an earlier version of Julia?
If that is the case, what version should I install?

@mlubin
Copy link
Member

mlubin commented Oct 19, 2018

Cbc works on Julia 0.6.x under Windows.

@orhanabar
Copy link

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<user>.julia\packages\WinRPM\Y9QdZ\cache\2 folder it builds fine.
But we still need a generic solution.

@jcheyns
Copy link
Author

jcheyns commented Oct 21, 2018 via email

@orhanabar
Copy link

I am new in github and julia. So, what does PR mean and how can I apply?
When I run add Cbc or build Cbc in a Windows machine, I am still getting the same error. (I install julia first time on my friend's machine and tried building Cbc.)

@jcheyns
Copy link
Author

jcheyns commented Oct 22, 2018

A PR is a Pull Request. It is a way to merge code changes and keep track of all the changes.
I think the easiest way for you is to wait untill the PR JuliaPackaging/WinRPM.jl#157 is merged into the WinRPM release.
Apart from that you could tell your Julia to use a specific version of WinRPM.
Read up on the Package management on https://docs.julialang.org/en/v1/stdlib/Pkg/index.html
to use a specific commit use a command like:
add Example#master

@Plug11
Copy link

Plug11 commented Nov 11, 2018

I worked around the build issues on Windows (with help from the above - thanks). However, I now get a runtime Access Violation Exception, see error below (tried on two different machines). Is anyone else experiencing this?

Error:

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks. Exception: EXCEPTION_ACCESS_VIOLATION at 0x6545d917 -- ZN21OsiClpSolverInterface12initialSolveEv at C:\Users\XXX\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\libOsiClp-1.dll (unknown line) in expression starting at D:\julia\src\simple_example.jl:30 ZN21OsiClpSolverInterface12initialSolveEv at C:\Users\XXX\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\libOsiClp-1.dll (unknown line) ZN8CbcModel12initialSolveEv at C:\Users\XXX\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\libCbc-3.dll (unknown line) Z8CbcMain1iPPKcR8CbcModelPFiPS2_iER19CbcSolverUsefulData at C:\Users\XXX\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\libCbcSolver-3.DLL (unknown line) Z8CbcMain1iPPKcR8CbcModel at C:\Users\XXX\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\libCbcSolver-3.DLL (unknown line) Cbc_solve at C:\Users\XXX\.julia\packages\WinRPM\Y9QdZ\deps\usr\x86_64-w64-mingw32\sys-root\mingw\bin\libCbcSolver-3.DLL (unknown line) solve at C:\Users\XXX\.julia\packages\Cbc\YmHuC\src\CbcCInterface.jl:67 [inlined] optimize! at C:\Users\XXX\.julia\packages\Cbc\YmHuC\src\CbcSolverInterface.jl:152 unknown function (ip: 000000000DEDF2A7) jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1831 jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184 #solve#120 at C:\Users\XXX\.julia\packages\JuMP\Xvn0n\src\solvers.jl:175 unknown function (ip: 000000000DED91E7) jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1831 jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184 [inlined] jl_apply at /home/Administrator/buildbot/worker/package_win64/build/src\julia.h:1537 [inlined] jl_invoke at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:56 solve at C:\Users\XXX\.julia\packages\JuMP\Xvn0n\src\solvers.jl:150 jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1831 jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184 do_call at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:324 eval_value at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:430 eval_stmt_value at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:363 [inlined] eval_body at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:678 jl_interpret_toplevel_thunk_callback at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:795 unknown function (ip: FFFFFFFFFFFFFFFE) unknown function (ip: 00000000121BA76F) unknown function (ip: FFFFFFFFFFFFFFFF) jl_toplevel_eval_flex at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:813 jl_parse_eval_all at /home/Administrator/buildbot/worker/package_win64/build/src\ast.c:838 jl_load at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:847 [inlined] jl_load_ at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:854 include at .\boot.jl:317 [inlined] include_relative at .\loading.jl:1041 include at .\sysimg.jl:29 jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184 include at .\client.jl:388 jl_fptr_trampoline at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1831 jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184 do_call at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:324 eval_value at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:430 eval_stmt_value at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:363 [inlined] eval_body at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:678 jl_interpret_toplevel_thunk_callback at /home/Administrator/buildbot/worker/package_win64/build/src\interpreter.c:795 unknown function (ip: FFFFFFFFFFFFFFFE) unknown function (ip: 0000000003D9CDCF) unknown function (ip: FFFFFFFFFFFFFFFF) jl_toplevel_eval_flex at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:813 jl_toplevel_eval_in at /home/Administrator/buildbot/worker/package_win64/build/src\builtins.c:622 eval at .\boot.jl:319 jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184 eval_user_input at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPL.jl:85 macro expansion at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\REPL\src\REPL.jl:117 [inlined] #28 at .\task.jl:259 jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184 jl_apply at /home/Administrator/buildbot/worker/package_win64/build/src\julia.h:1537 [inlined] start_task at /home/Administrator/buildbot/worker/package_win64/build/src\task.c:268 Allocations: 34021429 (Pool: 34011834; Big: 9595); GC: 71

@odow
Copy link
Member

odow commented Nov 11, 2018

@Plug11 can you provide a reproducible example?

@Plug11
Copy link

Plug11 commented Nov 13, 2018

Hi, sorry for the delay, the problem seems to be an interaction between Clp and Cbc. If I include using Clp in my code before creating and solving a Cbc problem, it crashes; if I don't it doesn't. The crash doesn't happen on Julia 0.6.3, but does on 1.0.1 and 1.0.2 on two different machines, Windows 64-bit. Here is the code and the output. Knowing that it seems to be an interaction with Clp, gives an workaround.

### When we load the Clp package, it causes Cbc to crash
### Comment the following line and the crash does not happen
using Clp

using JuMP
using Cbc

m = Model(solver = CbcSolver())
@variable(m, 0 <= x <= 2 )
@variable(m, 0 <= y <= 30, Int)

@objective(m, Max, 5x + 3*y )
@constraint(m, 1x + 5y <= 3.0 )

print(m)

status = solve(m)

println("Objective value: ", getobjectivevalue(m))
println("x = ", getvalue(x))
println("y = ", getvalue(y))

image

@mlubin
Copy link
Member

mlubin commented Nov 14, 2018

That makes sense. Clp and Cbc both have dependencies in common that are currently provided by different (and possibly conflicting) dlls. The fix is likely to move Cbc to BinaryBuilder. @juan-pablo-vielma has been working on this but ran into technical issues that are blocked by missing functionality in BinaryBuilder.

@juan-pablo-vielma
Copy link
Contributor

The missing BB functionality was just added and the windows bug for Clp seems to be resolved, so it looks like I am back on track with the move to BB 🤞

@Plug11
Copy link

Plug11 commented Nov 16, 2018

Great, good to hear we have a solution on the way!

@juan-pablo-vielma
Copy link
Contributor

@Plug11 can please try if these versions of Clp/Cbc work on your system
(v1.0) pkg> add https://github.com/juan-pablo-vielma/Cbc.jl.git https://github.com/juan-pablo-vielma/Clp.jl.git

@Plug11
Copy link

Plug11 commented Nov 30, 2018

Hi @juan-pablo-vielma, thanks very much for this! I installed and ran the test script and it now runs through and gets the result without crashing. I did get some warnings which I post below in case they are of interest.

(v1.0) pkg> add https://github.com/juan-pablo-vielma/Cbc.jl.git https://github.c
om/juan-pablo-vielma/Clp.jl.git
  Updating registry at `C:\Users\XXXXX\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Cloning git-repo `https://github.com/juan-pablo-vielma/Cbc.jl.git`
  Updating git-repo `https://github.com/juan-pablo-vielma/Cbc.jl.git`
   Cloning git-repo `https://github.com/juan-pablo-vielma/Clp.jl.git`
  Updating git-repo `https://github.com/juan-pablo-vielma/Clp.jl.git`
 Resolving package versions...
 Installed Compat ────────────── v1.4.0
 Installed BinaryProvider ────── v0.5.3
 Installed LinQuadOptInterface ─ v0.4.3
 Installed StaticArrays ──────── v0.10.0
 Installed MathOptInterface ──── v0.6.4
  Updating `C:\Users\XXXXX\.julia\environments\v1.0\Project.toml`
  [9961bab8] ↑ Cbc v0.4.2 ? v0.4.3+ #jpv/bbmultigcc (https://github.com/juan-pab
lo-vielma/Cbc.jl.git)
  [e2554f3b] ↑ Clp v0.5.1 ? v0.5.1+ #jpv/bbmultigcc (https://github.com/juan-pab
lo-vielma/Clp.jl.git)
  Updating `C:\Users\XXXXX\.julia\environments\v1.0\Manifest.toml`
  [b99e7846] ↑ BinaryProvider v0.5.2 ? v0.5.3
  [e1450e63] - BufferedStreams v1.0.0
  [9961bab8] ↑ Cbc v0.4.2 ? v0.4.3+ #jpv/bbmultigcc (https://github.com/juan-pab
lo-vielma/Cbc.jl.git)
  [e2554f3b] ↑ Clp v0.5.1 ? v0.5.1+ #jpv/bbmultigcc (https://github.com/juan-pab
lo-vielma/Clp.jl.git)
  [34da2185] ↑ Compat v1.3.0 ? v1.4.0
  [0862f596] - HTTPClient v0.2.1
  [d9be37ee] - Homebrew v0.7.0
  [682c06a0] - JSON v0.19.0
  [b27032c2] - LibCURL v0.4.1
  [522f3ed2] - LibExpat v0.5.0
  [2ec943e9] - Libz v1.0.0
  [f8899e07] ↑ LinQuadOptInterface v0.4.2 ? v0.4.3
  [b8f27783] ↑ MathOptInterface v0.6.2 ? v0.6.4
  [90137ffa] ↑ StaticArrays v0.9.2 ? v0.10.0
  [c17dfb99] - WinRPM v0.4.2
  Building Cbc → `C:\Users\XXXXX\.julia\packages\Cbc\1omvo\deps\build.log`

  Building Clp → `C:\Users\XXXXX\.julia\packages\Clp\vndne\deps\build.log`


julia> cd("\\\\gb-slo-svv-3326\\Projects\\PromoOpt\\graham\\tmp")

julia> include("cbc-bug.jl")
[ Info: Recompiling stale cache file C:\Users\XXXXX\.julia\compiled\v1.0\C
lp\UsKiE.ji for Clp [e2554f3b-3117-50c0-817c-e040a3ddf72d]
[ Info: Recompiling stale cache file C:\Users\XXXXX\.julia\compiled\v1.0\J
uMP\DmXqY.ji for JuMP [4076af6c-e467-56ae-b986-b466b2749572]
[ Info: Recompiling stale cache file C:\Users\XXXXX\.julia\compiled\v1.0\C
bc\ARPfV.ji for Cbc [9961bab8-2fa3-5c5a-9d89-47fab24efd76]
┌ Warning: Package Cbc does not have Libdl in its dependencies:
│ - If you have Cbc checked out for development and have
│   added Libdl as a dependency but haven't updated your primary
│   environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with Cbc
└ Loading Libdl into Cbc from project dependency, future warnings for Cbc are su
ppressed.
Max 5 x + 3 y
Subject to
 x + 5 y <= 3
 0 <= x <= 2
 0 <= y <= 30, integer
Objective value: 10.0
x = 2.0
y = 0.0

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

Successfully merging a pull request may close this issue.

7 participants