ITK icon indicating copy to clipboard operation
ITK copied to clipboard

ITK conflict with lp_solve

Open yurivict opened this issue 1 year ago • 10 comments

ITK-5.3.0 installs lib/liblpsolve55.so that is normally installed by lp_solve.

The user complains.

Is lp_solve bundled with ITK?

If yes, it isn't bundled correctly. You should never install libraries from bundled packages. Instead, you should only build a static library and use it internally.

How to unbundle lp_solve?

yurivict avatar Apr 26 '23 20:04 yurivict

I guess you're compiling ITK with Module_RTK=ON? RTK indeed bundles lp_solve, see the corresponding CMakeLists.txt. The way it's done can probably be improved. Are all third party libraries static in ITK?

SimonRit avatar Apr 27 '23 04:04 SimonRit

ITK installs lpsolve as shared library. I don't see any other third party libraries in the plist.

yurivict avatar Apr 27 '23 05:04 yurivict

Maybe someone more expect than me can pitch in. I don't even know what's a plist and I'm surprised that there is no other third party library. Should the library be renamed or statically compiled? BTW, I'm surprised that RTK is included in the default InsightToolkit package.

SimonRit avatar Apr 27 '23 05:04 SimonRit

plist is FreeBSD port's installed files list. RTK was probably enabled in addition to the default configuration.

yurivict avatar Apr 27 '23 05:04 yurivict

Would USE_SYSTEM_LPSOLVE mechanism solve the issue?

dzenanz avatar Apr 27 '23 18:04 dzenanz

USE_SYSTEM_LPSOLVE should work if implemented.

yurivict avatar Apr 27 '23 19:04 yurivict

@N-Dekker

Hi Niels,

Do you know if the problem of conflicting lp_solve being installed by RTK is solved in the latest ITK's RC?

Thank you, Yuri

yurivict avatar Jan 02 '24 23:01 yurivict

Isn't this a case were ITK should be mangling the symbols to prevent system conflicts? (a la HDF5?)

gdevenyi avatar Jan 03 '24 02:01 gdevenyi

They should either mangle the symbols and rename the library, or just use the external lp_solve if possible.

yurivict avatar Jan 03 '24 02:01 yurivict

I corrected the FreeBSD port science/InsightToolkit so that there is no more conflict on FreeBSD: https://cgit.freebsd.org/ports/commit/science?id=95e83829519a47602dbebfc270bce61551449d33

yurivict avatar Jan 03 '24 06:01 yurivict