Menu

#2 dont work's on LinuxCNC2.6.7

v1.0_(example)
open
nobody
bug (1)
5
2015-04-03
2015-03-19
jerome B
No

building hidcomp on a LinuxCNC give a error at run time:
hidcomp: symbol lookup error: hidcomp: undefined symbol: _ZN15RCS_CMD_CHANNELC1EPFiiPvP3CMSEPKcS6_S6_i

nothing works on hal side of hidcomp, no LCD, no input buttons, no output even if hal pin and signal are show

Discussion

  • Frank Tkalcevic

    Frank Tkalcevic - 2015-03-21

    nothing works on hal side of hidcomp, no LCD, no input buttons, no output even if hal pin and signal are show

    Nothing works because it didn't load.

    building hidcomp on a LinuxCNC give a error at run time:
    hidcomp: symbol lookup error: hidcomp: undefined symbol: _ZN15RCS_CMD_CHANNELC1EPFiiPvP3CMSEPKcS6_S6_i

    This is a loader error. Linux cannot find the library that hidcomp was compiled against. Because the program compiled successfully, all libraries are present. You just need to make sure when you run the program the same library you compiled against can be found.

    This is normally a problem where the a package install is clashing with a source install.

    You can start by identifying the symbol that the loader couldn't find...

    > c++filt -n _ZN15RCS_CMD_CHANNELC1EPFiiPvP3CMSEPKcS6_S6_i

    RCS_CMD_CHANNEL::RCS_CMD_CHANNEL(int ()(int, void, CMS), char const, char const, char const, int)

    This probably doesn't tell use too much, except it is a linuxcnc NML function that should be in libnml.so

    We can check which libnml.so hidcomp wants (put in the full path to hidcomp)...

    > ldd hidcomp
    linux-gate.so.1 => (0xb77ad000)
    libQtGui.so.4 => /usr/lib/i386-linux-gnu/libQtGui.so.4 (0xb68ad000)
    liblinuxcnchal.so.0 => /usr/lib/liblinuxcnchal.so.0 (0xb68a2000)
    * libnml.so.0 => /usr/lib/libnml.so.0 (0xb685c000)
    liblinuxcncini.so.0 => /usr/lib/liblinuxcncini.so.0 (0xb6858000)
    libQtXml.so.4 => /usr/lib/i386-linux-gnu/libQtXml.so.4 (0xb6816000)
    ...

    We can check if the symbol is in libnml.so...

    > nm /usr/lib/libnml.so | grep _ZN15RCS_CMD_CHANNELC1EPFiiPvP3CMSEPKcS6_S6_i

    _ZN15RCS_CMD_CHANNELC1EPFiiPvP3CMSEPKcS6_S6_i

    One of the previous commands should have failed if the library isn't in the right place.

    Another possibility is you are still running the old hidcomp. If this is the case there are 2 options - 1) put the full path to the new hidcomp in the .hal file. 2) uninstall the old hidcomp package, then build the new hidcomp package (in the hidcomp source in the dpkg directory - run "sudo build.sh" will create a new package leave it a up couple of directory levels) Then you can install the new package.

    Let me know how things go.

     
  • jerome B

    jerome B - 2015-03-23

    Hi,
    thanks for your reply
    It was a real mix in my cnc box and the hidcomp who was running was the old one. I remove it, compile hidcomp (need smalls changes) whith a newly compiled linuxcnc for lib ref and compile was fine. loading was fine also, no errors, but even if hal config show signals ands pins, were is no change when i press buttons. with generichid and hidconfig all was fine. don't know were to look !

    here are my changes https://git.framasoft.org/jblb/hidcomp

     
  • Frank Tkalcevic

    Frank Tkalcevic - 2015-03-24

    I was a bit lazy in my diagnosis of this - I just assumed it would work if it compiled and loaded.

    I'm now seeing the same problem. hidconfig seems to work, but hidcomp doesn't.

    I'm using a VMWare image based on the 2.6.4 linuxcnc CD debian/hybrid image. I don't get any compile errors.

    I'll continue to investigate.

     
  • jerome B

    jerome B - 2015-03-26

    Ok i an not alone !
    feel free to hask if you want test from me, but don't expect much help from code as I am not a software guy.

     
  • Frank Tkalcevic

    Frank Tkalcevic - 2015-04-02

    It was a bug in the code. I'll make a new release. If you see this before the release, the fix is in the file usbhid/hiddevicethread.cpp (add the whole if (n == 0) {} block at around line 255) ...

        struct timeval tv;
        n = libusb_get_next_timeout( NULL, &tv );
        if ( n == 0 )
        {
            tv.tv_sec = 0;
            tv.tv_usec = 20000; // default to 20ms if usb has nothing to do.
        }
        fd_set rd = fds_read;
        fd_set wr = fds_write;
        LOG_MSG( m_Logger, LogTypes::Debug, QString("Select will wait for %1.%2").arg(tv.tv_sec).arg(tv.tv_usec, 6, 10, QChar('0')) );
    
     
  • jerome B

    jerome B - 2015-04-03

    Hi Frank,
    it's works ! thx

     

Log in to post a comment.