Loading ...
Sorry, an error occurred while loading the content.

45978Re: [mh] Is anyone running Perl Version 5.8.9?

Expand Messages
  • Kevin Robert Keegan
    Nov 5, 2013
    • 0 Attachment
      Good news, I was able to get perl 5.8.8 to run.

      Bad news, the version of Switch.pm distributed with that version of perl seems very buggy.  The error above is caused by the words "use case" contained within pod documentation.  Even fixing that error, I was unable to get switch/case statements to work.  The solution is to convert all of them to if/elsif statements.  This makes the code slightly harder to quickly read (IMO) but not much.

      I will continue to try and support back to perl 5.8.8, but as official support for perl version 5.8 ended more than 5 years ago (Nov 2008), this may become difficult as MH progresses.


      On Mon, Nov 4, 2013 at 5:20 PM, H Plato <hplato@...> wrote:
      I copied my working MH configuration, and then did a pull request. Here’s how it fails:

      Command: mh 
      Pgm  path   : .
      Pgm  version: unstable  Last updated: Mon Nov  4 18:13:19 2013
      Perl version: 5.008008
      OS   version: linux linux  
      Other       : user=root pid=30747 box=mh1 cpu=-

      This program is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation; either version 2
      of the License, or (at your option) any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License
      along with this program; if not, write to the Free Software
      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

      Read parameter files: ./mh.ini ./mh.private.ini /usr/local/misterhouse/instances/main/mh.main.ini
      Debugging for voice turned on
      Code Directories:
       - /usr/local/misterhouse/instances/main/code
       - ./../code/common
      Loading other modules
      Starting setup
       - using simple Text distance function
      Loading DNS code ... DNS set to 192.168.0.3
       Error: trigger 'restore x10 items' has an error, disabling
         Code = state_now $Power_Supply =~ /restored/i
         Result = Global symbol "$Power_Supply" requires explicit package name at (eval 363) line 1.

       - read 9 trigger entries
       - reading previous log files
       - archiving previous /usr/local/misterhouse/instances/main/data/logs/*.log files ....
       - creating festival TTS socket on localhost:1314
       - creating http            on tcp 192.168.0.51    80 buffered
       - creating server asterisk on tcp   5151 
       - creating server mhsend   on tcp   8084 buffered
       - creating server telnet   on tcp   1234 raw
       - creating server voice 1  on tcp   5191 
       - creating xap_send        on udp  3639 send
       - creating xap_listen_core on udp 49154 listen
       - creating xpl_send        on udp  3865 send
       - creating xpl_listen      on udp 49352 listen
       - initializing state tracker ...
       - creating W800 port on proxy localhost:8086
       - creating W800            proxy on localhost:8086
      Bad case statement (invalid case value?) near ../lib/Insteon/BaseInsteon.pm line 2637
       at ./mh line 31
      main::__ANON__('Bad case statement (invalid case value?) near ../lib/Insteon/...') called at /usr/lib/perl5/5.8.8/Switch.pm line 195
      Switch::filter_blocks(' ', 2636) called at /usr/lib/perl5/5.8.8/Switch.pm line 190
      Switch::filter_blocks('use strict;\x{d}\x{a}use Insteon::AllLinkDatabase;\x{d}\x{a}\x{d}\x{a}@Insteon::BaseO...', 29) called at /usr/lib/perl5/5.8.8/Switch.pm line 53
      Switch::filter('Switch=HASH(0xa805938)') called at ../lib/Insteon/BaseInsteon.pm line 28
      require Insteon/BaseInsteon.pm called at ../lib/Insteon_PLM.pm line 27
      Insteon_PLM::BEGIN() called at ../lib/Insteon/BaseInsteon.pm line 28
      eval {...} called at ../lib/Insteon/BaseInsteon.pm line 28
      require Insteon_PLM.pm called at ./mh line 843
      main::setup called at ./mh line 6699
      Compilation failed in require at ../lib/Insteon_PLM.pm line 27.
       at ./mh line 31
      main::__ANON__('Bad case statement (invalid case value?) near ../lib/Insteon/...') called at ../lib/Insteon_PLM.pm line 27
      Insteon_PLM::BEGIN() called at ../lib/Insteon/BaseInsteon.pm line 27
      eval {...} called at ../lib/Insteon/BaseInsteon.pm line 27
      require Insteon_PLM.pm called at ./mh line 843
      main::setup called at ./mh line 6699
      BEGIN failed--compilation aborted at ../lib/Insteon_PLM.pm line 27.
       at ./mh line 31
      main::__ANON__('Bad case statement (invalid case value?) near ../lib/Insteon/...') called at ../lib/Insteon_PLM.pm line 27
      require Insteon_PLM.pm called at ./mh line 843
      main::setup called at ./mh line 6699
      Compilation failed in require at ./mh line 843.
       at ./mh line 31
      main::__ANON__('Bad case statement (invalid case value?) near ../lib/Insteon/...') called at ./mh line 843
      main::setup called at ./mh line 6699


      On Nov 4, 2013, at 11:04 AM, Kevin Robert Keegan <kevin@...> wrote:

      Hmm, make sure you are actually pulling a fresh copy of Master, that error sounds like something that was patched 7-10 days ago.


      On Mon, Nov 4, 2013 at 9:46 AM, H Plato <hplato@...> wrote:
      Ok, i'll download a fresh copy from master and send the logs. Interestingly enough, i have 5.12 installed as well (for shairport), and using that version to launch got me past the insteon failure to an error with read_table_a. 

      Anyways, i should be able to get this going tonight. It would be great to keep 5.8.8 compatibility for as long as possible... :)

      Sent from my mobile device. 

      On Nov 4, 2013, at 10:27 AM, Kevin Robert Keegan <kevin@...> wrote:

      Odd, if you have a chance to capture any log data I would be interested to see what the problem is.


      On Sun, Nov 3, 2013 at 8:47 PM, H Plato <hplato@...> wrote:
      I might have spoken too soon. I just pulled down the latest from master and Insteon fails to start.  Unfortunately I didn’t capture the logs.  Reverted to about a month or so ago, and everything starts. (Thanks again to Steve for the git reset command pointer!)


      On Nov 2, 2013, at 9:49 AM, H Plato <hplato@...> wrote:

      Yes, GD=1. I only run the web interface, so tk=0.

      I run GD v2.32

      [mh@mh1 main]# perl -MGD -e 'print "$GD::VERSION\n"'
      2.32

      On Nov 2, 2013, at 5:36 AM, Carl McGrath <cmcgrath5035@...> wrote:

      HPlato
      Are you running with the GD Perl Lib loaded and GD turned on?
      My Perl 5.8.9 failure was in this area; if I set GD=0 the Web interface was OK.

      On 11/01/2013 07:30 PM, H Plato wrote:
      I run 5.8.8 on an old FC5 box.Everything seems to be working though…

      On Nov 1, 2013, at 5:19 PM, Kevin Robert Keegan <kevin@...> wrote:

      Interesting, well I am glad I gave up on version 5.8.9 then.  I am willing to make some effort to do backwards compatibility testing.  I am with you though, delving that deeply into an old version of perl is not my idea of a fun hobby.

      I seem to be able to quickly switch to 5.10.1 using perlbrew.  Hopefully, not too many users who run the current version of MH use perl versions older than this.


      On Fri, Nov 1, 2013 at 4:05 PM, Carl McGrath <cmcgrath5035@...> wrote:
      Kevin
      At the botom of this is a messaged I posted back in Late August.
      I still have the unit (an RT-N16 high end router running DD-WRT/Optware) sitting on the shelf and could run some tests, but as you can see I ran into some problems myself on that Perl 5.8.8 unit that I chose not to pursue.
      For this, and other reasons, I decided to make my upgrade target a QNAP File server, running Debian 7 and it runs the latest PERL.

      Let me know, this might be older than you want to target anyway.


      Old Post
      --------------------------------------------
      I have decided to repost this item with a clearer Subject: after reading 
      some of my mailing list backlog and seeing discussion on why so many 
      legacy Perl modules are being distributed with MH(e.g. the @INC thread)
      
      The genesis of this is my recent download of the new Misterhouse 3.0 
      from git.
      My target platform is an RT-N16 router (MIPS architecture) running 
      dd-wrt (Kernel 2.6.24.111)+ Optware.
      The Perl available with Optware is Perl 5.8.8, rather dated.
      I built this combination a year ago and ran the then current SVN version 
      of MH successfully with a couple Insteon test lights.
      
      I'll skip some details and workarounds (email me if you want to try 
      this) and say that MH 3.0 initializes normally and serves up the web 
      interface.
      I can navigate some of the web interface, but when I attempt to toggle 
      my test items, mh crashes with the following error message on the cli 
      console:
      perl: can't resolve symbol 'PerlIO_findFILE'
      
      I am no Perl monk, but most of us using mh have developed some Perl 
      understanding and hacking skills.
      After Googling about, I find that PerlIO_findFILE is part of "perlapio - 
      perl's IO abstraction interface".
      I can’t find any specifics on when perlapio was created or introduced 
      (e.g. in what version does it appear).
      I am able to run CPAN from the platform.
      A search for perlIO says that it is part of the Perl 'core' and wants to 
      download, make and install Perl 5.18.
      That is a big task for a 15W cpu with a usb HDD! and I doubt the 
      additional Optware Perl packages would be compatible anyway.
      
      I am making a quick assumption that some reworked code in the web 
      interface uses PerlIO.
      In parallel with my digging into the code, I pose these questions for 
      those who might have current knowledge:
      
      Q1: Is there a minimum level of Perl core that is assumed by mh code 
      developers?
      Q2 Has anyone running mh on similar embedded platforms attempted to run 
      MH3.0? If successful, what Perl do you have?
      Q3. Any other thoughts?
      
      Thanks!
      
      
      -----------------------------------------------------------------------------

      On 11/01/2013 06:20 PM, Kevin Robert Keegan wrote:
      I was never able to get perlbrew to run MisterHouse using perl 5.8.9.  I have successfully been able to get perl 5.10.1 to work though.  So I should be able to test my coding changes for backward compatibility at least to perl 5.10.1.


      On Sat, Oct 26, 2013 at 5:36 AM, Steve Switzer <steve@...> wrote:
      Nope, using the same as you:

      This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi
      (with 56 registered patches, see perl -V for more detail)


      Best regards,
      Steve Switzer
      
      ---
      Get world-class business I.T. services and a phone system with awesome features that won't challenge your budget!
      http://www.SwitzerBusinessSolutions.com
      On 10/25/2013 07:51 PM, Kevin Robert Keegan wrote:
      In order to test to see if my coding is backwards compatible, I installed perlbrew and perl 5.8.9 (according to wikipedia perl 5.8 is still the most common version)

      I dealt with a lot of perlbrew hijinx.  But now I get the following error and I am stumped.  If I switch back to perl 5.14.2 everything works.

      Error in user code file /usr/local/mh/data/mh_temp.user_code

        25/10/2013 16:49:05 : Can't locate object method "new" via package "Insteon::BaseDevice" at /usr/local/mh/source/bin/../lib/Insteon/Lighting.pm line 34.
       at mh line 31
              main::__ANON__('Can\'t locate object method "new" via package "Insteon::BaseD...') called at /usr/local/mh/source/bin/../lib/Insteon/Lighting.pm line 34
              Insteon::BaseLight::new('Insteon::BaseLight', '0E.2A.3E:01', undef) called at /usr/local/mh/source/bin/../lib/Insteon/Lighting.pm line 269
              Insteon::DimmableLight::new('Insteon::DimmableLight', '0E.2A.3E:01', undef) called at /usr/local/mh/source/bin/../lib/Insteon/Lighting.pm line 948
              Insteon::KeyPadLinc::new('Insteon::KeyPadLinc', '0E.2A.3E:01') called at (eval 757) line 95
      Line 90:
      Line 91:  # List of File_Item objects
      Line 92:  use vars qw($f_weather_conditions $f_weather_forecast);
      Line 93:
      Line 94:  $PLM                                 =  new Insteon_PLM('Insteon_PLM',);
      Line 95:  $f_kt_pantry_lt_ma                   =  new Insteon::KeyPadLinc('0E.2A.3E:01', );
      Line 96:  $All_Lights                          =  new Group;
      Line 97:  $All_Lights                          -> add($f_kt_pantry_lt_ma);
      Line 98:  $Mon_Main                            =  new Group;
      Line 99:  $Mon_Main                            -> add($f_kt_pantry_lt_ma);
      Line 100:  $Mon_Downstairs                      =  new Group;
      mh rc=1
      mh exited normally



      ------------------------------------------------------------------------------
      October Webinars: Code for Performance
      Free Intel webinars can help you accelerate application performance.
      Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
      the latest Intel processors and coprocessors. See abstracts and register >
      http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


      ________________________________________________________
      To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
      
      


      ------------------------------------------------------------------------------
      October Webinars: Code for Performance
      Free Intel webinars can help you accelerate application performance.
      Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
      the latest Intel processors and coprocessors. See abstracts and register >
      http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
      ________________________________________________________
      To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365





      ------------------------------------------------------------------------------
      Android is increasing in popularity, but the open development platform that
      developers love is also attractive to malware creators. Download this white
      paper to learn more about secure code signing practices that can help keep
      Android apps secure.
      http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


      ________________________________________________________
      To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
      
      


      ------------------------------------------------------------------------------
      Android is increasing in popularity, but the open development platform that
      developers love is also attractive to malware creators. Download this white
      paper to learn more about secure code signing practices that can help keep
      Android apps secure.
      http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
      ________________________________________________________
      To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



      ------------------------------------------------------------------------------
      Android is increasing in popularity, but the open development platform that
      developers love is also attractive to malware creators. Download this white
      paper to learn more about secure code signing practices that can help keep
      Android apps secure.
      http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk________________________________________________________
      To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365









    • Show all 13 messages in this topic