Issues with GCC 8, -O3 and -ffast-math
I am the maintainer of Rgraphviz which provides an interface to Graphviz inside of the R language. In Rgraphviz we bundle a (reduced) version of Graphviz 2.28.0 which is compiled as a static library, for linking into R.
I have gotten a report (from a skilled user) that this compilation fails when the user asks for
-O3 with GCC 8. I have replicated this using GCC 8.2.0 in a Docker container. Specifically, when I load the
Rgraphviz.so into the R library, it complains that
**_pow_finite symbol is missing.
The user has tracked this symbol to the glib mathvec library (-lmvec), some details are at
This library is used when
-ffast-math is supplied, and this compiler flag is hardcoded into the Graphviz configure script. The documentation suggests that when I use static linking, I need to use
-lmvec -lm. I am currently exploring this option. An alternative is to remove
So right now, this is just a report. I am still investigating, but if anyone has a reaction to this, feel free to add in. This could be a general issue for Graphviz when GCC 8 gets rolled out more broadly.
If you need to replicate this and have access to docker, the compiler I use is available as gcc when I start docker using
$ docker run -it gcc:8.2.0 /bin/bash