cyusb_linux Install Error: libusb_get_ss_endpoint_companion_descriptor not declared

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

cross mob
Anonymous
Not applicable

Hi,

I am using Ubuntu 16.04 64 bit in Virtual Box. I followed the instructions in cyusb Linux SDK, but ran into error on building the cyUSB application. I did install the usblib 1.0.9 , libusb-1.0.16-rc10 and Qt4. From the cyusb_linix_1.0.5 directory, I ran make, then ./install.sh, but I got the error - libusb_get_ss_endpoint_companion_descriptor’ was not declared in this scope. Below is the log. please help. Thanks. Phil

phil@phil-VirtualBox:~/Cypress/cyusb_linux_1.0.5$ make

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

phil@phil-VirtualBox:~/Cypress/cyusb_linux_1.0.5$ sudo ./install.sh

[sudo] password for phil:

Your current directory is /home/phil/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:66: error: ‘libusb_get_ss_endpoint_companion_descriptor’ was not declared in this scope

     libusb_get_ss_endpoint_companion_descriptor (NULL, ep, &compd);

                                                                  ^

main.cpp:646: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 +

                                                                  ^

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:647: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:649: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 +

                                                                  ^

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

phil@phil-VirtualBox:~/Cypress/cyusb_linux_1.0.5$

0 Likes
1 Solution
Anonymous
Not applicable

Srinath,

Thanks for the quick response.

Note that when I first installed the libusb manually, it complained about

udev. So I installed it.

sudo apt-get install libudev-dev

Just before I got your reply, I downloaded libusb-1.0.22.tar.bz2 from

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

I ran the ./configure, make, make check, then sudo make install

When I ran dpkg -l libusb-1.0*, I did get the correct libusb version

phil@phil-VirtualBox:~$ 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:a 2:1.0.20-1 amd64 userspace USB programming

library

Now I can build and install the cyusb_linux application successfully.

I also need to modify the configs/cyusb.conf to add VID/PID for my FX3

device.

Ran sudo ./install.sh again, and the Control Center recognized my FX3

device.

I assume your instructions for installing libusb-1.0 would work also, but I

have not verified since my system is working now.

sudo apt-get remove libusb-1.0-0

sudo apt-get install libusb-1.0-0-dev

Please update the user guide to include the latest correct instructions.

Please mark this question as answered.

Thanks again for your quick response.

Phil

View solution in original post

5 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello Phil,

The older versions of libusb did not have the definition for the libusb_get_ss_endpoint_companion_descriptor structure. Please check if your installed libusb version is 1.0.16 or above. You can use the below command to obtain the version.

dpkg -l libusb-1.0*

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

Hi,

I am rusty in linux. I followed the user guide, and used the sourceforge

link to install various versions of libusb. I don't know how to uninstall

them.

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

I did install libusb-1.0.16-rc10, but still get the same error -

libusb_get_ss_endpoint_companion_descriptor

When I used dpkg -l libusb-1.0*, I got error as below.

Please help me to clean up and install the correct libusb on my ubuntu

16.04 64bit.

Thanks

Phil Chu

973-975-8200

phil@phil-VirtualBox:~/Cypress$ sudo apt-get install libusb-1.0*

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package libusb-1.0.16-rc10

E: Couldn't find any package by glob 'libusb-1.0.16-rc10'

E: Couldn't find any package by regex 'libusb-1.0.16-rc10'

E: Unable to locate package libusb-1.0.16-rc10.tar.bz2

E: Couldn't find any package by glob 'libusb-1.0.16-rc10.tar.bz2'

E: Couldn't find any package by regex 'libusb-1.0.16-rc10.tar.bz2'

E: Unable to locate package libusb-1.0.18.tar.bz2

E: Couldn't find any package by glob 'libusb-1.0.18.tar.bz2'

E: Couldn't find any package by regex 'libusb-1.0.18.tar.bz2'

E: Unable to locate package libusb-1.0.22

E: Couldn't find any package by glob 'libusb-1.0.22'

E: Couldn't find any package by regex 'libusb-1.0.22'

E: Unable to locate package libusb-1.0.22.tar.bz2

E: Couldn't find any package by glob 'libusb-1.0.22.tar.bz2'

E: Couldn't find any package by regex 'libusb-1.0.22.tar.bz2'

E: Unable to locate package libusb-1.0.9

E: Couldn't find any package by glob 'libusb-1.0.9'

E: Couldn't find any package by regex 'libusb-1.0.9'

E: Unable to locate package libusb-1.0.9.tar.bz2

E: Couldn't find any package by glob 'libusb-1.0.9.tar.bz2'

E: Couldn't find any package by regex 'libusb-1.0.9.tar.bz2'

phil@phil-VirtualBox:~/Cypress$ sudo dpkg -l libusb-1.0*

dpkg-query: no packages found matching libusb-1.0.16-rc10

dpkg-query: no packages found matching libusb-1.0.16-rc10.tar.bz2

dpkg-query: no packages found matching libusb-1.0.18.tar.bz2

dpkg-query: no packages found matching libusb-1.0.22

dpkg-query: no packages found matching libusb-1.0.22.tar.bz2

dpkg-query: no packages found matching libusb-1.0.9

dpkg-query: no packages found matching libusb-1.0.9.tar.bz2

phil@phil-VirtualBox:~/Cypress$

0 Likes
Anonymous
Not applicable

Hi Srinath,

I am rusty in linux. I followed the user guide, and used the sourceforge

link to install various versions of libusb. I don't know how to uninstall

them.

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

I did install libusb-1.0.16-rc10, but still get the same error -

libusb_get_ss_endpoint_companion_descriptor

I tried to remove the libusb, but it couldn't. Please see log below.

When I used dpkg -l libusb-1.0*, I got error as below.

Please help me to clean up and install the correct libusb on my ubuntu

16.04 64bit.

Thanks

Phil Chu

973-975-8200

phil@phil-VirtualBox:~/Cypress$ sudo dpkg -r libusb-1.0*

dpkg: warning: ignoring request to remove libusb-1.0.16-rc10 which isn't

installed

dpkg: warning: ignoring request to remove libusb-1.0.16-rc10.tar.bz2 which

isn't installed

dpkg: warning: ignoring request to remove libusb-1.0.18.tar.bz2 which isn't

installed

dpkg: warning: ignoring request to remove libusb-1.0.22 which isn't

installed

dpkg: warning: ignoring request to remove libusb-1.0.22.tar.bz2 which isn't

installed

dpkg: warning: ignoring request to remove libusb-1.0.9 which isn't installed

dpkg: warning: ignoring request to remove libusb-1.0.9.tar.bz2 which isn't

installed

phil@phil-VirtualBox:~/Cypress$ sudo apt-get remove libusb-1.0.22

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package libusb-1.0.22

E: Couldn't find any package by glob 'libusb-1.0.22'

E: Couldn't find any package by regex 'libusb-1.0.22'

phil@phil-VirtualBox:~/Cypress$ sudo apt-get remove libusb-1.0.9

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package libusb-1.0.9

E: Couldn't find any package by glob 'libusb-1.0.9'

E: Couldn't find any package by regex 'libusb-1.0.9'

phil@phil-VirtualBox:~/Cypress$ sudo apt-get remove libusb-1.0.16-rc10

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package libusb-1.0.16-rc10

E: Couldn't find any package by glob 'libusb-1.0.16-rc10'

E: Couldn't find any package by regex 'libusb-1.0.16-rc10'

phil@phil-VirtualBox:~/Cypress$ sudo apt-get install libusb-1.0*

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package libusb-1.0.16-rc10

E: Couldn't find any package by glob 'libusb-1.0.16-rc10'

E: Couldn't find any package by regex 'libusb-1.0.16-rc10'

E: Unable to locate package libusb-1.0.16-rc10.tar.bz2

E: Couldn't find any package by glob 'libusb-1.0.16-rc10.tar.bz2'

E: Couldn't find any package by regex 'libusb-1.0.16-rc10.tar.bz2'

E: Unable to locate package libusb-1.0.18.tar.bz2

E: Couldn't find any package by glob 'libusb-1.0.18.tar.bz2'

E: Couldn't find any package by regex 'libusb-1.0.18.tar.bz2'

E: Unable to locate package libusb-1.0.22

E: Couldn't find any package by glob 'libusb-1.0.22'

E: Couldn't find any package by regex 'libusb-1.0.22'

E: Unable to locate package libusb-1.0.22.tar.bz2

E: Couldn't find any package by glob 'libusb-1.0.22.tar.bz2'

E: Couldn't find any package by regex 'libusb-1.0.22.tar.bz2'

E: Unable to locate package libusb-1.0.9

E: Couldn't find any package by glob 'libusb-1.0.9'

E: Couldn't find any package by regex 'libusb-1.0.9'

E: Unable to locate package libusb-1.0.9.tar.bz2

E: Couldn't find any package by glob 'libusb-1.0.9.tar.bz2'

E: Couldn't find any package by regex 'libusb-1.0.9.tar.bz2'

phil@phil-VirtualBox:~/Cypress$ sudo dpkg -l libusb-1.0*

dpkg-query: no packages found matching libusb-1.0.16-rc10

dpkg-query: no packages found matching libusb-1.0.16-rc10.tar.bz2

dpkg-query: no packages found matching libusb-1.0.18.tar.bz2

dpkg-query: no packages found matching libusb-1.0.22

dpkg-query: no packages found matching libusb-1.0.22.tar.bz2

dpkg-query: no packages found matching libusb-1.0.9

dpkg-query: no packages found matching libusb-1.0.9.tar.bz2

phil@phil-VirtualBox:~/Cypress$

0 Likes

Hello Phil,

To remove the libusb in the machine, use the following command.

sudo apt-get remove libusb-1.0-0

After this, install the libusb from the repository using the below command.

sudo apt-get install libusb-1.0-0-dev

Following this, use the below command to check the version of the libusb.

dpkg -l libusb-1.0*

In case, you find the version to be 2:1.0.21-2 (latest as of now), proceed with the installation of the 'cyusb_linux' gui and let me know the results.

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

Srinath,

Thanks for the quick response.

Note that when I first installed the libusb manually, it complained about

udev. So I installed it.

sudo apt-get install libudev-dev

Just before I got your reply, I downloaded libusb-1.0.22.tar.bz2 from

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

I ran the ./configure, make, make check, then sudo make install

When I ran dpkg -l libusb-1.0*, I did get the correct libusb version

phil@phil-VirtualBox:~$ 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:a 2:1.0.20-1 amd64 userspace USB programming

library

Now I can build and install the cyusb_linux application successfully.

I also need to modify the configs/cyusb.conf to add VID/PID for my FX3

device.

Ran sudo ./install.sh again, and the Control Center recognized my FX3

device.

I assume your instructions for installing libusb-1.0 would work also, but I

have not verified since my system is working now.

sudo apt-get remove libusb-1.0-0

sudo apt-get install libusb-1.0-0-dev

Please update the user guide to include the latest correct instructions.

Please mark this question as answered.

Thanks again for your quick response.

Phil