# Problem compiling OSMesa as part of ParaView 5.10.0-RC1 on Power 9 Architecture

**URL:** https://discourse.paraview.org/t/problem-compiling-osmesa-as-part-of-paraview-5-10-0-rc1-on-power-9-architecture/8255
**Category:** Development
**Created:** [October 25, 2021, 3:54pm UTC](https://discourse.paraview.org/t/problem-compiling-osmesa-as-part-of-paraview-5-10-0-rc1-on-power-9-architecture/8255 "2021-10-25T15:54:38Z")
**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 25, 2021, 3:54pm UTC](https://discourse.paraview.org/t/problem-compiling-osmesa-as-part-of-paraview-5-10-0-rc1-on-power-9-architecture/8255/1 "2021-10-25T15:54:38Z")

</div>

Hello,

I am having an issue compiling OSMesa as part of ParaView 5.10.0-RC1 on a Power 9 Architecture System.

Even though I am using

-Dmesa\_USE\_SWR=OFF \

It still seems to be tryng to compile SWR which requires AVX, but as AVX instructions do not exist on the Power 9 Architecture this fails.

Here is the end of the file

Build\_directory/superbuild/osmesa/src/build/meson-logs/meson-log.txt

showing the error.

```auto
Compiler stdout:

Compiler stderr:
 g++: error: unrecognized command-line option '-mavx'

Compiler for C++ supports arguments -mavx: NO
Running compile:
Working directory: /p/app/DAAC/build/PV/Build_5.10.0-RC1_osmesa_openmpi_411_gcc_1021/superbuild/osmesa/src/build/meson-private/tmpds97ckla
Command line: /opt/rh/gcc-toolset-10/root/usr/bin/g++ /p/app/DAAC/build/PV/Build_5.10.0-RC1_osmesa_openmpi_411_gcc_1021/superbuild/osmesa/src/build/meson-private/tmpds97ckla/testfile.cpp -o /p/app/DAAC/build/PV/Build_5.10.0-RC1_osmesa_openmpi_411_gcc_1021/superbuild/osmesa/src/build/meson-private/tmpds97ckla/output.obj -c -fPIC -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -march=core-avx

Code:
 extern int i;
int i;

Compiler stdout:

Compiler stderr:
 g++: error: unrecognized command-line option '-march=core-avx'

Compiler for C++ supports arguments -march=core-avx: NO
Running compile:
Working directory: /p/app/DAAC/build/PV/Build_5.10.0-RC1_osmesa_openmpi_411_gcc_1021/superbuild/osmesa/src/build/meson-private/tmpzrhyptjy
Command line: /opt/rh/gcc-toolset-10/root/usr/bin/g++ /p/app/DAAC/build/PV/Build_5.10.0-RC1_osmesa_openmpi_411_gcc_1021/superbuild/osmesa/src/build/meson-private/tmpzrhyptjy/testfile.cpp -o /p/app/DAAC/build/PV/Build_5.10.0-RC1_osmesa_openmpi_411_gcc_1021/superbuild/osmesa/src/build/meson-private/tmpzrhyptjy/output.obj -c -fPIC -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -tp=sandybridge

Code:
 extern int i;
int i;

Compiler stdout:

Compiler stderr:
 g++: error: unrecognized command-line option '-tp=sandybridge'

Compiler for C++ supports arguments -tp=sandybridge: NO
Running compile:
Working directory: /p/app/DAAC/build/PV/Build_5.10.0-RC1_osmesa_openmpi_411_gcc_1021/superbuild/osmesa/src/build/meson-private/tmp_x5lkzj9
Command line: /opt/rh/gcc-toolset-10/root/usr/bin/g++ /p/app/DAAC/build/PV/Build_5.10.0-RC1_osmesa_openmpi_411_gcc_1021/superbuild/osmesa/src/build/meson-private/tmp_x5lkzj9/testfile.cpp -o /p/app/DAAC/build/PV/Build_5.10.0-RC1_osmesa_openmpi_411_gcc_1021/superbuild/osmesa/src/build/meson-private/tmp_x5lkzj9/output.obj -c -fPIC -D_FILE_OFFSET_BITS=64 -O0 -fpermissive /arch:AVX

Code:
 extern int i;
int i;

Compiler stdout:

Compiler stderr:
 g++: error: /arch:AVX: No such file or directory

Compiler for C++ supports arguments /arch:AVX: NO
First supported argument: None

src/gallium/drivers/swr/meson.build:207:2: ERROR: Problem encountered: Cannot find AVX support for swr. (these are required for SWR an all architectures.)

```

Thanks,

Joe

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [October 25, 2021, 4:06pm UTC](https://discourse.paraview.org/t/problem-compiling-osmesa-as-part-of-paraview-5-10-0-rc1-on-power-9-architecture/8255/2 "2021-10-25T16:06:09Z")

</div>

@ben.boeckel  
Joe,  
I believe this is the one Ben found for me. It is broken in RC1, I believe master Superbuild is good, I believe RC2 will be fixed. RC2 lands in a week’ish.

---

<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 25, 2021, 4:17pm UTC](https://discourse.paraview.org/t/problem-compiling-osmesa-as-part-of-paraview-5-10-0-rc1-on-power-9-architecture/8255/3 "2021-10-25T16:17:29Z")

</div>

Alan,

Thanks, for letting me know that this has been fixed.

I will be sure to test RC2 and/or the master Superbuild.

Hopefully the Mesa build is fixed as well, which has similar issues.

Joe

---

<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 26, 2021, 7:56am UTC](https://discourse.paraview.org/t/problem-compiling-osmesa-as-part-of-paraview-5-10-0-rc1-on-power-9-architecture/8255/4 "2021-10-26T07:56:59Z")

</div>

Alan and Ben,

I can confirm the patch works for the OSMesa version, the Mesa version still has issues, as I have reported in similar topic.

[https://discourse.paraview.org/t/problem-compiling-mesa-as-part-of-superbuild-of-paraview-5-10-0-rc1-on-power-9-architecture/8254](https://discourse.paraview.org/t/problem-compiling-mesa-as-part-of-superbuild-of-paraview-5-10-0-rc1-on-power-9-architecture/8254)

Thanks,

Joe
