FYI Compiling with low resources

Technical discussions related to CryptoNote repository and the forking process

FYI Compiling with low resources

Postby ikeman32 » Fri Nov 20, 2015 10:52 pm

I'd like to share a few discoveries I have found during my attempt to build my own Crypto Note Coin.

One of the problems I ran into when trying to compile is that I kept running out of memory when building. I am not very proficient in Linux or coding so most of everything I do is by trial and error. So the memory problem kept freezing my Virtual Box at about 73% in the Build process. The recommendation for building with Cmake is:

Code: Select all
sudo make -j


This may work if you have a machine with lots of memory but when you don't have that option it will cause you to run out of memory even if you use a large swap file. After much trial and error and googling potential solutions I came up with my own solution that was so simple. After running make with the -h option I read the description for the -j option. Here is what is showed:

Code: Select all
-j [N], --jobs[=N]          Allow N jobs at once; infinite jobs with no arg.


After reading that I realized that a number is needed to prevent running out of memory. So I chose to implement 4 threads instead of an infinite amount. I'm not so interested in speed as I am of actually getting it work right.

Code: Select all
sudo make -j4


I have also found that first using the -j option without specifying the number of threads first then after a reboot run make again with the -j option and specify the number of threads will successfully build the project.

I have a ways to go with my project if anyone has suggestions or perhaps is willing to contribute some code you can check out the project here: https://github.com/ikeman32/VetCoin

I've also started a wiki here: https://github.com/ikeman32/VetCoin/wiki

Bear in mind that this a work in progress and that I am a total novice at this.


Here are the links to my threads with my problems that have been solved:
https://forum.cryptonote.org/viewtopic.php?f=5&t=807
https://forum.cryptonote.org/viewtopic.php?f=5&t=808
ikeman32
 
Posts: 12
Joined: Tue Nov 17, 2015 1:05 am

Return to Reference Code & Forking

Who is online

Users browsing this forum: No registered users and 2 guests

cron