stanle / madopt

Apache License 2.0
16 stars 5 forks source link

Install/Import problem (undefined symbol) #6

Closed sschnug closed 8 years ago

sschnug commented 8 years ago

I just stumbled upon this interesting project and followed the Readme to install it. But after installing without warnings/errors, i get the following error while calling examples/get_started.py:

Traceback (most recent call last):
  File "examples/get_started.py", line 1, in <module>
    import madopt
ImportError: /home/XXX/.conda/envs/py2new/lib/python2.7/site-packages/madopt.so: undefined symbol: _ZN5Ipopt16IpoptApplication10InitializeEv

Some remarks:

Further remarks:

Any ideas? Is the current Bonmin version (1.8.4) known to work?

Thanks!

stanle commented 8 years ago

Hey Sascha,

I just did a fresh clone of madopt and it worked with Bonmin 1.8.4.

I am running Arch Linux Python 2.7.11 (Python 3 works as well) Cython version 0.24 gcc (GCC) 6.1.1 20160602 Bonmin 1.8.4 using Cbc 2.9.6 and Ipopt 3.12.4

One thing I can think of is that since you are using the -DCUSTOM flags, I assume that you have a custom bonmin location. You might also have to give that location to the python setup

python setup.py build_ext -I /path/to/bonmin/include -L /path/to/bonmin/lib install

sschnug commented 8 years ago

Thanks for the quick answer! I still don't really understand the exact interaction between cmake, cython and setup.py, but it is working now.

Sadly i can't explain concisely, what needed to be done, but after the modified call to setup.py, as suggested, i obtained a simple libbonmin.so.4 error which was solved with setting LD_LIBRARY_PATH. The strange thing is, that a re-install without the modification (no build_ext used) is now working too.

I should try this again with a clean system, but the conclusion is: madopt is working now

Thanks.