Closed SheetLightning closed 2 years ago
With a bit of help I made some progress.
It seems that to compile the gui one needs to run configure with the --enable-lxi-gui flag
./configure --enable-lxi-gui
Configure then reports that it needs QtChart. I was informed that the library to install is libqt5charts5-dev. After installing that, configure succeeds and make then attempts to compile the gui. However, it then fails with errors which seem to relate to the previous warnings.
$ make
Making all in src
make[1]: Entering directory '/home/johnc/src/lxi-tools/lxi-tools-1.21/src'
CC libapp_a-options.o
CC libapp_a-discover.o
discover.c: In function ‘discover’:
discover.c:66:20: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
info.broadcast = &broadcast;
^
discover.c:67:17: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
info.device = &device;
^
discover.c:68:18: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
info.service = &service;
^
CC libapp_a-scpi.o
CC libapp_a-screenshot.o
CC libapp_a-benchmark.o
CC libapp_a-run.o
CC libapp_a-lxilua.o
lxilua.c: In function ‘connect’:
lxilua.c:51:26: warning: passing argument 1 of ‘lxi_connect’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
device = lxi_connect(address, 0, NULL, option.timeout, VXI11);
^~~~~~~
In file included from lxilua.c:36:0:
/usr/include/lxi.h:59:5: note: expected ‘char *’ but argument is of type ‘const char *’
int lxi_connect(char *address, int port, char *name, int timeout, lxi_protocol_t protocol);
^~~~~~~~~~~
lxilua.c: In function ‘scpi’:
lxilua.c:83:31: warning: passing argument 2 of ‘lxi_send’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
length = lxi_send(device, command, strlen(command), option.timeout);
^~~~~~~
In file included from lxilua.c:36:0:
/usr/include/lxi.h:60:5: note: expected ‘char *’ but argument is of type ‘const char *’
int lxi_send(int device, char *message, int length, int timeout);
^~~~~~~~
lxilua.c: In function ‘scpi_raw’:
lxilua.c:132:31: warning: passing argument 2 of ‘lxi_send’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
length = lxi_send(device, command, strlen(command), option.timeout);
^~~~~~~
In file included from lxilua.c:36:0:
/usr/include/lxi.h:60:5: note: expected ‘char *’ but argument is of type ‘const char *’
int lxi_send(int device, char *message, int length, int timeout);
^~~~~~~~
CC plugins/libapp_a-screenshot_keysight-dmm.o
CC plugins/libapp_a-screenshot_keysight-ivx.o
CC plugins/libapp_a-screenshot_rigol-1000z.o
CC plugins/libapp_a-screenshot_rigol-2000.o
CC plugins/libapp_a-screenshot_rigol-dg4000.o
CC plugins/libapp_a-screenshot_rigol-dm3068.o
CC plugins/libapp_a-screenshot_rigol-dp800.o
CC plugins/libapp_a-screenshot_rigol-dsa.o
CC plugins/libapp_a-screenshot_rohde-schwarz-hmo-rtb.o
CC plugins/libapp_a-screenshot_siglent-sdm3000.o
CC plugins/libapp_a-screenshot_siglent-sdg.o
CC plugins/libapp_a-screenshot_siglent-sds.o
CC plugins/libapp_a-screenshot_siglent-ssa3000x.o
CC plugins/libapp_a-screenshot_tektronix.o
AR libapp.a
ar: `u' modifier ignored since `D' is the default (see `U')
CC main.o
CCLD lxi
make[1]: Leaving directory '/home/johnc/src/lxi-tools/lxi-tools-1.21/src'
Making all in man
make[1]: Entering directory '/home/johnc/src/lxi-tools/lxi-tools-1.21/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/johnc/src/lxi-tools/lxi-tools-1.21/man'
Making all in src/gui/lxi-gui
make[1]: Entering directory '/home/johnc/src/lxi-tools/lxi-tools-1.21/src/gui/lxi-gui'
qtchooser -run-tool=qmake -qt=5 -makefile -o Makefile.qmake lxi-gui.pro \
QT_INCDIR="//usr/local/include" \
QT_LIBDIR="//usr/local/lib" \
SNAPCRAFT="" \
Info: creating stash file /home/johnc/src/lxi-tools/lxi-tools-1.21/src/gui/lxi-gui/.qmake.stash
make -f Makefile.qmake all
make[2]: Entering directory '/home/johnc/src/lxi-tools/lxi-tools-1.21/src/gui/lxi-gui'
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_CHARTS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -isystem /usr/local/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCharts -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o main.o main.cpp
main.cpp: In function ‘void lxi_setup()’:
main.cpp:32:26: error: invalid conversion from ‘void (*)(const char*, const char*)’ to ‘void (*)(char*, char*)’ [-fpermissive]
lxi_info.broadcast = &broadcast;
^~~~~~~~~~
main.cpp:33:23: error: invalid conversion from ‘void (*)(const char*, const char*)’ to ‘void (*)(char*, char*)’ [-fpermissive]
lxi_info.device = &device;
^~~~~~~
Makefile.qmake:426: recipe for target 'main.o' failed
make[2]: *** [main.o] Error 1
make[2]: Leaving directory '/home/johnc/src/lxi-tools/lxi-tools-1.21/src/gui/lxi-gui'
Makefile:471: recipe for target 'all-local' failed
make[1]: *** [all-local] Error 2
make[1]: Leaving directory '/home/johnc/src/lxi-tools/lxi-tools-1.21/src/gui/lxi-gui'
Makefile:409: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
Made some further progress and finally got lxi-gui to compile. It seems that the problem was the older liblxi-1.8 library installed on my system from the Ubuntu repository. Once the current version of the library was downloaded from the lxi-tools Github, compiled and installed, the compilation of the lxi-gui program finally completed with just a couple of warnings. There were a couple of issues along the way. Firstly, I needed to add the following to lxi-gui.pro:
QT += widgets
This was necessary so that the compiler could find QtAction. After the compile process had finished, I also had to run:
sudo
ldconfig
This was to allow the system to find the liblxi.so.1 library, otherwise the following error occurred:
$ lxi-gui
lxi-gui: error while loading shared libraries: liblxi.so.1: cannot open shared object file: No such file or directory
After running the ldconfig command, the lxi-gui program now works and I can communicate with my Rigol DS1054Z.
Thank you for making these tools available.
I don't recommend using old Ubuntu distributions, for many reasons. Doing so you will face problems like the ones you had.
Anyway, big changes are coming in the upcoming release. lxi-gui has been fully rewritten in GTK4 to give it a more modern application UI. Also, autotools has been replaced with meson.
I downloaded the tar archive and tried to compile. The configure script ran fine and identified that lxi-lib needed installing which I did. The configure then completed with no issues. I then ran make.
Make did produce some warnings as can be seen in the output below, but did complete. The lxi command line tools has been compiled and seems to work fine, but not lxi-gui.
If I navigate to ./src/gui/lxi-gui and run make in there, I get the following:
Qmake is installed. After running make a couple more times I got:
When I run 'qmake' I get:
So it seems that QT Charts is missing, but where do i install it from? I couln't find it in the Mint repository nor do i find anything useful online? Not sure what the problem with qmake is either as it is definitely installed on the system?
Output of configure:
Output of make: