COPT-Public / COPT.jl

Julia interface for COPT (Cardinal Optimizer)
Other
36 stars 4 forks source link

Unable to precompile COPT 1.1.9 on MacOS and Julia 1.9.2 #31

Closed bachdavi closed 11 months ago

bachdavi commented 11 months ago

Hello everyone!

I tried upgrading COPT from 1.1.6 → 1.1.9, but am getting an error when trying to precompile:

julia> using COPT                                                          
[ Info: Precompiling COPT [227a2e2d-e949-4d8e-a1da-7384fe6f0b9f]           
  Downloaded artifact: copt                                                                                                                            
  Downloaded artifact: copt                                                
ERROR: LoadError: Unable to automatically download/install artifact 'copt' from sources listed in '/Users/david/.julia/packages/COPT/QtdIh/Artifacts.to
ml'.                             
Sources attempted:                                                                                                                                     
- https://pkg.julialang.org/artifact/e092eb9b0a1a4d046979d2f165e3aa2ec5863ddf  
    Error: Tree Hash Mismatch!   
  Expected git-tree-sha1:   e092eb9b0a1a4d046979d2f165e3aa2ec5863ddf                                                                                   
  Calculated git-tree-sha1: 871d4cf160e0eafef8f899b699ebd1a0c456d2f7                                                                                   
- https://pub.shanshu.ai/download/copt/6.5.11/aarch64/CardinalOptimizer-6.5.11-aarch64_mac.tar.gz                                                      
    Error: Tree Hash Mismatch!
  Expected git-tree-sha1:   e092eb9b0a1a4d046979d2f165e3aa2ec5863ddf                                                                                   
  Calculated git-tree-sha1: 871d4cf160e0eafef8f899b699ebd1a0c456d2f7       

Steps to reproduce:

  1. Run Julia 1.9.2
  2. using Pkg; Pkg.add("COPT")
  3. using COPT

I'm running MacOS Ventura 13.5.2.

The last working version for me is 1.1.7.

Thank you!

bachdavi commented 11 months ago

Oddly enough, the error does not happen in our CI. Our CI runs Julia 1.9 on MacOS and Linux. So maybe it is on my side after all.

joachimdahl commented 11 months ago

I am not sure what the issue is, but I am still looking.

Does it work if you remove the previous version of COPT first? using Pkg; Pkg.rm("COPT")

bachdavi commented 11 months ago

Yes, I've tried this a few times and also removed all references of COPT from .julia.

joachimdahl commented 11 months ago

I've not yet been to able to figure out what's wrong. I cannot reproduce on Linux, but a colleague can reproduce on Mac.

As a temporary solution you can set JULIA_PKG_IGNORE_HASHES=1, as suggested here: https://github.com/JuliaLang/Pkg.jl/issues/1860

joachimdahl commented 11 months ago

Our newest release 1.1.10 seems to resolve this issue. If you can confirm, then I will close this issue.

mzy2240 commented 11 months ago

what's the difference between aarch64_mac and universal_mac? will that introduce any performance penlty? I saw the changes in the latest release

joachimdahl commented 11 months ago

what's the difference between aarch64_mac and universal_mac? will that introduce any performance penlty? I saw the changes in the latest release

The new universal package bundles binaries for both MacOS architectures. There is no performance penalty or change in the executable code.

bachdavi commented 11 months ago

Can confirm. The new release resolves the issue! Thank you very much!