maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Compiling on-device problem (https://talk.maemo.org/showthread.php?t=95723)

szopin 2015-07-13 18:30

Compiling on-device problem
 
After managing to compile QtCreator on-device everything seemed to be well and good and awesome, but today got this error:

Code:

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -D
QT_SQL_LIB -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++ -I. -I/usr/include/qt5 -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtWidge
ts -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtSql -I/usr/include/qt5/QtCore -I.
-o qrc_resources.o qrc_resources.cpp
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.merproject.org/> for instructions.
make[1]: *** [qrc_resources.o] Error 4
make[1]: Leaving directory `/home/nemo/dev/cool-retro-term-master/app'
make: *** [sub-app-make_first-ordered] Error 2

The source of the prog is here:
https://github.com/Swordfish90/cool-retro-term
(you also need the qmltermwidget)

Is that jolla killing process too soon (on first try had it in background and was doing something else, second attempt foreground nothing running except term, same result), or gcc bug? Bit worried, had programs with 12+ hours of compile time on n900 and it looks like the jolla watchdog is killing it :/

szopin 2015-07-13 19:21

Re: Compiling on-device problem
 
ok, I think by now tried all the echo tricks from OOM thread, cc1plus still gets killed, not sure if should try swappiness tricks or just gcc bug :(

AapoRantalainen 2015-07-13 20:48

Re: Compiling on-device problem
 
Is dmesg showing something, e.g.
Code:

[88886.470155] lowmemorykiller: Killing 'genautomata' (10246), adj 0,
  to free 503056kB on behalf of 'kswapd0' (50) because
  cache 16164kB is below limit 16384kB for oom_score_adj 0
  Free memory is 11948kB above reserved

-> All memory+swap exhausted.

szopin 2015-07-13 23:22

Re: Compiling on-device problem
 
Yeah, well damn, it's like with scummvm that worked in 1.2.0.5 and stopped with 1.3.0.8, one step forward two steps back (my bet qtcreator is no longer compilable on device):
Code:

[nemo@Jolla ~]$ dmesg | grep lowmem
[ 5942.342712] lowmemorykiller: Killing 'harbour-radio-s' (6416), adj 71,
[ 5942.752326] lowmemorykiller: Killing 'fingerterm' (1289), adj 70,
[ 5944.308224] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5951.088172] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5952.194627] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5953.207964] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5954.442941] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5955.485883] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5957.336699] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5958.812634] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5960.560872] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5961.918814] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5963.222187] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5964.705569] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5965.718479] lowmemorykiller: Killing 'QQuickXmlQueryE' (14427), adj 70,
[ 5966.662321] lowmemorykiller: Killing 'cc1plus' (15149), adj 0,
[nemo@Jolla ~]$

so even with:
echo "0,0,0,0,0" > /sys/module/lowmemorykiller/parameters/minfree
cc1plus gets killed *sigh*

nieldk 2015-07-14 04:14

Re: Compiling on-device problem
 
Look here.
https://answers.launchpad.net/ubuntu/+question/236764

szopin 2015-07-14 07:22

Re: Compiling on-device problem
 
Quote:

Originally Posted by nieldk (Post 1476566)


with
Code:

echo '9999' > /sys/module/lowmemorykiller/parameters/adj
echo '1' > /sys/module/lowmemorykiller/parameters/minfree

Still cc1plus was killed :/
(interestingly enough, browser running in the background was not, weird, but compilation failed, previously pretty much everything was killed too and only fingerterm left)

AapoRantalainen 2015-07-14 08:34

Re: Compiling on-device problem
 
How about adding more swap?

Code:

devel-su
fallocate -l 2G /swapfile #2Gigs
chmod 600 /swapfile
mkswap /swapfile
losetup --find --show /swapfile
# ->  /dev/loop0
swapon /dev/loop0


nieldk 2015-07-14 08:41

Re: Compiling on-device problem
 
Quote:

Originally Posted by AapoRantalainen (Post 1476583)
How about adding more swap?

Code:

devel-su
fallocate -l 2G /swapfile #2Gigs
chmod 600 /swapfile
mkswap /swapfile
losetup --find --show /swapfile
# ->  /dev/loop0
swapon /dev/loop0


perhaps. Or, might be tmpfs that is too small (I run in to this on a regular basis on N9). ?

Can be increased 'on the fly'
(40M in this example)

# mount -o remount,size=40M tmpfs /tmp/

szopin 2015-07-14 10:18

Re: Compiling on-device problem
 
tmp stays at 400mb free throughout (was same on n900, only time needed to resize its tmp was for wifite which used to dump ivs in there)

will check out later with increased swap, hopefully this will do it (but such a shame lowmemkill isn't just toggleable, the too deep sleep at least can be turned off in one command):

szopin 2015-07-14 16:11

Re: Compiling on-device problem
 
Ok, after watching in htop, looks like nieldk's answer was correct, the killing of background apps is inhibited and it is just gcc eating through whole swap and then remaining ram until it dies, going to check with increased swap, thanks!


All times are GMT. The time now is 13:43.

vBulletin® Version 3.8.8