Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITK conflict with lp_solve #4031

Closed
yurivict opened this issue Apr 26, 2023 · 10 comments · Fixed by #4658
Closed

ITK conflict with lp_solve #4031

yurivict opened this issue Apr 26, 2023 · 10 comments · Fixed by #4658
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances

Comments

@yurivict
Copy link

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 yurivict added the type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances label Apr 26, 2023
@SimonRit
Copy link

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?

@yurivict
Copy link
Author

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

@SimonRit
Copy link

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.

@yurivict
Copy link
Author

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

@dzenanz
Copy link
Member

dzenanz commented Apr 27, 2023

Would USE_SYSTEM_LPSOLVE mechanism solve the issue?

@yurivict
Copy link
Author

USE_SYSTEM_LPSOLVE should work if implemented.

@yurivict
Copy link
Author

yurivict commented Jan 2, 2024

@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

@gdevenyi
Copy link
Contributor

gdevenyi commented Jan 3, 2024

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

@yurivict
Copy link
Author

yurivict commented Jan 3, 2024

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

@yurivict
Copy link
Author

yurivict commented Jan 3, 2024

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

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Jan 3, 2024
…the shared library

liblp_solve55.so is renamed into liblp_solve55_itk.so

References:
* InsightSoftwareConsortium/ITK#4031
* RTKConsortium/RTK#548
SimonRit pushed a commit to SimonRit/RTK that referenced this issue Jan 11, 2024
Solves RTKConsortium#548 and InsightSoftwareConsortium/ITK#4031.
lp_solve headers are now installed manually following ITK modules.
SimonRit pushed a commit to SimonRit/RTK that referenced this issue May 8, 2024
Solves RTKConsortium#548 and InsightSoftwareConsortium/ITK#4031.
lp_solve headers are now installed manually following ITK modules.
SimonRit pushed a commit to SimonRit/RTK that referenced this issue May 9, 2024
Solves RTKConsortium#548 and InsightSoftwareConsortium/ITK#4031.
lp_solve headers are now installed manually as is done for ITK's third
party modules.
SimonRit pushed a commit to RTKConsortium/RTK that referenced this issue May 12, 2024
Solves #548 and InsightSoftwareConsortium/ITK#4031.
lp_solve headers are now installed manually as is done for ITK's third
party modules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants