Having trouble configuring on Ubuntu 9.10

Supporting 2.6 and up
illia.smith

Having trouble configuring on Ubuntu 9.10

Postby illia.smith » Mon Apr 18, 2011 4:30 pm

I downloaded all of the .tar files Phidgets21 source and Phidgets Webservice. I did the ./configure --enable-zeroconf-lookup; make; sudo make install; for Phidgets21- that went smoothly. When I do ./configure --enable-zeroconf=avahi I get and Error message:

************
checking for library containing CPhidget_getLibraryVersion... no
configure: error: Missing libphidget21; make sure the Phidget21 library is installed
*********

I have already done >export LD_LIBRARY_PATH=/usr/lib
also I added >export PATH=$PATH:/usr/lib:
the libphidget21 file IS found in /usr/lib....
why is this not working?

User avatar
Patrick
Lead Developer
Posts: 3165
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Having trouble configuring on Ubuntu 9.10

Postby Patrick » Tue Apr 19, 2011 11:43 am

try a reboot.

Are you able to compile the examples in the phidget21/examples folder?

-Patrick

illia.smith

Re: Having trouble configuring on Ubuntu 9.10

Postby illia.smith » Tue Apr 19, 2011 2:12 pm

I rebooted my laptop and tried again with the same error. Im now on a a school pc with ubuntu 10.04 but I have the same problem.

I tried gcc manager.c.
I got this:


*********************
students@itmw5-desktop:~/libphidget-2.1.8.20110322/examples$ gcc manager.c
/tmp/ccVGa5ZJ.o: In function `gotAttach':
manager.c:(.text+0x33): undefined reference to `CPhidget_getSerialNumber'
manager.c:(.text+0x45): undefined reference to `CPhidget_getDeviceVersion'
manager.c:(.text+0x57): undefined reference to `CPhidget_getDeviceType'
/tmp/ccVGa5ZJ.o: In function `gotDetach':
manager.c:(.text+0x9d): undefined reference to `CPhidget_getSerialNumber'
manager.c:(.text+0xaf): undefined reference to `CPhidget_getDeviceVersion'
manager.c:(.text+0xc1): undefined reference to `CPhidget_getDeviceType'
/tmp/ccVGa5ZJ.o: In function `main':
manager.c:(.text+0x103): undefined reference to `CPhidgetManager_create'
manager.c:(.text+0x11f): undefined reference to `CPhidgetManager_set_OnAttach_Handler'
manager.c:(.text+0x13b): undefined reference to `CPhidgetManager_set_OnDetach_Handler'
manager.c:(.text+0x147): undefined reference to `CPhidgetManager_open'
manager.c:(.text+0x19e): undefined reference to `CPhidgetManager_close'
manager.c:(.text+0x1aa): undefined reference to `CPhidgetManager_delete'
collect2: ld returned 1 exit status


*************************
env currently returns this:

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

ORBIT_SOCKETDIR=/tmp/orbit-students
SSH_AGENT_PID=1446
TERM=xterm
SHELL=/bin/bash
XDG_SESSION_COOKIE=4cd11b73bec02d5081e6237d499028ab-1303242045.126245-802965484
WINDOWID=69206020
OLDPWD=/home/students/libphidget-2.1.8.20110322
GNOME_KEYRING_CONTROL=/tmp/keyring-vApk8g
GTK_MODULES=canberra-gtk-module
USER=students
LS_COLORS=rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
SSH_AUTH_SOCK=/tmp/keyring-vApk8g/ssh
DEFAULTS_PATH=/usr/share/gconf/gnome.default.path
SESSION_MANAGER=local/itmw5-desktop:@/tmp/.ICE-unix/1412,unix/itmw5-desktop:/tmp/.ICE-unix/1412
USERNAME=students
XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg
DESKTOP_SESSION=gnome
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib::/usr/lib:
PWD=/home/students/libphidget-2.1.8.20110322/examples
GDM_KEYBOARD_LAYOUT=us
LANG=en_US.utf8
GNOME_KEYRING_PID=1394
MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path
GDM_LANG=en_US.utf8
GDMSESSION=gnome
HISTCONTROL=ignoreboth
SPEECHD_PORT=7561
SHLVL=1
HOME=/home/students
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LOGNAME=students
XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-DD5yO041Mh,guid=8517b48506c58295a72fb72a4dade53d
LESSOPEN=| /usr/bin/lesspipe %s
DISPLAY=:0.0
LESSCLOSE=/usr/bin/lesspipe %s %s
XAUTHORITY=/var/run/gdm/auth-for-students-NCUNNf/database
COLORTERM=gnome-terminal
_=/usr/bin/env



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


Am I doing something wrong still?

User avatar
Patrick
Lead Developer
Posts: 3165
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Having trouble configuring on Ubuntu 9.10

Postby Patrick » Tue Apr 19, 2011 2:17 pm

Instead of gcc manager.c, try 'make'

Remember that you need to reference the phidgets library when you compile, or you'll get those linker errors.

gcc -lphidget21 manager.c

-Patrick

illia.smith

Re: Having trouble configuring on Ubuntu 9.10

Postby illia.smith » Tue Apr 19, 2011 2:39 pm

Ok, perhaps I should have warned you that I have a very limited background in Linux. Should I have passed this "-lphidget21" option to ./configure when configuring phidgetwebservice?

Because I tried

$ gcc -lphidget21 manager.c
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libphidget21.so: undefined reference to `DNSServiceProcessResultPtr'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libphidget21.so: undefined reference to `DNSServiceRefSockFDPtr'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libphidget21.so: undefined reference to `DNSServiceQueryRecordPtr'
/usr/lib/gcc/i486-linux-gnu/4.4.3/../../../../lib/libphidget21.so: undefined reference to `DNSServiceRefDeallocatePtr'
collect2: ld returned 1 exit status
:~/libphidget-2.1.8.20110322/examples$

illia.smith

Re: Having trouble configuring on Ubuntu 9.10

Postby illia.smith » Tue Apr 19, 2011 3:18 pm

and I just tried


sudo ./configure LIBS=-lphidget21 --enable-zeroconf=avahi
and I was told that the compiler couldn't create executeables.
I consulted google.
had to install the build-essential package
done
I am still told that the compiler cannot create executeables
hopefully this is of some use.

User avatar
Patrick
Lead Developer
Posts: 3165
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Having trouble configuring on Ubuntu 9.10

Postby Patrick » Tue Apr 19, 2011 3:22 pm

Looking back, I'm wondering why you chose to configure with '--enable-zeroconf-lookup' - this is a special option that probably shouldn't be used on normal Linux machines, as it tries to compile agains't mDNSResponderPosix, rather then Avahi, which is what is actually installed.

I would do a 'make distclean; ./configure; make; sudo make install' and see if things are working.

-Patrick

illia.smith

Re: Having trouble configuring on Ubuntu 9.10

Postby illia.smith » Tue Apr 19, 2011 5:33 pm

Yeah, that worked, now, I'm just sorting through the stuff that my teacher gave me in Java.
So, thank you, It finally compiled.


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 2 guests