Make dependencies in KStars
Hy Murveit
murveit at gmail.com
Thu May 14 04:03:21 BST 2020
Thanks. Trying ccache. (May also try the cross-compile...).
This is how I tried to set it up:
sudo apt-get install ccache
and put this at the end of my ~/.bashrc (perhaps not necessary for kstars?)
export PATH=/usr/lib/ccache:$PATH
Then ran cmake on kstars with the following command:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCCACHE_SUPPORT=ON ~/AstroRoot/kstars
and finally
make -j6 kstars
I let it run for a while and got:
> ccache -s
cache directory /home/pi/.ccache
primary config /home/pi/.ccache/ccache.conf
secondary config (readonly) /etc/ccache.conf
stats updated Wed May 13 19:54:18 2020
cache hit (direct) 1
cache hit (preprocessed) 0
cache miss 62
cache hit rate 1.59 %
called for link 8
cleanups performed 0
files in cache 131
cache size 65.4 MB
max cache size 5.0 GB
then I ran 'make clean' and restarted 'make -j6 kstars' waited a little bit
and got:
> ccache -s
cache directory /home/pi/.ccache
primary config /home/pi/.ccache/ccache.conf
secondary config (readonly) /etc/ccache.conf
stats updated Wed May 13 19:57:17 2020
cache hit (direct) 58
cache hit (preprocessed) 0
cache miss 62
cache hit rate 48.33 %
called for link 12
cleanups performed 0
files in cache 131
cache size 65.4 MB
max cache size 5.0 GB
so seems to be working.
Hy
On Wed, May 13, 2020 at 2:51 AM Jasem Mutlaq <mutlaqja at ikarustech.com>
wrote:
> Try to install ccache and enable it in CMake, it helps reduce
> compilation times.
>
> --
> Best Regards,
> Jasem Mutlaq
>
>
>
> On Wed, May 13, 2020 at 5:56 AM Hy Murveit <murveit at gmail.com> wrote:
>
>> *TL;DR* KStars makefiles seem to recompile everything (or a lot anyway)
>> when seemingly small 'git pulls' come in. Wondering if there's something
>> wrong with the setup. I'm not a cmake wizard.
>>
>> *Background:* I compile/test KStars mostly on my MacbookPro, and I find
>> the compile times very reasonable there. However, when I am ready to test
>> something with a telescope, I compile and run on my 4Gb RPi4. There it
>> takes about 40 minutes for me to completely build the system (I run 'make
>> -j6 kstars' and am compiling RelWithDebInfo) and for some reason, it often
>> seems to build most of the system.
>>
>> *Gripe: *When I change a single .cpp in an Ekos module, yes, it seems to
>> work fine, just recompile that file, then build the library, then build the
>> binary. However, often I seem relatively small updates come in, and I
>> notice very long compiles. Do others notice this? I wish I could give
>> concrete examples. Does anyone know how to analyze? E.g. is there a command
>> to see what would be compiled (and why) before running the make? Is there a
>> way to improve this?
>>
>> Thanks,
>> Hy
>>
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20200513/bc9388b4/attachment.htm>
More information about the Kstars-devel
mailing list