FX3 Support Software for Linux (Ubuntu), problems compiling code

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

cross mob
lock attach
Attachments are accessible only for community members.
widrc_1621251
Level 1
Level 1

HI,

I AM TRYING TO INSTALL THE FX3 SUPPORT SOFTWARE FOR LINUX ON AN I7 BASED LAPTOP RUNNING UBUNTU 16.04. I HAVE RUN INTO A NUMBER OF ISSUES THAT ARE ILLUSTRATED BELOW. I AM LOOKING FOR ANY INFORMATION THAT MAY HELP ME BUILD AND INSTALL THE EXECUTABLES. I BELIEVE I HAVE SET UP ALL THE PATHS CORRECTLY, DOWNLOADED THE FILES TO SUPPORT THE 64BIT VERSION, DOWNLOADED QT4, ETC.

ANY ASSISTANCE WOULD BE GREATLY APPRECIATED. I HAVE USED AND DEVELOPED WITH THE WINDOWS BASED SOFTWARE (STREAMER) FOR FX3 WITHOUT ISSUE IN THE PAST.

THANKS,

BILL

I have attached a PDF with the full discussion and images from the compile attempts.

0 Likes
1 Solution

Hi William,

Can you please try to open the Makefile under cyusb_linux_1.0.5 and modify the command from

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

to

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

Please try and tell me the result.

View solution in original post

0 Likes
17 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello Bill,

As it can be seen from the error while running the make command, it looks like the libusb-1.0.x is not installed on your machine. Kindly, install the same and then run the make command.

Best regards,

Srinath S

0 Likes

Hi Srinath,

I unzipped the entire ZIP package from Cypress onto my system. I ran thru the install sequence in the "libusb-1.0.9" directory: ./configure; make; make install. I did not see any errors. This should install libusb-1.0.9, correct?

Is there a complete installation sequence for building the FX3 executable? It seems like I am missing some guide. Every folder has some installation sequence in it and I am not sure I have gotten everything.

Thanks,

Bill

0 Likes

Hi William,

To install libusb, you could just run the command

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

Also, you need to add the CYUSB_ROOT in PATH value.

0 Likes
lock attach
Attachments are accessible only for community members.

Hi William,

I found a document which I wrote before when I installed FX3 SDK for linux v1.3..3. Hope it could help you.

It is not an official document. Just for reference.

0 Likes

Thank you Yangyang! I will try this, this evening.

0 Likes

Well, I apt-get installed libusb and I used

export CYUSB_ROOT=Desktop/FX3_SDK_1.3.4_Linux/cyusb_linux_1.0.5

and still get the same error from g++ when doing the make.libusb_installed_still_no_make.png

Note that it says it cannot find -llibusb-1.0. Is that odd that it leaves out the space between -l and libusb?

SetUp_libusb.png

Any other suggestions would be appreciated. Thanks, Bill

0 Likes

Hi William,

Can you please try to open the Makefile under cyusb_linux_1.0.5 and modify the command from

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

to

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

Please try and tell me the result.

0 Likes

YangYang,

Yes changing to "USB-1.0" allowed the Make file to run without error. Thank you very much!

Now I am on to trying to do the sudo ./install.sh

But the install fails when trying to compile:

InstallFail.png

I am guessing that the include in main.cpp for libusb is not pointing to the correct directory...

Thank you again. Bill

0 Likes

I just found this:

cyusb_linux Install Error: libusb_get_ss_endpoint_companion_descriptor not declared

I will try reinstalling a later version of libusb and running through the procedure again.

0 Likes

Please try and let me know the result.

0 Likes

Hi Yangyang,

Still no luck. I followed the instructions in the previous post and the ./install.sh yields the same error:

william@Penrith-2:~$ 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

ii  libusb-1.0-0-d 2:1.0.20-1   amd64        userspace USB programming library

ii  libusb-1.0-doc 2:1.0.20-1   all          documentation for userspace USB p

william@Penrith-2:~/Desktop/FX3_SDK_1.3.4_Linux/cyusb_linux_1.0.5$ chmod +x install.sh

william@Penrith-2:~/Desktop/FX3_SDK_1.3.4_Linux/cyusb_linux_1.0.5$ sudo ./install.sh

[sudo] password for william:

Your current directory is /home/william/Desktop/FX3_SDK_1.3.4_Linux/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:626: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:647: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:624: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:14: error: invalid use of incomplete type ‘struct get_config_details()::libusb_ss_endpoint_companion_descriptor’

        (compd->bmAttributes + 1));

              ^

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

     struct libusb_ss_endpoint_companion_descriptor *compd = NULL;

            ^

main.cpp:650: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:624:12: note: forward declaration of ‘struct get_config_details()::libusb_ss_endpoint_companion_descriptor’

     struct libusb_ss_endpoint_companion_descriptor *compd = NULL;

            ^

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

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

*********************************************************************

It seems like my libusb is at the level discussed, but the install still fails for:

‘libusb_get_ss_endpoint_companion_descriptor’ was not declared

Thanks,

Bill

0 Likes

By doing a complete reinstall of Ubuntu 16.04 on my computer, I was able to get thru the make and ./install.sh without errors.

Now when I try to run cyusb_linux from a terminal, I get:

cyusb_linux: error while loading shared libraries: libcyusb.so: cannot open shared object file: No such file or directory

I have set a up a path in .bashrc that includes the path to the libcyusb.so but no luck.

Any suggestions would be appreciated. Thanks,  Bill

0 Likes

Do you member to run

source ./.bashrc ?

What's the result of echo $PATH?

0 Likes

Hi Yangyang,

dresch@dresch-Latitude-E7450:~$ source ./.bashrc

dresch@dresch-Latitude-E7450:~$ echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:Desktop/cyusb_linux_1.0.5/lib:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:Desktop/cyusb_linux_1.0.5/lib:/home/dresch/bin:/home/dresch/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

dresch@dresch-Latitude-E7450:~$ cyusb_linux

cyusb_linux: error while loading shared libraries: libcyusb.so: cannot open shared object file: No such file or directory

Am I missing something obvious? Could you post your echo $PATH?

Thanks,

Bill

0 Likes

Check the screenshot. Confirm that you follow the FX3_SDK_Linux_Support_0.pdf along with SDK to define necessary environment variables. The .doc file which I sent you before had the same content.

2019-02-27 09-25-44屏幕截图.png

0 Likes

Have you got any progress?

0 Likes

To confirm whether the Makefile is correct, I find another Linux machine to re-install FX3 SDK v1.3.4. The result shows the Makefile is correct. The SDK could be installed correctly.

Please check why the print result is incorrect according to your screenshot. I attach my resluts here for reference.

One more suggestion:write export PATH= ...... in /ect/profile instead of run in terminal.

Screenshot from 2019-02-18 09-57-02.png

Screenshot from 2019-02-18 10-01-50_看图王.png

0 Likes