Announcement

Collapse
No announcement yet.

Linux Libraries 32-bit vs 64-bit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Linux Libraries 32-bit vs 64-bit

    I have a port of a Windows plugin that required a library complied under Linux. It works fine on my 54-bit architecture but it would seem that some of the Hometrollers are running a 32-bit OS which means I need to distribute a different library for 32-bit architectures.

    How, during the install of the plugin, do I determine the architecture and copy/rename the correct library?
    Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

    #2
    What Hometroller are you using?

    Personally here have only seen nomenclature differences when a plugin is running remotely talking to a Windows machine. (linux to windows)

    Homeseer is a 32 bit program. On 64 bit Windows or Linux machines Homeseer only runs in 32 bit mode. Personally see it running faster in Linux than Windows; but that is me.

    RPi Wheezy and Jessie are both 32 bit OS's.

    This written today running

    HS3 Pro on Ubuntu 64bit iSeries 16Gb with a Virtual box running 32bit Windows. All plugin communications whether from Linux or Windows is 32 bit.

    HS3 Zee-2 lite today is running on Ubuntu 64bit 2Gb ARM box. Same thing with the above.

    Tested a few HS3 plugins now that run in 32 bit Windows 10 talking to the 64bit Homeseer Linux servers with no issues.
    Last edited by Pete; June 30, 2017, 06:46 AM.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    Comment


      #3
      I'm not that's the problem. I've go one user running on the Pi (Zee S2) and the other on a Hometroller SEL

      It's the first time I'm working with EF and SQlite and the issue is a dependency on SQLite.Interop.dll - apparently this won't work on mono so I have to compile a Linux library - libSQLite.Interop.so.

      This works fine on my 64-bit Linux system under mono, I just but both the Windows SQLite.Interop.dll and ibSQLite.Interop.so in the same directory and all is good. But the Zee2 and SEL users see an error trying to load the library, which I can only assume is an architecture issue (I can generate the same error is I substitute the 32-bit library on my 54-bit Linux machine)
      Last edited by beerygaz; June 30, 2017, 06:50 AM.
      Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

      Comment


        #4
        The plugin should work fine on both.

        Easy to test.

        In Linux just run mono plugin.exe server=

        In windows run plugin.exe server=

        You can utilize loopback address if HS is running on same server.

        @Gavin sent you a PM.
        - Pete

        Auto mator
        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
        Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
        HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

        HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
        HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

        X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

        Comment


          #5
          WeatherXML uses it and I have attached it here. I ran in to the issue a while back.

          Sorry attached wrong files.

          Here is a zip of three files. 2 you do not need maybe.
          Jeff puts these files under /bin/weatherxml

          1 - SQLite.Interop.dll
          2 - System.Data.SQLite.dll
          3 - Newtonsoft.Json.dll
          Attached Files
          Last edited by Pete; June 30, 2017, 07:28 AM.
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

          HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
          HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

          X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

          Comment


            #6
            Attach your testing plugin to this thread and will test it in Linux ARM 32bit or 64bit.

            Moved Zee HS3 Lite over from RPi to Pine64 or AMD dual core CPU mini PC (Xi5A). RPi3 running Jessie in 32 bit mode with no memory makes it too slow.

            Here is the Pine64 stuff: (runs circles around the RPi3 and is cheaper).

            ~# cat /proc/cpuinfo
            Processor : AArch64 Processor rev 4 (aarch64)
            processor : 0
            processor : 1
            processor : 2
            processor : 3
            Features : fp asimd aes pmull sha1 sha2 crc32
            CPU implementer : 0x41
            CPU architecture: AArch64
            CPU variant : 0x0
            CPU part : 0xd03
            CPU revision : 4

            Hardware : sun50iw1p1

            :~# uname -a
            Linux ICS-HS3ZeeLiteB 3.10.101-0-pine64-longsleep #39 SMP PREEMPT Sat May 7 12:39:25 CEST 2016 aarch64 aarch64 aarch64 GNU/Linux

            mono -V
            Mono JIT compiler version 4.8.0 (Stable 4.8.0.524/9d74414 Wed Apr 5 19:49:40 UTC 2017)

            Zeelite Computer A.

            cat /proc/cpuinfo
            processor : 0
            vendor_id : AuthenticAMD
            cpu family : 15
            model : 107
            model name : AMD Athlon(tm) 64 X2 Dual Core Processor 3400+

            ~# uname -a
            Linux ICS-HS3ZeeLite 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

            mono -V
            Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)
            Last edited by Pete; June 30, 2017, 08:10 AM.
            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
            Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
            HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

            HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
            HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

            X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

            Comment


              #7
              I now know (I think) what the problem is, but I don't know the solution. I need two different versions of the same library, one for ARM and one for x86 in order to support devices like the Zee and Pi.

              How, in the install.txt file do I decide which file to extract?
              Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

              Comment


                #8
                No...well now seeing an updated Mono (64bit) that runs on Jessie (32 bit) such that the mono folks are taking advantage of the RPi3 CPU.

                This is different mono library for the RPi-2 running Wheezy or Jessie Lite.

                Look here at the Ubuntu builds which are now different than the RPi builds.

                hxxp://download.mono-project.com/repo/ubuntu/dists/xenial/Release

                Origin: XamarinXenial
                Label: Xamarin-Stable-Xenial
                Suite: stable-xenial
                Codename: xenial
                Version: 16.04
                Date: Fri, 07 Jul 2017 22:23:00 UTC
                Architectures: amd64 i386 armel armhf arm64 ppc64el
                Components: main
                Description: Packages of the latest Mono releases from Xamarin (Ubuntu Xenial)

                IE: the updated libraries are there for the RPi3 but not for the Pine64 2Gb machine....well except now seeing them there....

                You can manually build mono this way (which worked for me on the Pine64 2Gb machine if I didn't reboot it).

                Read here: Compiling Mono From Git

                apt install git
                apt install autoconf
                apt install libtool
                apt install cmake
                apt install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev libglfw3-dev libgles2-mesa-dev


                git clone git://github.com/mono/mono.git

                $ cd mono
                $ ./autogen.sh --prefix=/usr/local
                $ make
                $ make install

                takes a while and is very resource intensive on the Pine64 2Gb machine running Ubuntu 14.04 64bit.

                I have only tested the Pine64 2Gb machine and it will run Ubuntu 64Bit because of the 2Gb of RAM which the RPi3 doesn't have.
                Last edited by Pete; July 10, 2017, 08:01 AM.
                - Pete

                Auto mator
                Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                Comment


                  #9
                  Pete the issue is I can't expect all of the plugin users to be compiling their own version of Mono. The crux of it seems to be less about 32 vs 64-bit architecture and more related to x86 vs ARM architecture.

                  For instance, I see the plugin didn't run on the Pine64 in your current setup, but if you drop this file into the <hs3root>/bin/HSPI_YAMAHA directory replacing the existing libSQLite.Interop.so file already there, then the plugin should work on your Pine iwthout an issue.
                  Attached Files
                  Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                  Comment


                    #10
                    Pete the issue is I can't expect all of the plugin users to be compiling their own version of Mono. The crux of it seems to be less about 32 vs 64-bit architecture and more related to x86 vs ARM architecture.

                    Understood. Tested it on three computers running Ubuntu 16.04 64 bit with mono and Homeseer 3.

                    1 - Intel iSeries - worked fine
                    2 - AMD dual core - worked fine
                    3 - ARM Pine64 2Gb machine - doesn't work

                    I am not running Homeseer on any of the RPi's today but it is still installed on the RPi2's.

                    I have never compiled Mono here except for recently on the Pine64 2Gb machine running 64bit Debian for testing purposes and I noticed here that the Pine64 2Gb build was running on a 64bit build of mono which worked fine with Homeseer 3.

                    The newest RPi3 only has 1Gb of ram and is limited to running only 32bit OS versions.

                    Testing now with with attached file on the Pine64 running Homeseer 3.

                    Installed plugin from updater and copied attached above libSQLite.Interop.so file over to the HS3 computer.

                    Still erroring out when starting with similiar error as before:

                    08:35:44:2525:[Info]->Plugin Yamaha has connected. IP:127.0.0.1:46585
                    2017-07-10 08:35:44 | Info | connection to homeseer successful.

                    2017-07-10 08:35:44 | Debug | Entering InitIO
                    08:35:44:6916:[Plug-In]->Finished initializing plug-in Yamaha
                    2017-07-10 08:35:46 | Error | Error Initialising amplifiers: SQLite.Interop.dll
                    08:35:46:0875:[Yamaha Error]->Error Initialising amplifiers: SQLite.Interop.dll

                    Unhandled Exception:
                    System.DllNotFoundException: SQLite.Interop.dll

                    Plugin version ==> 3.3.6389.22764

                    Keeps trying to connect to the plugin.

                    Will test on an RPi2 running Wheezy shortly. This is old Zee-2 with GPIO ZWave me card today.
                    I have not tried the RPi2-Wheezy configuration yet.

                    Works fine with the RPi2 / Wheezy computer.

                    /HomeSeer# uname -a
                    Linux ICS-ZNet 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux

                    mono -V
                    Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Thu May 25 10:07:22 UTC 2017)

                    HomeSeer Version: HS3 ZEE S2 Edition 3.0.0.318 (Linux)

                    09:03:28:6399:[Plug-In]->Interface Yamaha is running as a trial, 30 days remaining.
                    2017-07-10 09:03:30 | Info | Yamaha Plugin
                    2017-07-10 09:03:30 | Info |
                    Connecting to Homeseer at 127.0.0.1:10400 ...
                    09:03:31:5085:[Info]->Plugin Yamaha has connected. IP:127.0.0.1:36017
                    2017-07-10 09:03:31 | Info | connection to homeseer successful.

                    2017-07-10 09:03:31 | Debug | Entering InitIO
                    09:03:32:3117:[Plug-In]->Finished initializing plug-in Yamaha

                    Personally thinking only a few folks are running Homeseer 3 on the Pine64 2Gb machine with Ubuntu 16.04 64 bit.

                    I have configured only one other Homeseer user and myself. In a quickie recap then:

                    1 - plugin runs fine on an RPi2 with Wheezy
                    2 - Intel iSeries with Ubuntu 14.04 64 bit
                    3 - AMD dual core with Ubuntu 14.04 64 bit

                    Doesn't run on:

                    Pine 64 2Gb ARM computer with Ubuntu 16.04 64 bit.
                    Last edited by Pete; July 10, 2017, 09:10 AM.
                    - Pete

                    Auto mator
                    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                    Comment


                      #11
                      Originally posted by beerygaz View Post
                      I now know (I think) what the problem is, but I don't know the solution. I need two different versions of the same library, one for ARM and one for x86 in order to support devices like the Zee and Pi.

                      How, in the install.txt file do I decide which file to extract?
                      I think I had the same problem and also couldn't figure out how to use the installer properly. For me it was only the System.Data.SQLite.dll that was different for Linux versus Windows. So what I did, I had the installer install both sets of DLLs (they are renamed something like xxx_win and xxx_linux) and when the PI starts, it checks whether it is running on Windows or Linux and picks (and renames) the right file.

                      Hope this helps

                      Dirk

                      Comment


                        #12
                        Originally posted by dcorsus View Post
                        I think I had the same problem and also couldn't figure out how to use the installer properly. For me it was only the System.Data.SQLite.dll that was different for Linux versus Windows. So what I did, I had the installer install both sets of DLLs (they are renamed something like xxx_win and xxx_linux) and when the PI starts, it checks whether it is running on Windows or Linux and picks (and renames) the right file.

                        Hope this helps

                        Dirk
                        What a coincidence, see this thread https://forums.homeseer.com/showthre...86#post1314486

                        Comment

                        Working...
                        X