# compile error building master with intel compiler

**URL:** https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708
**Category:** Development
**Created:** [May 5, 2021, 11:25am UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708 "2021-05-05T11:25:11Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![andreasbuykx](https://discourse.vtk.org/user_avatar/discourse.vtk.org/andreasbuykx/32/8137_2.png) [@andreasbuykx](https://discourse.vtk.org/u/andreasbuykx)
#### Post date: [May 5, 2021, 11:25am UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708/1 "2021-05-05T11:25:11Z")

</div>

I’m trying to build master on centos-7 with intel icc (ICC) 19.1.1.217 20200306 and I get this compile error:

```
Filters/Sources/vtkPlaneSource.cxx(405): error: more than one instance of overloaded function "abs" matches the argument list:
        function "abs(int)"
        function "std::abs(long long)"
        function "std::abs(long)"
        argument types are: (double)
if (abs(angle) < EPSILON)
    ^

```

Can I safely change abs into std::abs?

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.vtk.org/user_avatar/discourse.vtk.org/danlipsa/32/390_2.png) [@danlipsa](https://discourse.vtk.org/u/danlipsa)
#### Post date: [May 5, 2021, 1:14pm UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708/2 "2021-05-05T13:14:37Z")

</div>

std::fabs seems appropriate here. Please consider submitting a patch

[https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md](https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md)

---

<div class="post-metadata">

### Author: ![seanm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.vtk.org/u/seanm)
#### Post date: [May 5, 2021, 3:37pm UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708/3 "2021-05-05T15:37:06Z")

</div>

Please also consider submitting a nightly build to [https://open.cdash.org/index.php?project=VTK](https://open.cdash.org/index.php?project=VTK) It seems there are no icc builds there, and without one, such errors are bound to return.

---

<div class="post-metadata">

### Author: ![Thomas\_Caissard](https://discourse.vtk.org/user_avatar/discourse.vtk.org/thomas_caissard/32/2636_2.png) [@Thomas\_Caissard](https://discourse.vtk.org/u/Thomas_Caissard)
#### Post date: [May 5, 2021, 3:38pm UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708/4 "2021-05-05T15:38:24Z")

</div>

As the input is a `double`, `fabs` shouldn’t be used here. In any case, `std::abs` is better since it provides the proper `double` overload (see [here](https://en.cppreference.com/w/cpp/numeric/math/fabs)).

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.vtk.org/user_avatar/discourse.vtk.org/danlipsa/32/390_2.png) [@danlipsa](https://discourse.vtk.org/u/danlipsa)
#### Post date: [May 5, 2021, 3:45pm UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708/5 "2021-05-05T15:45:10Z")

</div>

Yes indeed, std::abs is fine. (interestingly std::fabs has a double override as well)

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [May 5, 2021, 7:49pm UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708/6 "2021-05-05T19:49:55Z")

</div>

> [@Thomas\_Caissard](#):
>
> As the input is a `double`, `fabs` shouldn’t be used here.

Wait, what? Both `fabs()` and `std::fabs()` are fine with double.

---

<div class="post-metadata">

### Author: ![andreasbuykx](https://discourse.vtk.org/user_avatar/discourse.vtk.org/andreasbuykx/32/8137_2.png) [@andreasbuykx](https://discourse.vtk.org/u/andreasbuykx)
#### Post date: [May 6, 2021, 11:31am UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708/7 "2021-05-06T11:31:07Z")

</div>

Is there some documentation available on what this means in terms of workload for involved machines, and what kind of maintenance effort is needed to the keep the build process alive? I can discuss this with my boss to see if my company is willing to do this but I couldn’t find any relevant information from the dashboard or project menu items to convince them with.

---

<div class="post-metadata">

### Author: ![Thomas\_Caissard](https://discourse.vtk.org/user_avatar/discourse.vtk.org/thomas_caissard/32/2636_2.png) [@Thomas\_Caissard](https://discourse.vtk.org/u/Thomas_Caissard)
#### Post date: [May 6, 2021, 11:38am UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708/8 "2021-05-06T11:38:44Z")

</div>

Yep you’re right, for some reason I thought there was no `double` overload for `fabs` 🙂

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [May 15, 2021, 8:41pm UTC](https://discourse.vtk.org/t/compile-error-building-master-with-intel-compiler/5708/9 "2021-05-15T20:41:23Z")

</div>

FWIW, we’re working on Intel CI runs in [this MR](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7981).
