nohands fails on Ubuntu 12.04

Just have an idea to compile a nohands but it infotunately fails while compiling...
g++ -DHAVE_CONFIG_H -I. -I.. -I../include -include config.h   -Wshadow -fno-exceptions -g -Wall -MT soundio-manager.o -MD -MP -MF .deps/soundio-manager.Tpo -c -o soundio-manager.o soundio-manager.cpp
In file included from bt.cpp:48:0:
../include/libhfp/bt.h: In member function ‘void libhfp::BtDevice::DisconnectAll()’:
../include/libhfp/bt.h:1081:50: warning: converting ‘false’ to pointer type for argument 1 of ‘void libhfp::BtDevice::__DisconnectAll(libhfp::ErrorInfo*)’ [-Wconversion-null]
bt.cpp: In static member function ‘static int libhfp::SdpAsyncTaskHandler::SdpLookupChannel(libhfp::SdpTaskParams&)’:
bt.cpp:81:20: error: taking address of temporary [-fpermissive]
bt.cpp: In member function ‘bool libhfp::BtHub::Start(libhfp::ErrorInfo*)’:
bt.cpp:1226:22: error: taking address of temporary [-fpermissive]
bt.cpp:1226:34: error: taking address of temporary [-fpermissive]
make[2]: *** [bt.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../include/libhfp/rfcomm.h:31:0,
                 from rfcomm.cpp:42:
../include/libhfp/bt.h: In member function ‘void libhfp::BtDevice::DisconnectAll()’:
../include/libhfp/bt.h:1081:50: warning: converting ‘false’ to pointer type for argument 1 of ‘void libhfp::BtDevice::__DisconnectAll(libhfp::ErrorInfo*)’ [-Wconversion-null]
In file included from ../include/libhfp/hfp.h:30:0,
                 from hfp.cpp:47:
../include/libhfp/bt.h: In member function ‘void libhfp::BtDevice::DisconnectAll()’:
../include/libhfp/bt.h:1081:50: warning: converting ‘false’ to pointer type for argument 1 of ‘void libhfp::BtDevice::__DisconnectAll(libhfp::ErrorInfo*)’ [-Wconversion-null]
hfp.cpp: In member function ‘bool libhfp::HfpSession::ScoGetParams(int, libhfp::ErrorInfo*)’:
hfp.cpp:826:6: warning: variable ‘outq’ set but not used [-Wunused-but-set-variable]
hfp.cpp: In member function ‘bool libhfp::HfpSession::ScoConnect(libhfp::ErrorInfo*)’:
hfp.cpp:908:25: error: taking address of temporary [-fpermissive]
mv -f .deps/soundio-manager.Tpo .deps/soundio-manager.Po
mv -f .deps/soundio-pump.Tpo .deps/soundio-pump.Po
make[2]: *** [hfp.o] Error 1
mv -f .deps/rfcomm.Tpo .deps/rfcomm.Po

Comments

Unknown said…
I had the same problem under debian wheezy.

I got it to compile by doing the following:

1: In libhfp/Makefile.am:
Add "-fpermissive" to the AM_CXXFLAGX line.
Next, rerun autogen.sh

2: In include/libhfp/events.h:
Replace all references to Invoke() with this->Invoke() and RegisterDirect() with this->RegisterDirect().
justtheanswer said…
still doesn't compile:


make[2]: Entering directory `/usr/local/src/nohands/trunk/test'
/bin/bash ../libtool --tag=CXX --mode=link g++ -Wshadow -g -Wall -o timertest timertest.o -L../libhfp -lhfp -lbluetooth -lasound -lspeexdsp
libtool: link: g++ -Wshadow -g -Wall -o timertest timertest.o -L../libhfp -lhfp -lbluetooth -lasound -lspeexdsp
../libhfp/libhfp.a(events-indep.o): In function `libhfp::IndepEventDispatcher::Unlock(bool)':
/usr/local/src/nohands/trunk/libhfp/events-indep.cpp:52: undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
make[2]: *** [timertest] Error 1
make[2]: Leaving directory `/usr/local/src/nohands/trunk/test'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/nohands/trunk'
make: *** [all] Error 2
Unknown said…
worked for me by removing "test" from line 347 of Makefile.
RKO said…
I compiled it sucessfully
But qt is not built
#root@home/nohands/trunk/qt# make
/usr/bin/uic-qt4 dialpad.ui -o ui_dialpad.h
uic: File generated with too old version of Qt Designer (3.3)
File 'dialpad.ui' is not valid
make: *** [ui_dialpad.h] Error 1

How to run the program I have usb Bluetooth dongle attached and it is on
Heinervdm said…
Hi,
I've also tried to get nohands working again.
The Qt GUI is now also working and I've patched the configure.in to detect Qt4 properly. Now it will probably fail to compile with Qt3, but that doesn't matter for me.

I pushed my work to https://github.com/heinervdm/nohands if you're interested in it.

Perhaps I will continue in porting the GUI to a real Qt4 GUI, but i'm not sure. For now I will just try to get HFP working.
mdarweash said…
to fix the Test issue ...

add "-pthread" to test/Makefile in the libhfp_LIBS

Thank you for your support Guys :)
Unknown said…
Hi! I have the same problem by the looks of it.

g++ -DHAVE_CONFIG_H -I. -I.. -I../include -include config.h -Wshadow -fno-exceptions -g -Wall -MT bt.o -MD -MP -MF .deps/bt.Tpo -c -o bt.o bt.cpp
In file included from bt.cpp:48:0:
../include/libhfp/bt.h: In member function ‘void libhfp::BtDevice::DisconnectAll()’:
../include/libhfp/bt.h:1081:50: warning: converting ‘false’ to pointer type for argument 1 of ‘void libhfp::BtDevice::__DisconnectAll(libhfp::ErrorInfo*)’ [-Wconversion-null]
bt.cpp: In static member function ‘static int libhfp::SdpAsyncTaskHandler::SdpLookupChannel(libhfp::SdpTaskParams&)’:
bt.cpp:81:20: error: taking address of temporary [-fpermissive]
bt.cpp: In member function ‘bool libhfp::BtHub::Start(libhfp::ErrorInfo*)’:
bt.cpp:1226:22: error: taking address of temporary [-fpermissive]
bt.cpp:1226:34: error: taking address of temporary [-fpermissive]

Any ideas on how to fix?

Popular Posts