3

I have a problem with sigrok-cli build from .tar.gz.

Yesterday I installed sigrok metapackage, which went fine. Today I found out that the ubuntu 17.04 package is incompatible with the DMM I wish to use. So on advice I removed, purged and auto removed sigrok and pulseview and started "anew"

I downloaded sigrok-cli-0.7.0.tar.gz and unpacked this in my home folder.
initially I tried to follow the instructions in the readme file on how to build, but ended up not "gitting" and just planned to build by ./configure & make & sudo make install.

But I bumped into some dependency issues, I needed:

  1. libsigrok
  2. libsigrokdecode

Of course upon building these I bumped into some other dependencies. python 3 developer and libzip-dev. anyway I managed to install these and build the first two so I got to build sigrok-cli too by:

  1. Downloading the .tar.gz file
  2. Unzipping them in there seperate dir my home dir
  3. From these seperate dir's I ./configured, make & sudo make install them. But I now believe these ended up wrong location.

Dependency wise it worked, there were no longer issues, but when I now try to run the sigrok-cli I get the following error message:

sigrok-cli: error while loading shared libraries:
libsigrok.so.4: cannot open shared object file: No such file or directory.

Now I know this file to be in the ~/libsigrok-0.5.0/.libs/ so the program is looking in the wrong place (or better said the file is in the wrong place). now from what I learned yesterday I believe the correct location to be either in:

  1. ~/usr/bin
  2. ~/usr/local/bin.

but when I look into these ~/bin folders I find no other folders.

So maybe libsigrok-0.5.0 and libsigrokdecode-0.5.0 should be in the folder sigrok-cli-0.7.0. but even if these folders need to be in another location. I'm not sure what the correct manner would be to get them there, just cut / past or should I uninstall and re install on the right directory?

3

It appears that a considerable amount of building is required to get to your goal! The following worked on my own 17.04 system and builds what I believe are your required packages:

Build Requirements:

Install these from a Terminal to install all of the required dependencies for building the packages with the following single command:

sudo apt-get install git build-essential make \
autoconf automake libtool checkinstall autoconf-archive \
pkg-config libglib2.0-dev libglibmm-2.4-dev libzip-dev \
libusb-1.0-0-dev libftdi-dev check doxygen python-numpy \
python-dev python-gi-dev python-setuptools swig default-jdk \
libglib2.0-dev python3-dev

Make a build area:

mkdir $HOME/sigrock_build 

Then start building:


libserialport

The following is a single command:

cd $HOME/sigrock_build && \
wget http://sigrok.org/download/source/libserialport/libserialport-0.1.1.tar.gz && \
tar xvf libserialport-0.1.1.tar.gz && \
cd libserialport-0.1.1 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/sigrock_build" --backup=no --deldoc=yes \
                  --pkgname libserialport --pkgversion "0.1.1" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
sudo ldconfig

libsigrock

The following is a single command:

cd $HOME/sigrock_build && \
wget http://sigrok.org/download/source/libsigrok/libsigrok-0.5.0.tar.gz && \
tar xvf libsigrok-0.5.0.tar.gz && cd libsigrok-0.5.0 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/sigrock_build" --backup=no --deldoc=yes \
                  --pkgname libsigrock --pkgversion "0.5.0" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
sudo ldconfig

libsigrokdecode

The following is a single command:

cd $HOME/sigrock_build && \
wget http://sigrok.org/download/source/libsigrokdecode/libsigrokdecode-0.5.0.tar.gz && \
tar xvf libsigrokdecode-0.5.0.tar.gz && cd libsigrokdecode-0.5.0 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/sigrock_build" --backup=no --deldoc=yes \
                  --pkgname libsigrockdecode --pkgversion "0.5.0" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
sudo ldconfig

sigrock-cli

The following is a single command:

cd $HOME/sigrock_build && \
wget http://sigrok.org/download/source/sigrok-cli/sigrok-cli-0.7.0.tar.gz && \
tar xvf sigrok-cli-0.7.0.tar.gz && cd sigrok-cli-0.7.0 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/sigrock_build" --backup=no --deldoc=yes \
                  --pkgname sigrok-cli --pkgversion "0.7.0" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
sudo ldconfig

Final Result:

On my 17.04 system this shows:

andrew@ilium:~$ sigrok-cli --version
sigrok-cli 0.7.0

Libraries and features:
- libsigrok 0.5.0/4:0:0 (rt: 0.5.0/4:0:0).
 - Libs:
  - glib 2.52.0 (rt: 2.52.0/5200:0)
  - libzip 1.1.2
  - libserialport 0.1.1/1:0:1 (rt: 0.1.1/1:0:1)
  - libusb-1.0 1.0.21.11156
  - libftdi 0.20
  - Host: x86_64-pc-linux-gnu, little-endian.
  - SCPI backends: TCP, RPC, serial, USBTMC.
- libsigrokdecode 0.5.0/4:0:0 (rt: 0.5.0/4:0:0).
 - Libs:
  - glib 2.52.0 (rt: 2.52.0/5200:0)
  - Python 3.5.3 / 0x30503f0 (API 1013, ABI 3)
  - Host: x86_64-pc-linux-gnu, little-endian.
andrew@ilium:~$ 

And hopefully you will have the same result :)

| improve this answer | |
  • exactly the same :D thank you very much! didn't realise one could put all those commands in one go.. good to know! also i have a good look through the command to see if i can figure out what i just copy / pasted ;) – Matthieu Kints van Aug 5 '17 at 9:19
  • additional, doubt that it is of consequence because of the final result. but i did finf a couple of error messages that i saw before: namely copying selected object files to avoid basename conflicts... ar: u' modifier ignored since D' is the default (see `U') i have no idea what that means but just thought to mention it. – Matthieu Kints van Aug 5 '17 at 9:20
  • Great to hear it all worked :). The && simply means continue processing the next command if the previous command has succeeded... It makes life easier for what is otherwise a tedious copy and paste routine. Compiler warnings are not usually a major drama... – andrew.46 Aug 5 '17 at 9:33
  • at this moment i'm trying to add sigrok-meter from github, and do this following your example. and used the following command: – Matthieu Kints van Aug 5 '17 at 12:02
  • cd $HOME/sigrock_build && \ sudo -H apt-get install python-qt4 python-pip && \ sudo -H pip install pyqtgraph && \ git clone git://sigrok.org/sigrok-meter && \ cd sigrok-meter && \ ./configure && make && \ sudo checkinstall --pakdir "$HOME/sigrock_build" --backup=no --deldoc=yes \ --pkgname sigrok-meter --fstrans=no \ --deldesc=yes --delspec=yes --default && \ sudo ldconfig – Matthieu Kints van Aug 5 '17 at 12:03
1

Andrew.46's answer was extremely helpfull (more then so actually).

But in the mean time i found some additional info that i wanted to add and prefered it not hidden in a comment, so i decided to add this answer which only adds to andrew.46's extensive answer.

I will update according to stuff i learn along the way, in the hope others can benefit.

1) the ut71(c) is supported by serial-dmm driver.
2) libsigrokdecode is not needed for dmm use (but doubt that it will harm either)
3) Pulseview is not yet supported for dmm's but will be in the (near future.
4) instead one can use sigrok-meter, but this is at the moment not ready for daily use,
according to the developers.

sigrok-meter can be installed with proper dependencies with this single command.

cd $HOME/sigrock_build && \  
sudo -H apt-get install python-qt4 pyqt4-dev-tools python-pip && \  
sudo -H pip install pyqtgraph && \  
git clone git://sigrok.org/sigrok-meter && \  
cd sigrok-meter && \  
./configure && make && \  
sudo checkinstall --pakdir "$HOME/sigrock_build" --backup=no --deldoc=yes \  
                  --pkgname sigrok-meter --fstrans=no \  
                  --deldesc=yes --delspec=yes --default && \  
sudo ldconfig

although i'm not 100% on the "checkinstall" lines, please correct me if it is wrong!

once installed, when using a ut71c and a ut-do4 usb cable you can then run the program by:

cd "buildfolder"
./sigrok-meter -d uni-t-ut71c-ser:conn=1a86.e008 --continuous or --frames 5

is you are using a different cable ut-do2 plus r232 to usb, locate the usb device in question by: lsusb and replace 1a86.e008 with the right adress. Also when using a different dmm: replace the driver by the correct one. You can find all the supported drivers with

./sigrok-cli -L   

unfortunately there is a problem with connecting with the dmm under linux as the linux kernel doesn't send the usb device to sleep when not used like the windows kernel does. I have had a similar problem before with 3d connexion space mouse on freecad under linux.

to solve this issue there is a work around: run the scrip which you will find on the link below. run this script each time before you run sigrok-cli.

how to do this?
1) create a txt file (without extension, ok acn use .sh if you really want to)
2) copy past this script, be aware of all the correct indentations. 3) save
4) select via properties to allow to run as executable.
5) run by: sd /location/of/file && ./filename && ./sigrok-cli......

this should let you run the program with all the desired option.

enjoy!

but before i end this i want to give special thanks to Andrew.46 from this forum and abraxa and alm from the eevblog forum.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.