Problem compiling project: error ld with -lproxTV

Hi.

I am compiling a project with ITK 5.1.2 over KDE Neon (based on Ubuntu 20.04 LTS) and I obtain the error: /usr/bin/ld: cannot find -lproxTV. However, if I go to ./itk/lib there is libitkproxTV-5.1.a. And ITK compiled without problem (some warning).

I tried to compile ITK with gcc (9.3.0) and clang (10.0.1) but it shows the same error. I have defined in my .profile:

export VTK_DIR=/opt/vtk/lib/cmake/vtk-9.0
export ITK_DIR=/opt/itk/lib/cmake/ITK-5.1

Can someone help me?

Many thanks.

Are you enabling Module_TotalVariation:BOOL=ON when you compile ITK?
proxTV is fetched when using the TotalVariation module: https://github.com/InsightSoftwareConsortium/ITKTotalVariation

Yes.

And I have USE_SYSTEM_PROXTV to off.

I cannot reproduce using itk master, and a external example requiring ITK TotalVaration module.
The library associated with the target proxTV::proxTV is indeed libitkproxTV (no -lproxTV).

  • Was this working before and now failing with that release, or is it a new project?
  • In your project, do you have any logic specific to the library proxTV?
  • Have you tried a clean build of your project?

Running out of ideas, but I suspect that if it is asking for -lproxTV is because an option in the CACHE is set to use the system proxTV (instead of the internal libitkproxTV).

Double checking, the option is named: ITK_USE_SYSTEM_proxTV, not USE_SYSTEM_PROXTV as you reported. Try setting ITK_USE_SYSTEM_proxTV to OFF.