# Compilation issue with imagedenoise on SUSE 11.3 and RHEL 6.10

**URL:** https://discourse.paraview.org/t/compilation-issue-with-imagedenoise-on-suse-11-3-and-rhel-6-10/2671
**Category:** Development
**Created:** [October 2, 2019, 4:03pm UTC](https://discourse.paraview.org/t/compilation-issue-with-imagedenoise-on-suse-11-3-and-rhel-6-10/2671 "2019-10-02T16:03:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![joeh](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@joeh](https://discourse.paraview.org/u/joeh)
#### Post date: [October 2, 2019, 4:03pm UTC](https://discourse.paraview.org/t/compilation-issue-with-imagedenoise-on-suse-11-3-and-rhel-6-10/2671/1 "2019-10-02T16:03:26Z")

</div>

I have found that on some of our older systems when the superbuild attempts to build  
openimagedenoise that one of the files is giving an error.

superbuild/openimagedenoise/src/scripts/resource\_to\_cpp.py

is failing on line 33

```
  with open(in_path, 'rb') as in_file, open(out_path, 'w') as out_file:

```

at the comma. I have found a workaround is to convert it to

```
  with open(in_path, 'rb') as in_file:
    with open(out_path, 'w') as out_file:

```

and then fix the indentations following these lines.  
I have included my working file that includes this fix.

[resource\_to\_cpp.py](https://discourse.paraview.org/uploads/short-url/fEthblUXKOKxpY9Mx8tbtBU78eE.py) (2.9 KB)

This seems to successfully address the issue.

Thanks,

Joe

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [October 2, 2019, 9:48pm UTC](https://discourse.paraview.org/t/compilation-issue-with-imagedenoise-on-suse-11-3-and-rhel-6-10/2671/2 "2019-10-02T21:48:03Z")

</div>

Joe, thanks for the report. Out of curiousity, are you building with Python 2 or 3?

---

<div class="post-metadata">

### Author: ![joeh](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@joeh](https://discourse.paraview.org/u/joeh)
#### Post date: [October 2, 2019, 10:36pm UTC](https://discourse.paraview.org/t/compilation-issue-with-imagedenoise-on-suse-11-3-and-rhel-6-10/2671/3 "2019-10-02T22:36:57Z")

</div>

CLASSIFICATION: UNCLASSIFIED

Cory,

You’re welcome. I am building with Python 3 for ParaView 5.7.0.

for ParaView 5.6.1 and below I have used Python 2, with Python 2

becoming deprecated by year’s end, I thought it was a good time to switch.

Thanks,

Joe

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 3, 2019, 2:56am UTC](https://discourse.paraview.org/t/compilation-issue-with-imagedenoise-on-suse-11-3-and-rhel-6-10/2671/4 "2019-10-03T02:56:38Z")

</div>

You may want to mention it to oidn and even make a PR there.

> **[OpenImageDenoise/oidn](https://github.com/OpenImageDenoise/oidn)**
>
> Intel(R) Open Image Denoise library. Contribute to OpenImageDenoise/oidn development by creating an account on GitHub.
