Skip to content

Building against the most recent libjasper 2.0.19 fails at grfmt_jpeg2000.cpp with "lvalue required as unary ‘&’ operand". #17984

@Windfisch

Description

@Windfisch
System information (version)
  • OpenCV => 3.4.7 (but likely any version is affected)
  • Operating System / Platform => Arch Linux as of 2020-07-29.
  • Compiler => GCC 10.1
Detailed description

libjasper has recently changed jas_matrix_get from a macro to an inline function (commit 389951d07 @ https://github.com/jasper-software/jasper), causing the build to fail with error: lvalue required as unary ‘&’ operand.

This affects all OpenCV Versions from 2 to 4.

  • for OpenCV 4, there's a fix at Fix build of grfmt_jpeg2000.cpp #17983
  • for OpenCV 3, the patch is identical
  • for OpenCV 2, the same patch works, but the file has a different path (located in highgui, not imgcodec).
Steps to reproduce
  1. Build OpenCV against libjasper 2.0.19 (no earlier version)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions