Menu

#376 GDCM selects randomly from installed OpenJPEG versions

2.6.5
closed
None
5
2016-06-29
2016-03-23
Gert Wollny
No

Hello Matheu,

the CMake/FindOpenJPEG.cmake selects the version to compile against based on the include file name only. If e.g. openjpeg v1.5.2 and v2.1.0 are installed with dev-files then which version is used is only determined by the order in the file system in which the corresponding sub-directories are listed. This is a problem on distributions like Gentoo, where no separate dev and lib packages exist. See also.

Also note that in this FindOpenJPEG.cmake the openjpeg version is fixed to the 1.X series, because of the given library name.

I'll think of a patch, unless you beat me to it.

Best,
Gert

Discussion

  • Mathieu Malaterre

    well... the actual real solution is that libopenjp2-7-dev conflicts with libopenjpeg-dev

     
  • Mathieu Malaterre

    hum nevermind... let's say that behavior by default is to pick the highest version first. So 2.1 should be found first (before 1.5.x).

     
  • Mathieu Malaterre

    • summary: GDCM selects raandomly from installed OpenJPEG versions --> GDCM selects randomly from installed OpenJPEG versions
     
  • Mathieu Malaterre

    • assigned_to: Mathieu Malaterre
     
  • Gert Wollny

    Gert Wollny - 2016-03-23

    Is 2.1 already supported?

     
  • Mathieu Malaterre

    At some point I did support some kind of 2.x API, so I would say yes ... feel free to report another bug if compilation fails (cant remember from top of my head, but I suspect from your message that it does not).

     
  • Gert Wollny

    Gert Wollny - 2016-03-23

    Considering that you didn't close [bugs:#356] yet, I'd guess it doesn't.

    Regarding the issue at hand, the guy who reported it provided a fix (patch attached) by using pkg-config and pinning it to use libopenjpeg1.

     

    Related

    Bugs: #356


    Last edit: Gert Wollny 2016-03-23
  • Mathieu Malaterre

    should we really care of libopenjpeg 1.x anymore now ?

     
  • Gert Wollny

    Gert Wollny - 2016-06-29

    I don't think so, but I remember another patch I sent for another issue where you insisted that it shoud be backward compatible.

     
  • Mathieu Malaterre

    Not sure what this means...anyway applied as-is.

    [release 5cf6bf9] Bug #376 GDCM selects randomly from installed OpenJPEG versions
    Author: Gert Wollny gw.fossdev@gmail.com
    1 file changed, 10 insertions(+), 1 deletion(-)

     
  • Mathieu Malaterre

    • status: open --> closed
    • Group: 2.7 --> 2.6.5
     

Log in to post a comment.

MongoDB Logo MongoDB