I compiled Emacs to run on Redhat Linux. Since I wanted to compile it with --with-native-compilation flag, I had to install Redhat's developer tools to get libgccjit. These tools are installed in /opt/rh/devtoolset-10/root. An enable script is provided which modifies the LD_LIBRARY_PATH and PKG_CONFIG_PATH.
I ran configure like:
./configure --with-x --with-native-compilation --with-json --with-imagemagick
After running make and install, I noticed that I was unable to launch emacs from the Applications menu (it would fail silently), and that I was only able to launch emacs from a terminal if I first ran the devtool-10 enable script. If I don't run the script first, I receive the error:
emacs: error while loading shared libraries: libgccjit.so.0: cannot open shared object file: No such file or directory
I do not do a lot C or C++ programming, and don't have much experience compiling software, except when doing something like this. Are there flags or directives I can set on the configure script, somewhere, that would fix the location of the the dynamically linked files so that it doesn't depend on LD_LIBRARY_PATH being set when running the application?