JuliaLang / JuliaLang/PackageCompiler.jl
Issue with generate_precompile.
- Dominant language
- Julia
- Stars
- 1.6k
- Forks
- 205
- Avg merge
- 18h 37m
- Merged PRs (30d)
- 7
Description
Hello,
I am working on a project where I am trying to interface Julia and C++ code (i.e., embedding Julia code in C++). For reference, I am using a package structure similar to: [libcg/CG](https://github.com/simonbyrne/libcg/tree/master/CG).
The associated Julia code I am working with uses JuMP, MOI (MathOptInterface) and Mosek for a numerical optimization task. My `generate_precompile.jl` code runs perfectly if I simply cd to my package directory and call:
`julia --startup-file=no --project=. build/generate_precompile.jl`
However, when I try to call `PackageCompiler.create_library` with this same `generate_precompile` function, I get the following error relating to the MOI package:
```
ERROR: LoadError: MathOptInterface.UnsupportedConstraint{MathOptInterface.ScalarQuadraticFunction{Float64}, MathOptInterface.LessThan{Float64}}: 'MathOptInterface.ScalarQuadraticFunction{Float64}'-in-'MathOptInterface.LessThan{Float64}' constraint is not supported by the model: Unable to transform a quadratic constraint into a second-order cone constraint because the quadratic constraint is not strongly convex.
Convex constraints that are not strongly convex (i.e., the matrix is positive semidefinite but not positive definite) are not supported yet.
Note that a quadratic equality constraint is non-convex.
```
It appears this issue above was fixed in jump-dev/MathOptInterface.jl#529, so it is unclear why it is still occurring specifically when using the `create_library` feature. I am unsure if this is an issue with MOI's build process, or with PackageCompiler, but I welcome any debugging suggestions or ideas.
For reference, I have localized which portions of my optimization problem setup are triggering the issue and preventing compilation, however I am unable to reformalize the problem without compromising the intended purpose of the code.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing `julia --startup-file=no --project=. build/generate_precompile.jl` with the `PackageCompiler.create_library` path using the reported JuMP, MathOptInterface, and Mosek setup. Inspect `build/generate_precompile.jl` and the `generate_precompile` entry point, then check why the create-library path still produces the unsupported quadratic-constraint error addressed by MathOptInterface.jl#529. Done means isolating whether PackageCompiler or MathOptInterface causes the differing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100