Code Monkey home page Code Monkey logo

libximc's People

Contributors

aryserg avatar bolonkin avatar entd avatar malc0 avatar marladon avatar nastasya1971 avatar ntarabrina avatar shampletov-no avatar theirix avatar timerke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libximc's Issues

command_move fails at one particular position

I am using ximc 2.12.5 on linux, amd64. Using command_move does not work for some values. For instance,

  • position = 22430 - result_ok
  • position = 25000 - result_ok
  • position = 25068 - result_error
  • position = 27666 - result_ok

Does the position argument to command_move have any constraints? I think I may have misunderstood what position means.

libximc fails to install unless libxibridge is provided

I think I discovered a bug.

When I configure libximc v2.15.7 as --without-xibridge, make and install the project, I get the following error:

Making install in libximc
make[1]: Entering directory '/tmp/libximc/libximc'
Making install in src
make[2]: Entering directory '/tmp/libximc/libximc/src'
make  install-am
make[3]: Entering directory '/tmp/libximc/libximc/src'
make[4]: Entering directory '/tmp/libximc/libximc/src'
mkdir -p "/tmp/prefix/lib"
cp -Ra /libxibridge.so "/tmp/prefix/lib"
cp: cannot stat '/libxibridge.so': No such file or directory

It appears that this line in a autoconf'd Makefile does not care about HAVE_XIBRIDGE. An easy fix would be to surround it with an if block.

Error messages while compiling libximc v2.14.3 using GCC v. 11.2

Hi,

I am encountering the following error messages with GCC v. 11.2 and OpenJDK 18 while compiling libximc from the v2.14.3 tag.

  1. This error message can be fixed by adding `"-Wno-error=deprecated-copy" to CXXFLAGS. This is a deprecated feature that used to give a warning only, but I guess this should be fixed in the code.

  2. This one I think might be an actual bug, and I could only get the code to compile by fixing lines 762 and 763 in devvirt.c

  3. For this one I was able to avoid the error message again by adding "-Wno-error=misleading-indentation" to CFLAGS.

  4. For this one, the problem is that the "javah" binary no longer exists since Java version 9, as the functionality to generate headers was added to "javac" with the "-h" flag. I don't need any Java wrappers so I just added "--without-java" in build.sh.

   
make  all-am
make[4]: Entering directory '/home/asmunder/libximc/xigen/src'
g++ -DHAVE_CONFIG_H -I. -I../..   -I/home/asmunder/libximc/deps/xiwrapper  -Wall -Werror -Wextra -Wshadow -Wno-switch -Wno-unused-parameter -Wno-parentheses -MT driver.o -MD -MP -MF .deps/driver.Tpo -c -o driver.o driver.cc
In file included from parsercontext.hh:5,
                 from driver.cc:2:
model.hh: In member function ‘void xigen::Command::transformComments(const Comments&)’:
model.hh:1221:113: error: implicitly-declared ‘xigen::Comment& xigen::Comment::operator=(const xigen::Comment&)’ is deprecated [-Werror=deprecated-copy]
 1221 |                                         doxyComments[Comment::doxySection] = Comment( false, doxySectionComment );
      |                                                                                                                 ^
model.hh:392:25: note: because ‘xigen::Comment’ has user-provided ‘xigen::Comment::Comment(const xigen::Comment&)’
  392 |                         Comment (const Comment& rhs)
      |                         ^~~~~~~
model.hh:1247:86: error: implicitly-declared ‘xigen::Comment& xigen::Comment::operator=(const xigen::Comment&)’ is deprecated [-Werror=deprecated-copy]
 1247 |                                                         doxyComments[cit->type()] = *cit;
      |                                                                                      ^~~
model.hh:392:25: note: because ‘xigen::Comment’ has user-provided ‘xigen::Comment::Comment(const xigen::Comment&)’
  392 |                         Comment (const Comment& rhs)
      |                         ^~~~~~~
devvirt.c: In function ‘check_state_version’:
devvirt.c:762:53: error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
  762 |         strncpy( file_version, blob->version, sizeof(blob->version) );
      |                                                     ^
ximc-gen.c: In function ‘get_status_impl_calb’:
protosup.h:87:1: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
   87 | if ((coeff)->MicrostepMode == 0 || (coeff)->MicrostepMode > MAX_ENUM_MICROSTEP_MODE) \
      | ^~
ximc-gen.c:1507:9: note: in expansion of macro ‘XI_normal_to_calibrate’
 1507 |         XI_normal_to_calibrate(status_calb->CurSpeed, inner.CurSpeed, inner.uCurSpeed, calibration );
      |         ^~~~~~~~~~~~~~~~~~~~~~
protosup.h:89:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   89 |         (fvalue) = (float)(((coeff)->A) * ((float)(value)+((float)(mvalue)) / powi(2, (coeff)->MicrostepMode - 1))); \
      |         ^
ximc-gen.c:1507:9: note: in expansion of macro ‘XI_normal_to_calibrate’
 1507 |         XI_normal_to_calibrate(status_calb->CurSpeed, inner.CurSpeed, inner.uCurSpeed, calibration );
      |         ^~~~~~~~~~~~~~~~~~~~~~

    • note the second line, where "JAVAH" environment variable has not been set during configure, so "$JAVAH -classpath" becomes just "-classpath" which is not a program, so no header file is generated and the subsequent compile fails.
jar cf  ../../../../wrappers/java/libjximc.jar -C ../../../../wrappers/java ru
classpath ../../../../wrappers/java/libjximc.jar -jni -d ../../../../wrappers/java/gen  ru.ximc.libximc.JXimc
make[5]: classpath: No such file or directory
make[5]: [Makefile:632: ../../../../wrappers/java/java-headers.stamp] Error 127 (ignored)
make[5]: Leaving directory '/home/asmunder/libximc/wrappers/java/src/java'
Making all in c
make[5]: Entering directory '/home/asmunder/libximc/wrappers/java/src/c'
../../../../xigen/src/xigen --gen-jni -w -x ../../../../version -i ../../../../libximc/src/protocol.xi -o ../../../../wrappers/java/src/c/ru_ximc_libximc_JXimc-gen.c -t ./ru_ximc_libximc_JXimc-template.c
Inline command firmware_version is replaced with non-inline
Inline command firmware_version is replaced with non-inline
Inline command bootloader_version is replaced with non-inline
Inline command bootloader_version is replaced with non-inline
JNI library generated by xigen  /home/asmunder/libximc/wrappers/java/src/c
make  all-am
make[6]: Entering directory '/home/asmunder/libximc/wrappers/java/src/c'
/bin/sh ../../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../..  -I/usr/lib/jvm/default/include -I/usr/lib/jvm/default/include/linux -I../../../../wrappers/java/gen -I../../../../libximc/include -I/home/asmunder/libximc/deps/xiwrapper  -Wno-deprecated-declarations -Wno-error=misleading-indentation -Wall -Werror -Wextra -Wshadow -Wno-switch -MT libjximc_la-ru_ximc_libximc_JXimc.lo -MD -MP -MF .deps/libjximc_la-ru_ximc_libximc_JXimc.Tpo -c -o libjximc_la-ru_ximc_libximc_JXimc.lo `test -f 'ru_ximc_libximc_JXimc.c' || echo './'`ru_ximc_libximc_JXimc.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../.. -I/usr/lib/jvm/default/include -I/usr/lib/jvm/default/include/linux -I../../../../wrappers/java/gen -I../../../../libximc/include -I/home/asmunder/libximc/deps/xiwrapper -Wno-deprecated-declarations -Wno-error=misleading-indentation -Wall -Werror -Wextra -Wshadow -Wno-switch -MT libjximc_la-ru_ximc_libximc_JXimc.lo -MD -MP -MF .deps/libjximc_la-ru_ximc_libximc_JXimc.Tpo -c ru_ximc_libximc_JXimc.c  -fPIC -DPIC -o .libs/libjximc_la-ru_ximc_libximc_JXimc.o
In file included from ru_ximc_libximc_JXimc.c:1:
ru_ximc_libximc_JXimc-gen.c:1:10: fatal error: ru_ximc_libximc_JXimc.h: No such file or directory
    1 | #include "ru_ximc_libximc_JXimc.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~

yy_current_buffer being undeclared variable

Hello,

While building the libximc library, I am facing issues related to yy_current_buffer being undeclared. After a review over this on google, I find this to be a consistent problem associated with building using flex, etc. Please suggest what must be done to build the library.

Thanks

Need help installing Libximc on a ubuntu 20.04 computer

Hello guys,

I have been trying to install this library on my ubuntu 20.04 installation. I plan to use some python3 code to control a Standa 8MRB450-350-60 - Large Aperture Rotary Table via 8SMC5-USB - Stepper & DC Motor Controller.

I have tried installing via pip but the library does not work as expected. I tried the following:

sudo apt-get update
sudo apt-get install build-essential make cmake curl git autotools-dev automake autoconf libtool doxygen bison flex debhelper lintian texlive texlive-latex-extra texlive-fonts-extra texlive-lang-cyrillic default-jre-headless default-jdk pkg-config check dh-autoreconf libfl-dev lsb-release python3 python3-pip
sudo apt-get install ruby
sudo apt-get install autoconf automake libtool
git clone https://github.com/EPC-MSU/libximc.git
cd libximc
sudo apt-get install libfl-dev
sudo apt-get install bison
./build.sh libdeb

This takes a while and eventually fails like this.

make[5]: Entering directory '/home/tti/libximc/wrappers/java/src/c'
../../../../xigen/src/xigen --gen-jni -w -x ../../../../version -i ../../../../libximc/src/protocol.xi -o ../../../../wrappers/java/src/c/ru_ximc_libximc_JXimc-gen.c -t ./ru_ximc_libximc_JXimc-template.c
Inline command firmware_version is replaced with non-inline
Inline command firmware_version is replaced with non-inline
Inline command bootloader_version is replaced with non-inline
Inline command bootloader_version is replaced with non-inline
JNI library generated by xigen /home/tti/libximc/wrappers/java/src/c
make all-am
make[6]: Entering directory '/home/tti/libximc/wrappers/java/src/c'
/bin/bash ../../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../.. -I/usr/lib/jvm/java-11-openjdk-amd64/include -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux -I../../../../wrappers/java/gen -I../../../../libximc/include -I/home/tti/libximc/deps/xiwrapper -I/home/tti/libximc/deps/miniupnpc/include -Wno-deprecated-declarations -Wall -Werror -Wextra -Wshadow -Wno-switch -MT libjximc_la-ru_ximc_libximc_JXimc.lo -MD -MP -MF .deps/libjximc_la-ru_ximc_libximc_JXimc.Tpo -c -o libjximc_la-ru_ximc_libximc_JXimc.lo test -f 'ru_ximc_libximc_JXimc.c' || echo './'ru_ximc_libximc_JXimc.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../.. -I/usr/lib/jvm/java-11-openjdk-amd64/include -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux -I../../../../wrappers/java/gen -I../../../../libximc/include -I/home/tti/libximc/deps/xiwrapper -I/home/tti/libximc/deps/miniupnpc/include -Wno-deprecated-declarations -Wall -Werror -Wextra -Wshadow -Wno-switch -MT libjximc_la-ru_ximc_libximc_JXimc.lo -MD -MP -MF .deps/libjximc_la-ru_ximc_libximc_JXimc.Tpo -c ru_ximc_libximc_JXimc.c -fPIC -DPIC -o .libs/libjximc_la-ru_ximc_libximc_JXimc.o
In file included from ru_ximc_libximc_JXimc.c:1:
ru_ximc_libximc_JXimc-gen.c:1:10: fatal error: ru_ximc_libximc_JXimc.h: No such file or directory
1 | #include "ru_ximc_libximc_JXimc.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[6]: *** [Makefile:524: libjximc_la-ru_ximc_libximc_JXimc.lo] Error 1
make[6]: Leaving directory '/home/tti/libximc/wrappers/java/src/c'
make[5]: *** [Makefile:416: all] Error 2
make[5]: Leaving directory '/home/tti/libximc/wrappers/java/src/c'
make[4]: *** [Makefile:429: all-recursive] Error 1
make[4]: Leaving directory '/home/tti/libximc/wrappers/java/src'
make[3]: *** [Makefile:429: all-recursive] Error 1
make[3]: Leaving directory '/home/tti/libximc/wrappers/java'
make[2]: *** [Makefile:429: all-recursive] Error 1
make[2]: Leaving directory '/home/tti/libximc/wrappers'
make[1]: *** [Makefile:485: all-recursive] Error 1
make[1]: Leaving directory '/home/tti/libximc'
make: *** [Makefile:417: all] Error 2

I would appreciate if someone could help me install it successfully and help me implement some python3 code.

libximc fails to build with xibridge

Hi, I got another bug for you in v2.15.7. When libxibridge is provided, the build process fails with the following error message:

make  all-recursive
make[1]: Entering directory '/tmp/libximc'
Making all in libximc
make[2]: Entering directory '/tmp/libximc/libximc'
Making all in src
make[3]: Entering directory '/tmp/libximc/libximc/src'
/tmp/myproject/lib/xigen-install/bin/xigen --gen-internal-header -w -x ../../version -i protocol.xi -o ximc-gen.h -t ./ximc-gen-template.h
/tmp/myproject/lib/xigen-install/bin/xigen --gen-code -w -x ../../version -i protocol.xi -o ximc-gen.c -t ./ximc-gen-template.c
/tmp/myproject/lib/xigen-install/bin/xigen --gen-fw-lib -w -x ../../version -i protocol.xi -o fwprotocol.c -t ./fwprotocol-template.c
/tmp/myproject/lib/xigen-install/bin/xigen --gen-fw-header -w -x ../../version -i protocol.xi -o fwprotocol.h -t ./fwprotocol-template.h
mkdir -p ../../libximc/include
/tmp/myproject/lib/xigen-install/bin/xigen --gen-header -x ../../version -i protocol.xi -o ../../libximc/include/ximc.h -t ./ximc-template.h
make  all-am
make[4]: Entering directory '/tmp/libximc/libximc/src'
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -I../../libximc/include -DLIBXIMC_EXPORTS -DDATADIR='"/tmp/prefix/share"' -I/tmp/myproject/lib/libxibridge-install -fvisibility=hidden  -g -O2 -MT libximc_la-devenum.lo -MD -MP -MF .deps/libximc_la-devenum.Tpo -c -o libximc_la-devenum.lo `test -f 'devenum.c' || echo './'`devenum.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../libximc/include -DLIBXIMC_EXPORTS -DDATADIR=\"/tmp/prefix/share\" -I/tmp/myproject/lib/libxibridge-install -fvisibility=hidden -g -O2 -MT libximc_la-devenum.lo -MD -MP -MF .deps/libximc_la-devenum.Tpo -c devenum.c  -fPIC -DPIC -o .libs/libximc_la-devenum.o
devenum.c: In function 'discover_ssdp_add_as_tcp':
devenum.c:612:30: error: 'struct UPNPDev' has no member named 'server'
  612 |             if (strstr(device->server, "8SMC5-USB") != NULL || strstr (device->server, "mDrive") != NULL)
      |                              ^~
devenum.c:612:78: error: 'struct UPNPDev' has no member named 'server'
  612 |             if (strstr(device->server, "8SMC5-USB") != NULL || strstr (device->server, "mDrive") != NULL)
      |                                                                              ^~
make[4]: *** [Makefile:819: libximc_la-devenum.lo] Error 1

There appears to be some field name mismatch related to struct UPNPDev. I could not find declaration of this particular struct anywhere in the code base, so I do not have any more insights unfortunately.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.