New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 747060 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jul 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 724628



Sign in to add a comment

OpenCV does not build with libc++

Project Member Reported by manojgupta@chromium.org, Jul 20 2017

Issue description

OpenCV currently does not build with libc++. Needs to be forced to libstc++ to make it work in clang.
 
Cc: benchan@chromium.org djkurtz@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/c890e6b017d415a45655a64dcb337599d01e29d9

commit c890e6b017d415a45655a64dcb337599d01e29d9
Author: Manoj Gupta <manojgupta@google.com>
Date: Thu Jul 20 23:41:23 2017

OpenCV: Force to build using libstdc++.

OpenCV does not build when using libc++ in clang.
Force it to use libstdc++ for now.

BUG= chromium:747060 
TEST=OpenCV builds even libc++ is enabled in clang.

Change-Id: Ibd4d30560cc178b27443cea8e56781fb4327dc1d
Reviewed-on: https://chromium-review.googlesource.com/580247
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/c890e6b017d415a45655a64dcb337599d01e29d9/chromeos/config/env/media-libs/opencv

Owner: manojgupta@chromium.org
Status: Started (was: Untriaged)
Is this fixed by using the latest from upstream gentoo?
As in:
https://chromium-review.googlesource.com/#/c/536726/
I tried an it failed. Haven't tried to investigate the root cause.
Status: Verified (was: Started)
Disabled opencv from building with libc++.
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/972d5e2e229cfb8a56c48e21967f048f5238bc9f

commit 972d5e2e229cfb8a56c48e21967f048f5238bc9f
Author: Manoj Gupta <manojgupta@google.com>
Date: Sat Sep 02 04:38:39 2017

OpenCV: Mark operator overload functions as const.

Mark operator functions as const to fix build errors with libc++.
libc++ complains that operators are not const and therefore
cannot use them for comparison.

This is already fixed in upstream OpenCV code.

BUG= chromium:747060 
TEST=OpenCV builds with/without libc++.

Change-Id: I15c2fcf9419984586f0cab0941b2b074a36b13fe
Reviewed-on: https://chromium-review.googlesource.com/648176
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/972d5e2e229cfb8a56c48e21967f048f5238bc9f/chromeos/config/env/media-libs/opencv
[rename] https://crrev.com/972d5e2e229cfb8a56c48e21967f048f5238bc9f/media-libs/opencv/opencv-2.3.0-r8.ebuild
[add] https://crrev.com/972d5e2e229cfb8a56c48e21967f048f5238bc9f/media-libs/opencv/files/opencv-2.3.0-const-operator.patch

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/25cea766cf00fbbb7de98a1979165ead38cf0bee

commit 25cea766cf00fbbb7de98a1979165ead38cf0bee
Author: Manoj Gupta <manojgupta@google.com>
Date: Sat Sep 02 14:50:43 2017

OpenCV: Force building with libstdc++.

OpenCV still needs to be built with libstdc++ because of following errors
on ARM. It uses GNU extension header files which are not provided by libc++.

OpenCV-2.3.0/modules/core/include/opencv2/core/operations.hpp:62:16: fatal error:
       'ext/atomicity.h' file not found
       #include <ext/atomicity.h>
                ^~~~~~~~~~~~~~~~~

BUG= chromium:747060 
TEST=OpenCV builds

Change-Id: I8b8d34991cecfb4e61aa2aa1e63210053ff94e80
Reviewed-on: https://chromium-review.googlesource.com/648746
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Trybot-Ready: Manoj Gupta <manojgupta@chromium.org>

[modify] https://crrev.com/25cea766cf00fbbb7de98a1979165ead38cf0bee/chromeos/config/env/media-libs/opencv

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/030687f21803dbc7d2458e13fa2f1196ba6618d3

commit 030687f21803dbc7d2458e13fa2f1196ba6618d3
Author: Manoj Gupta <manojgupta@google.com>
Date: Tue Jan 16 01:54:51 2018

OpenCV: Fix CV_XADD macro for building with libc++.

CV_XADD was using the header <ext/atomicity.h> which is not
provided by libc++. Fix this by backporting the upstream
OpenCV CV_XADD implementation which does not include
this header file.

BUG= chromium:747060 
TEST=OpenCV builds with libc++ on caroline/kevin.

Change-Id: I2f8d23647be050faa138b632e894d0de7f7b0ee2
Reviewed-on: https://chromium-review.googlesource.com/863204
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Caroline Tice <cmtice@chromium.org>

[modify] https://crrev.com/030687f21803dbc7d2458e13fa2f1196ba6618d3/chromeos/config/env/media-libs/opencv
[rename] https://crrev.com/030687f21803dbc7d2458e13fa2f1196ba6618d3/media-libs/opencv/opencv-2.3.0-r10.ebuild
[add] https://crrev.com/030687f21803dbc7d2458e13fa2f1196ba6618d3/media-libs/opencv/files/opencv-2.3.0-atomic.patch

Sign in to add a comment