coin-or / coin-or/python-mip

Trying to link mip to Debian's CBC package throws undefined error

Open
#165 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Linear Programming
Stars
600
Forks
108
PR merge metrics
No merged PRs in 30d

Description

I installed [coinor-cbc](https://packages.debian.org/buster/coinor-cbc) to my `armhf` system, and did this:
```
export PMIP_CBC_LIBRARY="/usr/lib/arm-linux-gnueabihf/libCbcSolver.so.3.9.9"
export LD_LIBRARY_PATH="/usr/lib/arm-linux-gnueabihf/"
```
as established [here](https://docs.python-mip.com/en/latest/install.html#using-your-own-cbc-binaries-optional).

Then, when I try to execute it on Python's console, I do:
```
>>> from mip import Model, MAXIMIZE, CBC, INTEGER, OptimizationStatus
>>> model = Model(sense=MAXIMIZE, solver_name=CBC)
```
And I inmediately get the error:
```
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/dist-packages/mip/model.py", line 93, in __init__
import mip.cbc
File "/usr/local/lib/python3.7/dist-packages/mip/cbc.py", line 600, in
Osi_getNumCols = cbclib.Osi_getNumCols
File "/usr/local/lib/python3.7/dist-packages/cffi/api.py", line 912, in __getattr__
make_accessor(name)
File "/usr/local/lib/python3.7/dist-packages/cffi/api.py", line 908, in make_accessor
accessors[name](name)
File "/usr/local/lib/python3.7/dist-packages/cffi/api.py", line 838, in accessor_function
value = backendlib.load_function(BType, name)
AttributeError: function/symbol 'Osi_getNumCols' not found in library '/usr/lib/arm-linux-gnueabihf/libCbcSolver.so.3.9.9': /usr/lib/arm-linux-gnueabihf/libCbcSolver.so.3.9.9: undefined symbol: Osi_getNumCols
```

I am using
- Python 3.7.3
- mip 1.12.0
- coinor-cbc 2.9.9+repack1-1
- Debian GNU/Linux 10 (buster)
- Kernel: Linux 4.14.78-g8e54a4b
- Architecture: armv7l

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.