Here is stacktrace of cpulimit
$ gdb cpulimit
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/tc/cpulimit-old/cpulimit-1.1/cpulimit...(no debugging symbols found)...done.
(gdb) run --limit 40 ffmpeg -i '/mnt/sda3/recent/video/Badminton Men_s Singles Final - Malaysia Vs China at London 2012 Olympic Games.mp4' -vcodec libx264 -acodec libmp3lame /mnt/sda3/recent/video/mmfs-old.mp4
Starting program: /home/tc/cpulimit-old/cpulimit-1.1/cpulimit --limit 40 ffmpeg -i '/mnt/sda3/recent/video/Badminton Men_s Singles Final - Malaysia Vs China at London 2012 Olympic Games.mp4' -vcodec libx264 -acodec libmp3lame /mnt/sda3/recent/video/mmfs-old.mp4
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Program received signal SIGSEGV, Segmentation fault.
0xb761ce42 in ?? () from /lib/libc.so.6
(gdb) bt
#0 0xb761ce42 in ?? () from /lib/libc.so.6
#1 0xb761cc92 in strtol () from /lib/libc.so.6
#2 0x08048b26 in main ()
If you get latest svn . Then it works.
If I want to create extension of this program.
I know two ways
(1)make a tcz which just contains compiled i386 binary in /bin folder. Easy . I somehow forgot - how to do this ? (I had created a oxford tcz after I managed to install application from my CD )
(2)Dependency will be compiletc.tcz & svn. Then script should download latest code by running
$svn checkout
https://svn.code.sf.net/p/cpulimit/code/trunk cpulimit
because
$ svn checkout https://cpulimit.svn.sourceforge.net/svnroot/cpulimit/trunk cpulimit
svn: Repository moved permanently to 'https://svn.code.sf.net/p/cpulimit/code/trunk'; please relocate
This will create folder cpulimit containing following files
Makefile cpulimit.c list.h process.h procutils.h
README list.c process.c procutils.c
Now run
$cd cpulimit ; make ; sudo cp cpulimit /bin
This is better as it compiles binary according to user processor.
But , this heavy on requirement & after reading
https://code.google.com/p/tcztools/ -> I am still confused.