Skip to content

only build OpenCV with IPP support on x86_64 systems#2056

Merged
boegel merged 3 commits intoeasybuilders:developfrom
bear-rsg:non-intel-opencv
Jul 4, 2020
Merged

only build OpenCV with IPP support on x86_64 systems#2056
boegel merged 3 commits intoeasybuilders:developfrom
bear-rsg:non-intel-opencv

Conversation

@edmondac
Copy link
Copy Markdown
Contributor

This is a small change to exclude trying to build OpenCV using the Intel Integrated Performance Primitives on non-X86 systems.

@edmondac
Copy link
Copy Markdown
Contributor Author

Without whitespace changes, it just looks like this:

diff --git a/easybuild/easyblocks/o/opencv.py b/easybuild/easyblocks/o/opencv.py
index 1660b92..c6f95d5 100644
--- a/easybuild/easyblocks/o/opencv.py
+++ b/easybuild/easyblocks/o/opencv.py
@@ -38,7 +38,7 @@ from easybuild.tools.build_log import EasyBuildError
 from easybuild.tools.config import build_option
 from easybuild.tools.filetools import compute_checksum, copy
 from easybuild.tools.modules import get_software_libdir, get_software_root
-from easybuild.tools.systemtools import get_cpu_features, get_shared_lib_ext
+from easybuild.tools.systemtools import X86_64, get_cpu_architecture, get_cpu_features, get_shared_lib_ext
 from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC
 
 
@@ -68,6 +68,8 @@ class EB_OpenCV(CMakeMake):
 
         self.pylibdir = det_pylibdir()
 
+        if get_cpu_architecture() == X86_64:
+            # IPP are Intel's Integrated Performance Primitives - so only make sense on X86_64
             ippicv_tgz = glob.glob(os.path.join(self.builddir, 'ippicv*.tgz'))
             if ippicv_tgz:
                 if len(ippicv_tgz) == 1:
@@ -85,7 +87,8 @@ class EB_OpenCV(CMakeMake):
                     if LooseVersion(self.version) >= LooseVersion('3.4.4'):
                         self.cfg.update('configopts', '-DOPENCV_DOWNLOAD_PATH=%s' % self.builddir)
                 else:
-                raise EasyBuildError("Found multiple ippicv*.tgz source tarballs in %s: %s", self.builddir, ippicv_tgz)
+                    raise EasyBuildError("Found multiple ippicv*.tgz source tarballs in %s: %s",
+                                         self.builddir, ippicv_tgz)
 
     def configure_step(self):
         """Custom configuration procedure for OpenCV."""

@boegel boegel added the bug fix label May 19, 2020
@boegel boegel added this to the release after 4.2.1 (4.2.2?) milestone May 19, 2020
@boegel boegel changed the title Non intel opencv only build OpenCV with IPP support on x86_64 systems Jul 4, 2020
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel
Copy link
Copy Markdown
Member

boegel commented Jul 4, 2020

Tested and approved, sorry for the holdup on this one @edmondac!

@boegel boegel merged commit 1fcca38 into easybuilders:develop Jul 4, 2020
@branfosj branfosj deleted the non-intel-opencv branch July 5, 2020 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants