4

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?

Aibobot
  • 902
Jon
  • 141
  • 1
  • 7

2 Answers2

3

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:

  1. In the file "configure.ac" replace line

    PROFILING_CFLAGS="-DPROFILING=1 -pg"
    

    with the following

    PROFILING_CFLAGS="-DPROFILING=0 -pg"
    
  2. Create new "configure" by running command autoconf.
  3. Use new "configure" for compilation, as usual.
Ahmed Ashour
  • 2,490
2

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.