https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67454
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Also make sure the paths that R generate are correctly referencing the correct one. Use ldd to see. It sounds like somewhere the LD_LIBRARY_PATH is not unset or being ignored.