Error compiling cyusb_linux_1.0.5 on Ubuntu 18.04 (again but different?)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
PaKa_4615756
Level 1
Level 1

The install script for cyusb_linux fails. I have already edited out "errno" instances in main.cpp and I believe I have the correct version of libusb installed:

root@Conga:/home/cypress/cyusb_linux_1.0.5# dpkg -l libusb-1.0*

Desired=Unknown/Install/Remove/Purge/Hold

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)

||/ Name                    Version          Architecture     Description

+++-=======================-================-================-===================================================

ii  libusb-1.0-0:amd64      2:1.0.21-2       amd64            userspace USB programming library

ii  libusb-1.0-0-dev:amd64  2:1.0.21-2       amd64            userspace USB programming library development files

ii  libusb-1.0-doc          2:1.0.21-2       all              documentation for userspace USB programming

Running install.sh as root yields:

root@Conga:/home/cypress/cyusb_linux_1.0.5# ./install.sh

Your current directory is /home/cypress/cyusb_linux_1.0.5. This is where the cyusb_suite software will be installed...

g++ -fPIC -o lib/libcyusb.o -c lib/libcyusb.cpp

g++ -shared -Wl,-soname,libcyusb.so -o lib/libcyusb.so.1 lib/libcyusb.o -l usb-1.0 -l rt

cd lib; ln -sf libcyusb.so.1 libcyusb.so

rm -f lib/libcyusb.o

rm -f moc_controlcenter.cpp

rm -f ui_controlcenter.h

rm -f controlcenter.o main.o fx2_download.o fx3_download.o streamer.o moc_controlcenter.o

rm -f *~ core *.core

/usr/lib/x86_64-linux-gnu/qt4/bin/uic controlcenter.ui -o ui_controlcenter.h

g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o controlcenter.o controlcenter.cpp

g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -o main.o main.cpp

main.cpp: In function ‘void get_config_details()’:

main.cpp:625:5: error: ‘libusb_get_ss_endpoint_companion_descriptor’ was not declared in this scope

     libusb_get_ss_endpoint_companion_descriptor (NULL, ep, &compd);

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

main.cpp:625:5: note: suggested alternative: ‘libusb_ss_endpoint_companion_descriptor’

     libusb_get_ss_endpoint_companion_descriptor (NULL, ep, &compd);

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     libusb_ss_endpoint_companion_descriptor

main.cpp:645:66: error: invalid use of incomplete type ‘struct get_config_details()::libusb_ss_endpoint_companion_descriptor’

       summ[summ_count].reqsize = (summ[summ_count].maxps * (compd->bMaxBurst + 1) *

                                                                  ^~

main.cpp:623:12: note: forward declaration of ‘struct get_config_details()::libusb_ss_endpoint_companion_descriptor’

     struct libusb_ss_endpoint_companion_descriptor *compd = NULL;

            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

main.cpp:646:14: error: invalid use of incomplete type ‘struct get_config_details()::libusb_ss_endpoint_companion_descriptor’

        (compd->bmAttributes + 1));

              ^~

main.cpp:623:12: note: forward declaration of ‘struct get_config_details()::libusb_ss_endpoint_companion_descriptor’

     struct libusb_ss_endpoint_companion_descriptor *compd = NULL;

            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

main.cpp:648:66: error: invalid use of incomplete type ‘struct get_config_details()::libusb_ss_endpoint_companion_descriptor’

       summ[summ_count].reqsize = (summ[summ_count].maxps * (compd->bMaxBurst + 1));

                                                                  ^~

main.cpp:623:12: note: forward declaration of ‘struct get_config_details()::libusb_ss_endpoint_companion_descriptor’

     struct libusb_ss_endpoint_companion_descriptor *compd = NULL;

            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Makefile:233: recipe for target 'main.o' failed

make: *** [main.o] Error 1

Suggestions??

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Initially I tried with libusb-1.0.9 and faced the same problem as you mentioned(after replacing errno with _errno). Later updated the libusb version to 1.0.22 which is available from the below link. Doing so cleared the errors.

https://sourceforge.net/projects/libusb/files/libusb-1.0/

FYI:

libusb installation procedure:

change the working directory to: libusb-1.0.9.tar\libusb-1.0.9

make the file - 'configure' as executable using chmod +x configure

Then run the following commands in sequence:

./configure

sudo make

sudo make check

sudo make install

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
2 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Initially I tried with libusb-1.0.9 and faced the same problem as you mentioned(after replacing errno with _errno). Later updated the libusb version to 1.0.22 which is available from the below link. Doing so cleared the errors.

https://sourceforge.net/projects/libusb/files/libusb-1.0/

FYI:

libusb installation procedure:

change the working directory to: libusb-1.0.9.tar\libusb-1.0.9

make the file - 'configure' as executable using chmod +x configure

Then run the following commands in sequence:

./configure

sudo make

sudo make check

sudo make install

Regards,

Hemanth

Hemanth
0 Likes

That's the ticket! Errors gone, cyusb_linux runs. Thanks much!

0 Likes