Page 1 of 1

debian sources.list for AMD64 needed even with 32-bit install

Posted: Mon Feb 26, 2018 6:39 pm
by monteshaffer
Hi,

My platform is 'amd64' not 'i386' - followed your instructions to install.

Code: Select all

N: Skipping acquire of configured file 'main/binary-amd64/Packages' as repository 'http://www.phidgets.com/debian stretch InRelease' doesn't support architecture 'amd64'
So I did the manual install via "regular linux instructions" (is -dev not included with manual setup?) [https://www.phidgets.com/docs/OS_-_Linu ... _Downloads]

Code: Select all

# as root
mkdir phidgets
cd phidgets

wget https://www.phidgets.com/downloads/phidget22/libraries/linux/libphidget22.tar.gz


tar xvf libphidget22.tar.gz


cd libphidget22-1.0.0.20180216
vim README
./configure --prefix=/usr && make && sudo make install

wget https://www.phidgets.com/downloads/phidget22/examples/c/Manager/Phidget22_HelloWorld_C_Ex.zip

unzip Phidget22_HelloWorld_C_Ex.zip

cd HelloWorld_Example/

 
gcc HelloWorld.c -o HelloWorld -lphidget22

./HelloWorld



With nothing plugged in:

Code: Select all

# ./HelloWorld 
Opening...
Phidget Simple Playground (plug and unplug managers)
Press Enter to end anytime...
With just a VINT hub plugged in:

Code: Select all

# ./HelloWorld 
Opening...
Phidget Simple Playground (plug and unplug managers)
Press Enter to end anytime...
Hello Device 6-Port USB VINT Hub Phidget, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Input Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Digital Output Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Input Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910
Hello Device Hub Port - Voltage Ratio Mode, Serial Number: 496910

Closing...
It would be nice if you got the sources.list to work regardless of 32/64 bit.

Re: debian sources.list for AMD64 needed even with 32-bit install

Posted: Mon Mar 05, 2018 4:32 pm
by Patrick
Yes, 64-bit packages are definitely planned.

-Patrick

Re: debian sources.list for AMD64 needed even with 32-bit install

Posted: Thu Jun 20, 2019 2:32 pm
by alessandro_T
Hello Patrick, I'm trying to install a phidget temperature sensors in my linux amd64 debian 4.19 system. I followed the steps that I found here and the Helloworld example work fine. When I'm trying to compile the Temperature example.c I receive this errors:

Code: Select all

root@debian:/home/linuxcnc/phidgets/libphidget22-1.4.20190605/HelloWorld_Example/TemperatureSensor_Example# gcc TemperatureSensor_Example.c -o HelloWorldsssss -lphidget22
TemperatureSensor_Example.c: In function ‘onAttachHandler’:
TemperatureSensor_Example.c:32:2: warning: implicit declaration of function ‘CheckError’ [-Wimplicit-function-declaration]
  CheckError(prc, "Getting DeviceSerialNumber", (PhidgetHandle *)&ph);
  ^~~~~~~~~~
TemperatureSensor_Example.c: In function ‘main’:
TemperatureSensor_Example.c:170:2: error: unknown type name ‘ChannelInfo’
  ChannelInfo channelInfo; //Information from AskForDeviceParameters(). May be removed when hard-coding parameters.
  ^~~~~~~~~~~
TemperatureSensor_Example.c:185:2: warning: implicit declaration of function ‘AskForDeviceParameters’ [-Wimplicit-function-declaration]
  AskForDeviceParameters(&channelInfo, (PhidgetHandle *)&ch);
  ^~~~~~~~~~~~~~~~~~~~~~
TemperatureSensor_Example.c:187:68: error: request for member ‘deviceSerialNumber’ in something not a structure or union
  prc = Phidget_setDeviceSerialNumber((PhidgetHandle)ch, channelInfo.deviceSerialNumber);
                                                                    ^
TemperatureSensor_Example.c:190:57: error: request for member ‘hubPort’ in something not a structure or union
  prc = Phidget_setHubPort((PhidgetHandle)ch, channelInfo.hubPort);
                                                         ^
TemperatureSensor_Example.c:193:57: error: request for member ‘channel’ in something not a structure or union
  prc = Phidget_setChannel((PhidgetHandle)ch, channelInfo.channel);
                                                         ^
TemperatureSensor_Example.c:196:17: error: request for member ‘netInfo’ in something not a structure or union
  if (channelInfo.netInfo.isRemote) {
                 ^
TemperatureSensor_Example.c:197:59: error: request for member ‘netInfo’ in something not a structure or union
   prc = Phidget_setIsRemote((PhidgetHandle)ch, channelInfo.netInfo.isRemote);
                                                           ^
TemperatureSensor_Example.c:199:18: error: request for member ‘netInfo’ in something not a structure or union
   if (channelInfo.netInfo.serverDiscovery) {
                  ^
TemperatureSensor_Example.c:201:4: warning: implicit declaration of function ‘CheckEnableServerDiscoveryError’ [-Wimplicit-function-declaration]
    CheckEnableServerDiscoveryError(prc, (PhidgetHandle *)&ch);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TemperatureSensor_Example.c:203:52: error: request for member ‘netInfo’ in something not a structure or union
    prc = PhidgetNet_addServer("Server", channelInfo.netInfo.hostname,
                                                    ^
TemperatureSensor_Example.c:204:16: error: request for member ‘netInfo’ in something not a structure or union
     channelInfo.netInfo.port, channelInfo.netInfo.password, 0);
                ^
TemperatureSensor_Example.c:204:42: error: request for member ‘netInfo’ in something not a structure or union
     channelInfo.netInfo.port, channelInfo.netInfo.password, 0);
                                          ^
TemperatureSensor_Example.c:238:2: warning: implicit declaration of function ‘CheckOpenError’ [-Wimplicit-function-declaration]
  CheckOpenError(prc, (PhidgetHandle *)&ch);
  ^~~~~~~~~~~~~~
TemperatureSensor_Example.c:247:2: warning: implicit declaration of function ‘Sleep’ [-Wimplicit-function-declaration]
  Sleep(10000);
  ^~~~~
root@debian:/home/linuxcnc/phidgets/libphidget22-1.4.20190605/HelloWorld_Example/TemperatureSensor_Example# gcc TemperatureSensor_Example.c -o HelloWorldsssss -lphidget22
TemperatureSensor_Example.c: In function ‘onAttachHandler’:
TemperatureSensor_Example.c:32:2: warning: implicit declaration of function ‘CheckError’ [-Wimplicit-function-declaration]
  CheckError(prc, "Getting DeviceSerialNumber", (PhidgetHandle *)&ph);
  ^~~~~~~~~~
TemperatureSensor_Example.c: In function ‘main’:
TemperatureSensor_Example.c:170:2: error: unknown type name ‘ChannelInfo’
  ChannelInfo channelInfo; //Information from AskForDeviceParameters(). May be removed when hard-coding parameters.
  ^~~~~~~~~~~
TemperatureSensor_Example.c:185:2: warning: implicit declaration of function ‘AskForDeviceParameters’ [-Wimplicit-function-declaration]
  AskForDeviceParameters(&channelInfo, (PhidgetHandle *)&ch);
  ^~~~~~~~~~~~~~~~~~~~~~
TemperatureSensor_Example.c:187:68: error: request for member ‘deviceSerialNumber’ in something not a structure or union
  prc = Phidget_setDeviceSerialNumber((PhidgetHandle)ch, channelInfo.deviceSerialNumber);
                                                                    ^
TemperatureSensor_Example.c:190:57: error: request for member ‘hubPort’ in something not a structure or union
  prc = Phidget_setHubPort((PhidgetHandle)ch, channelInfo.hubPort);
                                                         ^
TemperatureSensor_Example.c:193:57: error: request for member ‘channel’ in something not a structure or union
  prc = Phidget_setChannel((PhidgetHandle)ch, channelInfo.channel);
                                                         ^
TemperatureSensor_Example.c:196:17: error: request for member ‘netInfo’ in something not a structure or union
  if (channelInfo.netInfo.isRemote) {
                 ^
TemperatureSensor_Example.c:197:59: error: request for member ‘netInfo’ in something not a structure or union
   prc = Phidget_setIsRemote((PhidgetHandle)ch, channelInfo.netInfo.isRemote);
                                                           ^
TemperatureSensor_Example.c:199:18: error: request for member ‘netInfo’ in something not a structure or union
   if (channelInfo.netInfo.serverDiscovery) {
                  ^
TemperatureSensor_Example.c:201:4: warning: implicit declaration of function ‘CheckEnableServerDiscoveryError’ [-Wimplicit-function-declaration]
    CheckEnableServerDiscoveryError(prc, (PhidgetHandle *)&ch);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TemperatureSensor_Example.c:203:52: error: request for member ‘netInfo’ in something not a structure or union
    prc = PhidgetNet_addServer("Server", channelInfo.netInfo.hostname,
                                                    ^
TemperatureSensor_Example.c:204:16: error: request for member ‘netInfo’ in something not a structure or union
     channelInfo.netInfo.port, channelInfo.netInfo.password, 0);
                ^
TemperatureSensor_Example.c:204:42: error: request for member ‘netInfo’ in something not a structure or union
     channelInfo.netInfo.port, channelInfo.netInfo.password, 0);
                                          ^
TemperatureSensor_Example.c:238:2: warning: implicit declaration of function ‘CheckOpenError’ [-Wimplicit-function-declaration]
  CheckOpenError(prc, (PhidgetHandle *)&ch);
  ^~~~~~~~~~~~~~
TemperatureSensor_Example.c:247:2: warning: implicit declaration of function ‘Sleep’ [-Wimplicit-function-declaration]
  Sleep(10000);
  ^~~~~
Can you help me please?

Re: debian sources.list for AMD64 needed even with 32-bit install

Posted: Fri Jun 21, 2019 5:22 pm
by Patrick
Try using the Makefile to compile (type 'make'). CheckError is defined in ../Common/PhidgetHelperFunction.c

-Patrick