Skip to content

Fix build of grfmt_jpeg2000.cpp#17983

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
Windfisch:Windfisch-patch-jpeg2000
Jul 31, 2020
Merged

Fix build of grfmt_jpeg2000.cpp#17983
opencv-pushbot merged 1 commit intoopencv:3.4from
Windfisch:Windfisch-patch-jpeg2000

Conversation

@Windfisch
Copy link
Copy Markdown
Contributor

@Windfisch Windfisch commented Jul 29, 2020

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

This likely also affects the Opencv 3 and 2 branches; I can create a PR for these, too, if desired.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

@asmorkalov
Copy link
Copy Markdown
Contributor

@Windfisch Thanks for the contribution. I tested the patch with Ubuntu 18.04 and it works as designed. The same issue is reproducible with branch 3.4 too. Could you re-base your branch to 3.4 and re-target the PR 3.4 branch. You can do it in-place, no need to create new one. We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

@asmorkalov asmorkalov added the pr: needs rebase Rebase patch (and squash fixup commits) on the top of target branch label Jul 30, 2020
@Windfisch Windfisch changed the base branch from master to 3.4 July 30, 2020 17:22
libjasper has recently changed `jas_matrix_get` from a macro to an inline function
(389951d071 in https://github.com/jasper-software/jasper), causing the build to fail.
@Windfisch
Copy link
Copy Markdown
Contributor Author

Thank you for your feedback, @asmorkalov! I have rebased this PR, and I have additionally created PR #17996 to backport this fix into 2.4. Hope this is fine.

@asmorkalov
Copy link
Copy Markdown
Contributor

@mshabunin I think we can merge the patch.

@asmorkalov asmorkalov self-assigned this Jul 31, 2020
@opencv-pushbot opencv-pushbot merged commit 0d1d452 into opencv:3.4 Jul 31, 2020
@alalek alalek mentioned this pull request Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants