Every time I run a program, or exit a shell. There will be a "gmon.out" file generated at the working directory. How to stop this behavior?
Asked
Active
Viewed 2,815 times
2 Answers
2
I have just compiled emacs 24.5 and it creates "gmon.out" file while exits.
No one option to configure (except of --without-all) helped.
This is what helps if no resorting to the --without-all:
In the file "configure.ac" replace line
PROFILING_CFLAGS="-DPROFILING=1 -pg"with the following
PROFILING_CFLAGS="-DPROFILING=0 -pg"- Create new "configure" by running command
autoconf. - Use new "configure" for compilation, as usual.
Ahmed Ashour
- 2,350
- 2
- 14
- 21
Alexander
- 21
- 2
-
I don't see any mention of `emacs` in the question ("Every time I run a program, or exit a shell") – DavidPostill Oct 23 '15 at 21:09
-
I have the same problem but I do not use emacs. Something keeps on creating gmon.out files. Very annoying. :( – shevy Oct 25 '17 at 20:16
1
If this is being generated in each and every directory, most probably, your base python was installed with the --enable-profiling flag. You can confirm this using:
Python 3:
python3 -m sysconfig -c 'print(sysconfig.get_config_var("CONFIG_ARGS"))'
Python 2:
python2 -c "import distutils.sysconfig; print distutils.sysconfig.get_config_vars()"
Recompiling the same without profiling should resolve the problem.
hjpotter92
- 722
- 2
- 13
- 27