epc-msu / libximc Goto Github PK
View Code? Open in Web Editor NEWCross-platform library for working with ximc 8SMC4 and 8SMC5 controllers
Home Page: https://libximc.xisupport.com/doc-en/
License: BSD 2-Clause "Simplified" License
Cross-platform library for working with ximc 8SMC4 and 8SMC5 controllers
Home Page: https://libximc.xisupport.com/doc-en/
License: BSD 2-Clause "Simplified" License
I am using ximc 2.12.5 on linux, amd64. Using command_move
does not work for some values. For instance,
Does the position
argument to command_move
have any constraints? I think I may have misunderstood what position
means.
Can I build libximc from source as a static library on ubuntu 16.04?
libximc/libximc/docs/doc-en/docmainpage.c
Line 87 in 15c9b43
says it supports debian squeeze 7 for amd64-linux.
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.
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.
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.
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
For this one I was able to avoid the error message again by adding "-Wno-error=misleading-indentation" to CFLAGS.
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 );
| ^~~~~~~~~~~~~~~~~~~~~~
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"
| ^~~~~~~~~~~~~~~~~~~~~~~~~
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
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.