cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

I'm attempting to build the EZ-USB-FX3 SDK for Linux. When I run install.sh (located in (~/Cypress/cyusb_linux_1.0.4) I get the following errors:

sudo ./install.sh
Your current directory is ~/Cypress/cyusb_linux_1.0.4. This is where the cyusb_suite software will be installed...
g++ -fPIC -o lib/libcyusb.o -c lib/libcyusb.c
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 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 update_devlist()’:
main.cpp:132:62: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error in 'get_active_config_descriptor' ");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb_setAltIf_clicked()’:
main.cpp:315:59: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r2, "Error in setting Alternate Interface");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp:319:49: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r1, "Error in claiming interface");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb_setIFace_clicked()’:
main.cpp:337:69: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  if ( r ) libusb_error(r, "Error in 'get_active_config_descriptor' ");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In function ‘void get_config_details()’:
main.cpp:427:59: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error getting configuration descriptor");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In function ‘void get_device_details()’:
main.cpp:546:52: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error getting device descriptor");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In function ‘void set_if_aif()’:
main.cpp:632:59: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r2, "Error in setting Alternate Interface");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp:637:48: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r1, "Error in setting Interface");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb_kerneldetach_clicked()’:
main.cpp:674:59: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error in detaching kernel mode driver!");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In function ‘void clearhalt_in()’:
main.cpp:1275:81: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error while automatically clearing halt condition on IN pipe");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In function ‘void clearhalt_out()’:
main.cpp:1289:82: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error while automatically clearing halt condition on OUT pipe");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb6_rcv_clicked()’:
main.cpp:1309:37: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Data Read Error");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::pb6_send_file_selected(unsigned char*, int)’:
main.cpp:1344:41: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error in bulk write!");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::pb6_send_nofile_selected()’:
main.cpp:1405:73: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error in bulk write!\nPerhaps size > device buffer ?");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb6_clearhalt_out_clicked()’:
main.cpp:1432:68: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error while clearing halt condition on OUT pipe");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb6_clearhalt_in_clicked()’:
main.cpp:1450:67: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error while clearing halt condition on IN pipe");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb7_clearhalt_out_clicked()’:
main.cpp:1468:68: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error while clearing halt condition on OUT pipe");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In member function ‘void ControlCenter::on_pb7_clearhalt_in_clicked()’:
main.cpp:1486:67: error: invalid conversion from ‘int’ to ‘int* (*)()’ [-fpermissive]
  libusb_error(r, "Error while clearing halt condition on IN pipe");
  ^
main.cpp:73:13: note: initializing argument 1 of ‘void libusb_error(int* (*)(), const char*)’
static void libusb_error(int errno, const char *detailedText)
  ^~~~~~~~~~~~
main.cpp: In function ‘void in_callback(libusb_transfer*)’:
main.cpp:1667:67: error: cannot convert ‘libusb_transfer_status’ to ‘int* (*)()’ for argument ‘1’ to ‘void libusb_error(int* (*)(), const char*)’
  libusb_error(transfer->status, "Transfer not completed normally");
  ^
main.cpp: In function ‘void out_callback(libusb_transfer*)’:
main.cpp:1720:67: error: cannot convert ‘libusb_transfer_status’ to ‘int* (*)()’ for argument ‘1’ to ‘void libusb_error(int* (*)(), const char*)’
  libusb_error(transfer->status, "Transfer not completed normally");
  ^
Makefile:230: recipe for target 'main.o' failed
make: *** [main.o] Error 1

1 Solution
Anonymous
Not applicable

Hi there,

the problem is the use of the errno variable name in "gui_src/main.cpp", which already in use by Unix-like systems. Just rename "errno" to "_errno".

I would have attached a corrected main.cpp, if there was such an option.

Axel.

View solution in original post

9 Replies
YangyangC_06
Employee

Hi Ben Popoola,

What's your Linux version, GCC version and libusb version?

0 Likes
Anonymous
Not applicable

Hi yyca

Ubuntu Version

Distributor ID:    Ubuntu

Description:    Ubuntu 17.10

Release:    17.10

Codename:    artful

GCC Version

gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0

Copyright (C) 2017 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

||/ Name             Version       Architecture  Description

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

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

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

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

0 Likes
YangyangC_06
Employee

Hi Ben,

Sorry for missing you reply. Do you resolve this problem?

0 Likes
Anonymous
Not applicable

Hello yyca​,
I have same problem like ben.popoola_3052606​,
Do you have solution for it ?


My setup:

SB Version:    :core-4.1-amd64:core-4.1-noarch

Distributor ID:    Fedora

Description:    Fedora release 27 (Twenty Seven)

Release:    27

Codename:    TwentySeven

libusb-0.1.5-10.fc27.x86_64

libusb-0.1.5-10.fc27.i686

0 Likes
YangyangC_06
Employee

Hi Sergiu,

Can you try with libusb-1.0.4? I have not faced any problem on my side.

My host is Ubuntu 16.04 , ibusb is 1.0.4 and gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

I am not clear about the question you have mentioned.

0 Likes
Anonymous
Not applicable

Hi yyca,

I wasn't problem from libusb, Axel's solution helps me to fix the problem!
Thanks for your feedback !

0 Likes
YangyangC_06
Employee

Hi Sergiu,

I have noticed that information. Thanks

0 Likes
Anonymous
Not applicable

Hi there,

the problem is the use of the errno variable name in "gui_src/main.cpp", which already in use by Unix-like systems. Just rename "errno" to "_errno".

I would have attached a corrected main.cpp, if there was such an option.

Axel.

View solution in original post

Anonymous
Not applicable

Hi Axel,


Your solution was right for me !

Thanks !

0 Likes