1 2 Previous Next 17 Replies Latest reply on Feb 28, 2019 6:06 PM by YangyangC_06

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

    widrc_1621251

      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.

        • 1. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
          SrinathS_16

          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

          • 2. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
            widrc_1621251

            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

            • 3. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
              YangyangC_06

              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.

              • 4. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                YangyangC_06

                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.

                • 5. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                  widrc_1621251

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

                  • 6. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                    widrc_1621251

                    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

                    • 7. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                      YangyangC_06

                      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.

                      • 8. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                        YangyangC_06

                        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

                        • 9. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                          widrc_1621251

                          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

                          • 10. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                            widrc_1621251

                            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.

                            • 11. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                              YangyangC_06

                              Please try and let me know the result.

                              • 12. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                                widrc_1621251

                                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

                                • 13. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                                  widrc_1621251

                                  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

                                  • 14. Re: FX3 Support Software for Linux (Ubuntu), problems compiling code
                                    YangyangC_06

                                    Do you member to run

                                    source ./.bashrc ?

                                    What's the result of echo $PATH?

                                    1 2 Previous Next