Can anyone advise regarding compiling errors?

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
Jimkooper
Posts: 2
Joined: Friday 18 October 2019 13:22
Target OS: Linux
Domoticz version:
Contact:

Can anyone advise regarding compiling errors?

Post by Jimkooper »

Hello everyone,,
Because of some issues (well basically it doesn't work) with the prebuilt beta releases and some python plugins I want to use, I thought I'd have a go at compiling from source as some users have suggested. Unfortunately I've run into some problems and I'm hoping someone here will be able to point me in the right direction.So I've carefully followed the steps outlined in the wiki article but the final stage isn't completing. I have two Pi's, a production model 2, which I'd rather not mess about with, and a Pi 1 model B. I've made a clean Raspbian Stretch SD card (8 Gig), run the updates etc. and thats all stable. One one occasion the compile just errors out (no error massage just a crash), other times the Raspbian install just locks up completely requiring a hard restart, always at about the 20-25% mark.Last night,mobdro lucky patcher kodi I tried it again and left it overnight, when I reattached to the screen session I saw

Code: Select all

cc1plus: out of memory allocating 4067280 bytes after a total of 43425792 bytes
CMakeFiles/domoticz.dir/build.make:470: recipe for target 'CMakeFiles/domoticz.dir/main/SQLHelper.cpp.o' failed
make[2]: *** [CMakeFiles/domoticz.dir/main/SQLHelper.cpp.o] Error 1
CMakeFiles/Makefile2:71: recipe for target 'CMakeFiles/domoticz.dir/all' failed
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
So presumably it's a memory error.

In the wiki it mentions that you may need to use an older version of GCC and G++ because of memory, if I simply follow the wiki it seems to install GCC 6.3 so I thought if I uninstall GCC and G++

sudo apt-get remove GCC G++

and then auto remove and try installing 4.6

sudo apt-get install GCC-4.6 G++-4.6

then this seems to work but the cmake command errors out with 'can't find a compiler' message, so do I need to tell it explicitly to use 4.6 (presumably in usr/bin somewhere) or am I missing something completely obvious?

And last question, on a Pi B should I just use 'make' or add extra parameters to the command, and would the same apply if I were to run it on a Pi 2?

Many thanks in advance for any help and suggestions.

JimK.
Last edited by Jimkooper on Monday 04 November 2019 3:55, edited 1 time in total.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Can anyone advise regarding compiling errors?

Post by waaren »

Jimkooper wrote: Wednesday 30 October 2019 19:49 suggestions ?
Did you use swap ? Even on my PI-3 (1 GB) domoticz does not compile without swap.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest