Page 1 of 1

Installation fails on linux (F21)

PostPosted: Wed Aug 19, 2015 4:25 pm
by Harrie
When trying to install the DSView software on my linux box I get the following error:
$ cmake .
-- checking for modules 'libsigrok4DSL >= 0.2.0;libusb-1.0 >= 1.0.16;libsigrokdecode>=0.3.0'
-- package 'libsigrok4DSL >= 0.2.0' not found
-- package 'libsigrokdecode>=0.3.0' not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:341 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:395 (_pkg_check_modules_internal)
CMakeLists.txt:71 (pkg_check_modules)

These libraries however are installed:
$ ls -l /usr/local/lib64
total 2412
-rw-r--r--. 1 root root 1242894 Aug 19 08:11 libsigrok4DSL.a
-rwxr-xr-x. 1 root root 1001 Aug 19 08:11
lrwxrwxrwx. 1 root root 22 Aug 19 08:11 ->
lrwxrwxrwx. 1 root root 22 Aug 19 08:11 ->
-rwxr-xr-x. 1 root root 645046 Aug 19 08:11
-rw-r--r--. 1 root root 373214 Aug 19 08:54 libsigrokdecode.a
-rwxr-xr-x. 1 root root 1001 Aug 19 08:54
lrwxrwxrwx. 1 root root 24 Aug 19 08:54 ->
lrwxrwxrwx. 1 root root 24 Aug 19 08:54 ->
-rwxr-xr-x. 1 root root 187200 Aug 19 08:54
drwxr-xr-x. 2 root root 4096 Aug 19 09:34 pkgconfig

How can this be resolved?

One note: As a new user I went to the wiki for information where to get the software and how to install. Since things did not work I started looking at the forum and finally found a message in one of the items that the wiki is outdate!
It would really be good to update the wiki with at least a message that the information is outdated and that users need to go to the github pages for latest information. That save us newbies quite some time.

P.S. Even on github the information is not very clear. Only after more wikiing I finally found that (only) the DSview part is needed. At least that is how I understand it now, so please correct me if I am wrong.

Re: Installation fails on linux (F21)

PostPosted: Mon Aug 24, 2015 11:50 pm
by Harrie
Hmmm , looks like I found a way around it, a bit of a hack.
    1. Commented out the requirements for these libraries in CMakeLists.txt, cmake then does not check for those.
    Furthemore CMakeLists.txt was modified as below:
    Code: Select all
    #= Global Include Directories


    2. cmake . then produces errors for Qvariant regarding uint64_t. I am on a 64-bit platform and the code seems not to be fully able to handle that. For instance libraries (although 64-bit) are put in /usr/local/lib instead of /usr/local/lib64 as one would expect on 64-bit. Sigrok does the same. "Fixed" those by casting the arguments to qint64:
    Code: Select all
              $ grep -in qint64 ./pv/mainwindow.cpp
              742:            s_obj["vdiv"] = QJsonValue::fromVariant((qint64) dsoSig->get_vDialValue());
              743:            s_obj["vfactor"] = QJsonValue::fromVariant((qint64) dsoSig->get_factor());
    3. I had already installed most of the latest version of the sigrok code (directly from git) (also 64-bit and also stored in /usr/local/lib !!) so I did not compile and install the libsigrokdecode version provided with the DSView package. It turned out the DSView version is not up to date with the latest sigrok with made the code incompatible. This was "fixed" as follows:
    Code: Select all
              $ vi /data/project/DS/DSView-master/DSView/pv/data/decoderstack.cpp +355
                                              (chunk_end - i) * unit_size, unit_size) != SRD_OK) {
              $ vi /data/project/DS/DSView-master/DSView/pv/data/decode/decoder.cpp +167
                      srd_inst_channel_set_all(decoder_inst, probes, argument_removed);
    4. These modifications made the make run up to linking the DSView executable, a few libraries seemed to be not found. A quick hack is adding them explicitly at the end of the line in the CMakeFiles/DSView.dir/link.txt file, see below:
    Code: Select all
    /usr/lib64/ /usr/local/lib/ /usr/local/lib/

This gave me a DSView executable that "worked" without too much problems (there is quite an amount of log messages like obj.index = 37541428 in the window). Finally figured out that I had to run it with sudo and preceed the executable with LD_LIBRARY_PATH=/usr/local/lib to allow it to find the relevant libraries. DSView then recognised both my DSLogic Pro and DSCope and started uploading the firmware and FPGA code.
So it seems the hardware is recognised. I will give it a try later and report issues if any.

Re: Installation fails on linux (F21)

PostPosted: Wed Aug 26, 2015 6:05 am
by anatolik
then produces errors for Qvariant regarding uint64_t.

This is fixed upstream ... dd6654b688

Re: Installation fails on linux (F21)

PostPosted: Fri Aug 28, 2015 2:03 am
by Harrie
Thanks for the update anatolik.
Indeed I used the source version (not git) for my install as I has some problems in selecting the correct git repo.
I will retry with git soon.