iua icon indicating copy to clipboard operation
iua copied to clipboard

build failure for smunaut/libsigrok

Open gojimmypi opened this issue 4 years ago • 4 comments

I've successfully built the recent release of sigrok/lib/decoder/pulseview on WSL Ubuntu on Windows 10.

I tried to build smunaut/libsigrok in the context of our discord chat to get iua working with the iCEBreaker, but I'm seeing a build error during make:

git clone https://github.com/smunaut/libsigrok.git smunaut-libsigrok
cd smunaut-libsigrok
./autogen.sh  
./configure
make
 CC       src/hardware/iua/protocol.lo
src/hardware/iua/protocol.c: In function ‘iua_receive_data’:
src/hardware/iua/protocol.c:123:8: warning: implicit declaration of function ‘serial_read_nonblocking’ [-Wimplicit-function-declaration]
  len = serial_read_nonblocking(serial, devc->ser_buf + devc->ser_buflen, IUA_SER_BUFSIZE - devc->ser_buflen);
        ^~~~~~~~~~~~~~~~~~~~~~~
  CC       src/hardware/iua/api.lo
src/hardware/iua/api.c: In function ‘scan’:
src/hardware/iua/api.c:65:11: warning: implicit declaration of function ‘sr_serial_dev_inst_new’; did you mean ‘sr_usbtmc_dev_inst_new’? [-Wimplicit-function-declaration]
  serial = sr_serial_dev_inst_new(conn, serialcomm);
           ^~~~~~~~~~~~~~~~~~~~~~
           sr_usbtmc_dev_inst_new
src/hardware/iua/api.c:65:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  serial = sr_serial_dev_inst_new(conn, serialcomm);
         ^
src/hardware/iua/api.c: In function ‘dev_acquisition_start’:
src/hardware/iua/api.c:170:2: warning: implicit declaration of function ‘serial_source_add’; did you mean ‘usb_source_add’? [-Wimplicit-function-declaration]
  serial_source_add(sdi->session, serial, G_IO_IN, 100,
  ^~~~~~~~~~~~~~~~~
  usb_source_add
src/hardware/iua/api.c:173:6: warning: implicit declaration of function ‘serial_write_blocking’ [-Wimplicit-function-declaration]
  if (serial_write_blocking(serial, "e", 1, SERIAL_WRITE_TIMEOUT_MS) < 0) {
      ^~~~~~~~~~~~~~~~~~~~~
src/hardware/iua/api.c: In function ‘dev_acquisition_stop’:
src/hardware/iua/api.c:197:13: warning: implicit declaration of function ‘serial_source_remove’; did you mean ‘usb_source_remove’? [-Wimplicit-function-declaration]
  if ((ret = serial_source_remove(sdi->session, serial)) < 0) {
             ^~~~~~~~~~~~~~~~~~~~
             usb_source_remove
src/hardware/iua/api.c: At top level:
src/hardware/iua/api.c:217:14: error: ‘std_serial_dev_open’ undeclared here (not in a function); did you mean ‘std_serial_dev_close’?
  .dev_open = std_serial_dev_open,
              ^~~~~~~~~~~~~~~~~~~
              std_serial_dev_close
Makefile:3366: recipe for target 'src/hardware/iua/api.lo' failed
make[1]: *** [src/hardware/iua/api.lo] Error 1
Makefile:1734: recipe for target 'all' failed
make: *** [all] Error 2

I have the sigrokproject/libserialport successfully built and installed, so the std_serial_dev_open must be someplace else? Any tips for what I might be doing wrong?

Once operational, are there plans to send your iCEBreaker features back to sigrok as a PR? That would be really quite cool.

gojimmypi avatar Aug 09 '20 21:08 gojimmypi

thanks for the td_serial_dev_open fix. I am able to compile your iua branch, but pulseview does not seems to like it.

$ pulseview
pulseview: error while loading shared libraries: libserialport.so.0: cannot open shared object file: No such file or directory
gojimmypi:/mnt/c/workspace/pulseview
$ make clean
gojimmypi:/mnt/c/workspace/pulseview
$ cmake .
-- Qt version: 5.9.5
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   filesystem
--   serialization
--   system
-- Atomics provided by the C-library - yes
-- PulseView version: 0.5.0-git-9d307c6
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/c/workspace/pulseview
gojimmypi:/mnt/c/workspace/pulseview
$ make
[  1%] Automatic MOC for target pulseview
[  1%] Built target pulseview_autogen
make[2]: *** No rule to make target 'l10n/de.qm', needed by 'qrc_translations.cpp'.  Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pulseview.dir/all' failed
make[1]: *** [CMakeFiles/pulseview.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

gojimmypi avatar Aug 10 '20 15:08 gojimmypi

i have this problem too

quantrpeter avatar Feb 03 '22 16:02 quantrpeter

Hi,

I had this problem too. In my case, after make clean two files were deleted for some reason.

git restore l10n/de.ts l10n/es_MX.ts did the trick.

Look:

~/rpms/open_workbench/pulseview/
10000 $ ./pulseview: error while loading shared libraries: libboost_filesystem.so.1.79.0: cannot open shared object file: No such file or directory
$ make clean
$ make
-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Qt version: 5.15.5
-- Found Boost: /usr/lib64/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.55") found components: filesystem serialization system 
-- Atomics provided by the C-library - yes
-- PulseView version: 0.5.0-git-a6fa4d4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/rpms/open_workbench/pulseview
[  1%] Automatic MOC for target pulseview
[  1%] Built target pulseview_autogen
make[2]: *** No rule to make target 'l10n/de.qm', needed by 'qrc_translations.cpp'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:102: CMakeFiles/pulseview.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    l10n/de.ts
        deleted:    l10n/es_MX.ts

no changes added to commit (use "git add" and/or "git commit -a")

$ git restore l10n/de.ts l10n/es_MX.ts
$ cmake .
-- Qt version: 5.15.5
-- Atomics provided by the C-library - yes
-- PulseView version: 0.5.0-git-a6fa4d4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mroberto/rpms/open_workbench/pulseview

$ make
[  1%] Automatic MOC for target pulseview
[  1%] Built target pulseview_autogen
[  2%] Generating l10n/de.qm
Updating '/home/mroberto/rpms/open_workbench/pulseview/l10n/de.qm'...
    Generated 288 translation(s) (288 finished and 0 unfinished)
[  3%] Generating l10n/es_MX.qm
Updating '/home/mroberto/rpms/open_workbench/pulseview/l10n/es_MX.qm'...
    Generated 276 translation(s) (269 finished and 7 unfinished)
    Ignored 13 untranslated source text(s)
[  4%] Generating qrc_translations.cpp
[  5%] Generating qrc_pulseview.cpp
[  6%] Building CXX object CMakeFiles/pulseview.dir/pulseview_autogen/mocs_compilation.cpp.o
...

mrjimenez avatar Oct 07 '22 23:10 mrjimenez

Install libserialport-dev

stiffsteve avatar Feb 22 '23 00:02 stiffsteve