I have done source installation of JAGS 4.3.1 with GCC 9.3 from Devtools on a RHEL 7.9 machine. However the RShiny application deployment fails with exception that drills down to compatibility of RJAGS and system JAGS package.
Abstract from JAGS installation saying that it is using GCC 9.3.1:
configure:3677: make -f confmf.GNU && cat confinc.out
this is the am__doit target
configure:3680: $? = 0
configure:3699: result: yes (GNU style)
configure:3769: checking for gcc
configure:3785: found /opt/rh/devtoolset-9/root/bin/gcc
configure:3796: result: gcc
configure:4025: checking for C compiler version
configure:4034: gcc --version >&5
gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:4045: $? = 0
configure:4034: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
Error in RShiny APP:
/494/Nlhceyu3OY42MtTt/job.stderr:2022/07/07 09:36:52.241931024 /opt/rstudio-connect/mnt/packrat/4.1.0/v2/library/rjags/0ad6cb7e4177c24ed0349f86d5c1c2c4/rjags/libs/rjags.so: undefined symbol: _ZN4jags7Console10setRNGnameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj