Building domoticz from source gets me previous version

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

Moderator: leecollings

Post Reply
BPMb
Posts: 10
Joined: Thursday 27 April 2017 0:55
Target OS: Linux
Domoticz version: master
Contact:

Building domoticz from source gets me previous version

Post by BPMb »

Hi there!

I've been running Domoticz in Docker using the Linuxserver Docker image but it doesn't give me the latest version so I decided to make my own.

In the image, I clone the domoticz git and build it, which is succesful, but when I start the image and login I still get the message saying that a later version is available. It says version 11995 is available.

I thought I'd be getting the latest version automatically when building from source?

This is the part in my dockerfile where I clone the repo and build it:

Code: Select all

 cd /opt && \
    git clone --depth 1 https://github.com/domoticz/domoticz.git domoticz && \
    cd domoticz && \
    cmake \
      -DCMAKE_BUILD_TYPE=Release \
      -Wno-dev -Wno-deprecated && \
    make && \
    rm -rf /opt/domoticz/.git* && \
Does anyone know why this happens? Do I really need to update domoticz after installing from source?

Thanks!
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Building domoticz from source gets me previous version

Post by kiddigital »

When you build from source, the new Domoticz executable is build in the ‘bin’ subdirectory. Make sure that version gets started (and not the one that remains in the domoticz root directory = old version)
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
BPMb
Posts: 10
Joined: Thursday 27 April 2017 0:55
Target OS: Linux
Domoticz version: master
Contact:

Re: Building domoticz from source gets me previous version

Post by BPMb »

Thanks for you reply!

My entrypoint is indeed a script that calls /opt/domoticz/domoticz. I had a look and although a bin subdirectory exists (i.e. /opt/domoticz/bin), there are no files in there..

I did a quick search on the system and can't find any other domoticz binary to launch either..

Any suggestions?
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Building domoticz from source gets me previous version

Post by kiddigital »

BPMb wrote:Thanks for you reply!

My entrypoint is indeed a script that calls /opt/domoticz/domoticz. I had a look and although a bin subdirectory exists (i.e. /opt/domoticz/bin), there are no files in there..

I did a quick search on the system and can't find any other domoticz binary to launch either..

Any suggestions?
Are you sure the build process run successfully? Delete the one domoticz binary and see if a new one gets build.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
BPMb
Posts: 10
Joined: Thursday 27 April 2017 0:55
Target OS: Linux
Domoticz version: master
Contact:

Re: Building domoticz from source gets me previous version

Post by BPMb »

I do see some errors in the build process:

Code: Select all

CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.
and a little later:

Code: Select all

[ 15%] Building C object extern/minizip/CMakeFiles/minizip.dir/zip.c.o
/opt/domoticz/extern/minizip/zip.c: In function 'zipOpenNewFileInZip4_64':
/opt/domoticz/extern/minizip/zip.c:1248:28: warning: assignment to 'const long unsigned int *' from incompatible pointer type 'const z_crc_t *' {aka 'const uns
igned int *'} [-Wincompatible-pointer-types]
         zi->ci.pcrc_32_tab = get_crc_table();
                            ^
[ 17%] Linking C static library ../../lib/libminizip.a
[ 17%] Built target minizip
Seeing as I build this in a docker image there's no binary to be removed before the build process. Or do you mean build it, remove the /opt/domoticz/domoticz binary and build again?
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Building domoticz from source gets me previous version

Post by kiddigital »

Make sure your git clone checks out the beta branch otherwise you build the stable.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
BPMb
Posts: 10
Joined: Thursday 27 April 2017 0:55
Target OS: Linux
Domoticz version: master
Contact:

Re: Building domoticz from source gets me previous version

Post by BPMb »

I thought I would want the stable, the message about the update should also be about the stable release (that's all that's configured in the update check inside Domoticz in any case).

Do I need the beta branch in order to get the latest stable release? Or do you think the version it suggests I update to (11995) is a beta version?
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Building domoticz from source gets me previous version

Post by kiddigital »

Check the site and wiki for the exact build numbers of the latest stable and beta.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
BPMb
Posts: 10
Joined: Thursday 27 April 2017 0:55
Target OS: Linux
Domoticz version: master
Contact:

Re: Building domoticz from source gets me previous version

Post by BPMb »

Thanks for all the suggestions @kiddigital. I've solved it like this:

At the top of the dockerfile:

Code: Select all

ARG DOMOTICZ_VERSION="master"
And then later:

Code: Select all

# Domoticz
    cd /opt && \
    git clone -b "${DOMOTICZ_VERSION}" --depth 2 https://github.com/domoticz/domoticz.git domoticz && \
    cd domoticz && \
    git fetch --unshallow && \
    cmake \
      -DCMAKE_BUILD_TYPE=Release \
      -Wno-dev -Wno-deprecated && \
    make && \
    rm -rf /opt/domoticz/.git* && \
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Building domoticz from source gets me previous version

Post by kiddigital »

Great that is has been solved

Maybe you can publish your Dockerfile(s) and readme.md on Github or Domoticz Wiki (or refer from one to other) so others can build certain version of Domoticz themselves as well.

And explain how to switch between version, etc.
How the port forwarding works, etc...

Btw, where do you keep the domoticz.db? In the container or external on a mount somewhere?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
BPMb
Posts: 10
Joined: Thursday 27 April 2017 0:55
Target OS: Linux
Domoticz version: master
Contact:

Re: Building domoticz from source gets me previous version

Post by BPMb »

I will once I'm done, next problem is to get the toonapilib4domoticz plugin preinstalled in the image. It's there but I get an error when it tries to load so needs some more work I'm afraid! :D

edit: I keep the db on my ZFS mount and simply mount that into the container
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest