bakercp / ofxHTTP

A suite of HTTP tools, including clients and servers for openFrameworks.
MIT License
110 stars 37 forks source link

Error compiling WebSocketConnection with oF v0.8.4 ARM7 Poco #29

Closed brannondorsey closed 8 years ago

brannondorsey commented 9 years ago

I am trying to compile an ofxHTTP dependent project on a Debian Wheezy RPi 2 and am getting the following error. I have cloned the ofxHTTP Master branch and installed the Debian openFrameworks dependencies for version v0.8.4.

../../../addons/obj/linuxarmv7l/Release/ofxHTTP/libs/ofxHTTP/src/WebSocketConnection.o: In function `ofx::HTTP::WebSocketConnection::handleRequest(Poco::Net::HTTPServerRequest&, Poco::Net::HTTPServerResponse&)':
WebSocketConnection.cpp:(.text+0x17a8): undefined reference to `Poco::Net::WebSocket::WebSocket(Poco::Net::HTTPServerRequest&, Poco::Net::HTTPServerResponse&)'
WebSocketConnection.cpp:(.text+0x1a5c): undefined reference to `Poco::Net::WebSocket::sendFrame(void const*, int, int)'
WebSocketConnection.cpp:(.text+0x1ef4): undefined reference to `Poco::Net::WebSocket::~WebSocket()'
WebSocketConnection.cpp:(.text+0x1f60): undefined reference to `Poco::Net::WebSocket::receiveFrame(void*, int, int&)'
WebSocketConnection.cpp:(.text+0x2400): undefined reference to `Poco::Net::WebSocket::~WebSocket()'
WebSocketConnection.cpp:(.text+0x24ac): undefined reference to `Poco::Net::WebSocket::WEBSOCKET_VERSION'
../../../addons/obj/linuxarmv7l/Release/ofxHTTP/libs/ofxHTTP/src/WebSocketConnection.o:(.ARM.extab+0x5e4): undefined reference to `typeinfo for Poco::Net::WebSocketException'
../../../addons/obj/linuxarmv7l/Release/ofxHTTP/libs/ofxHTTP/src/PostRouteHandler.o: In function `ofx::HTTP::PostRouteHandler::handleRequest(Poco::Net::HTTPServerRequest&, Poco::Net::HTTPServerResponse&)':
PostRouteHandler.cpp:(.text+0x1c4): undefined reference to `Poco::Net::HTMLForm::setFieldLimit(int)'
../../../addons/obj/linuxarmv7l/Release/ofxHTTP/libs/ofxHTTP/src/CredentialStore.o: In function `ofx::HTTP::DefaultCredentialStore::requestFilter(ofx::HTTP::BaseRequest&, ofx::HTTP::Context&)':
CredentialStore.cpp:(.text+0xf10): undefined reference to `Poco::Net::HTTPDigestCredentials::updateAuthInfo(Poco::Net::HTTPRequest&)'
../../../addons/obj/linuxarmv7l/Release/ofxHTTP/libs/ofxHTTP/src/CredentialStore.o: In function `ofx::HTTP::DefaultCredentialStore::responseFilter(ofx::HTTP::BaseRequest&, ofx::HTTP::BaseResponse&, ofx::HTTP::Context&)':
CredentialStore.cpp:(.text+0x1b94): undefined reference to `Poco::Net::HTTPCredentials::isBasicCredentials(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CredentialStore.cpp:(.text+0x1ba8): undefined reference to `Poco::Net::HTTPCredentials::isDigestCredentials(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CredentialStore.cpp:(.text+0x1bc0): undefined reference to `Poco::Net::HTTPAuthenticationParams::HTTPAuthenticationParams()'
CredentialStore.cpp:(.text+0x1bd0): undefined reference to `Poco::Net::HTTPAuthenticationParams::fromResponse(Poco::Net::HTTPResponse const&)'
CredentialStore.cpp:(.text+0x1be8): undefined reference to `Poco::Net::HTTPAuthenticationParams::getRealm() const'
CredentialStore.cpp:(.text+0x1ee0): undefined reference to `Poco::Net::HTTPDigestCredentials::HTTPDigestCredentials(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CredentialStore.cpp:(.text+0x2280): undefined reference to `Poco::Net::HTTPDigestCredentials::authenticate(Poco::Net::HTTPRequest&, Poco::Net::HTTPResponse const&)'
CredentialStore.cpp:(.text+0x242c): undefined reference to `Poco::Net::HTTPAuthenticationParams::~HTTPAuthenticationParams()'
CredentialStore.cpp:(.text+0x3140): undefined reference to `Poco::Net::HTTPAuthenticationParams::~HTTPAuthenticationParams()'
CredentialStore.cpp:(.text+0x3af0): undefined reference to `Poco::Net::HTTPDigestCredentials::~HTTPDigestCredentials()'
../../../addons/obj/linuxarmv7l/Release/ofxHTTP/libs/ofxHTTP/src/CredentialStore.o: In function `std::tr1::_Sp_counted_base_impl<Poco::Net::HTTPDigestCredentials*, std::tr1::_Sp_deleter<Poco::Net::HTTPDigestCredentials>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
CredentialStore.cpp:(.text._ZNSt3tr121_Sp_counted_base_implIPN4Poco3Net21HTTPDigestCredentialsENS_11_Sp_deleterIS3_EELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[std::tr1::_Sp_counted_base_impl<Poco::Net::HTTPDigestCredentials*, std::tr1::_Sp_deleter<Poco::Net::HTTPDigestCredentials>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()]+0x14): undefined reference to `Poco::Net::HTTPDigestCredentials::~HTTPDigestCredentials()'
collect2: ld returned 1 exit status
../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:296: recipe for target 'bin/tvtalker-app' failed
make[1]: *** [bin/tvtalker-app] Error 1
make[1]: Leaving directory '/home/pi/of_v0.8.4_linuxarmv7l_release/apps/tvtalker/tvtalker-app'
../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:126: recipe for target 'Release' failed
make: *** [Release] Error 2

I also attempted to make the ofxHTTP example_basic_client example and am receiving the following errors:

../../../addons/obj/linuxarmv7l/Release/ofxHTTP/libs/ofxHTTP/src/CredentialStore.o: In function `ofx::HTTP::DefaultCredentialStore::requestFilter(ofx::HTTP::BaseRequest&, ofx::HTTP::Context&)':
CredentialStore.cpp:(.text+0xf10): undefined reference to `Poco::Net::HTTPDigestCredentials::updateAuthInfo(Poco::Net::HTTPRequest&)'
../../../addons/obj/linuxarmv7l/Release/ofxHTTP/libs/ofxHTTP/src/CredentialStore.o: In function `ofx::HTTP::DefaultCredentialStore::responseFilter(ofx::HTTP::BaseRequest&, ofx::HTTP::BaseResponse&, ofx::HTTP::Context&)':
CredentialStore.cpp:(.text+0x1b94): undefined reference to `Poco::Net::HTTPCredentials::isBasicCredentials(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CredentialStore.cpp:(.text+0x1ba8): undefined reference to `Poco::Net::HTTPCredentials::isDigestCredentials(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CredentialStore.cpp:(.text+0x1bc0): undefined reference to `Poco::Net::HTTPAuthenticationParams::HTTPAuthenticationParams()'
CredentialStore.cpp:(.text+0x1bd0): undefined reference to `Poco::Net::HTTPAuthenticationParams::fromResponse(Poco::Net::HTTPResponse const&)'
CredentialStore.cpp:(.text+0x1be8): undefined reference to `Poco::Net::HTTPAuthenticationParams::getRealm() const'
CredentialStore.cpp:(.text+0x1ee0): undefined reference to `Poco::Net::HTTPDigestCredentials::HTTPDigestCredentials(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CredentialStore.cpp:(.text+0x2280): undefined reference to `Poco::Net::HTTPDigestCredentials::authenticate(Poco::Net::HTTPRequest&, Poco::Net::HTTPResponse const&)'
CredentialStore.cpp:(.text+0x242c): undefined reference to `Poco::Net::HTTPAuthenticationParams::~HTTPAuthenticationParams()'
CredentialStore.cpp:(.text+0x3140): undefined reference to `Poco::Net::HTTPAuthenticationParams::~HTTPAuthenticationParams()'
CredentialStore.cpp:(.text+0x3af0): undefined reference to `Poco::Net::HTTPDigestCredentials::~HTTPDigestCredentials()'
../../../addons/obj/linuxarmv7l/Release/ofxHTTP/libs/ofxHTTP/src/CredentialStore.o: In function `std::tr1::_Sp_counted_base_impl<Poco::Net::HTTPDigestCredentials*, std::tr1::_Sp_deleter<Poco::Net::HTTPDigestCredentials>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
CredentialStore.cpp:(.text._ZNSt3tr121_Sp_counted_base_implIPN4Poco3Net21HTTPDigestCredentialsENS_11_Sp_deleterIS3_EELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[std::tr1::_Sp_counted_base_impl<Poco::Net::HTTPDigestCredentials*, std::tr1::_Sp_deleter<Poco::Net::HTTPDigestCredentials>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()]+0x14): undefined reference to `Poco::Net::HTTPDigestCredentials::~HTTPDigestCredentials()'
collect2: ld returned 1 exit status
../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:296: recipe for target 'bin/example_basic_client' failed
make[1]: *** [bin/example_basic_client] Error 1
make[1]: Leaving directory '/home/pi/of_v0.8.4_linuxarmv7l_release/addons/ofxHTTP/example_basic_client'
../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:126: recipe for target 'Release' failed
make: *** [Release] Error 2
bakercp commented 9 years ago

I left my Pi2 in my office. I'll be able to check it as soon as I get it. Initially, it looks like the arm7 release is missing some libraries ... or something isn't getting linked correctly ...

brannondorsey commented 9 years ago

Any progress on this?

bakercp commented 9 years ago

Haven't had time to test yet ...

brannondorsey commented 9 years ago

No worries, just curious. I haven't needed to depend on ofxHTTP yet with RPi 2 but I will in the coming weeks. When I get a chance I can take a look into the problem further but I fear that my limited knowledge of POCO libs (or even how libs work with OF) might serve as a hangup.

On Sun, Mar 22, 2015 at 2:22 PM, Christopher Baker <notifications@github.com

wrote:

Haven't had time to test yet ...

— Reply to this email directly or view it on GitHub https://github.com/bakercp/ofxHTTP/issues/29#issuecomment-84682480.

http://brannondorsey.com

bakercp commented 9 years ago

See this http://forum.openframeworks.cc/t/raspberry-pi2-problems-with-http-requests/

nventuro commented 9 years ago

Has anyone found a solution for this issue? I'm encountering the same linking error.

bakercp commented 9 years ago

Hm ... I haven't tested ofxHTTP with 0.8.4 in quite a while. I'd recommend getting the latest 0.9.0RC and using the ofxHTTP develop branch (which means you'll also need the develop branch from the dependencies in most cases).

nventuro commented 9 years ago

I'd rather stay in 0.8.4, since I don't have time to properly migrate to 0.9 =/ At least not right now.

I'm working on an armv7 platform, and all I need is to do a simple POST and get a status response code. ofxHTTP fails at the linking stage (same error as the one above), and ofxHttpUtils runs fine, but doesn't work (it returns nonsensical status code, such as -1461712828). Do you know of any simple addon or library that I can use to make this work, or have any tips on how to fix this issue?

bakercp commented 9 years ago

It sounds like the arm7 poco libraries in 0.8.4 were not compiled correctly for Raspberry pi 2 ... the built in ofxHttpUtils uses Poco too so it may not be giving you correct results.

the next best option might be to try to recompile the poco libraries 1.4.3p on the raspberry pi 2 ... but that may take longer than just using the fixed updated libraries in 0.9.0. 0.9.0 should be (famous last words) backward compatible and may just work ...

if that's still not an option, you might be able to use a system call to use curl on the command line or use libcurl, but that's kind of a tricky library. Sorry ... no magic bullets here ... all of my (limited) ofxHTTP development time has been preparing for 0.9.0 :/

nventuro commented 9 years ago

I'm going to try calling curl directly with a syscall for now, thanks!

bakercp commented 8 years ago

Has this been resolved? I believe that the RPI2 now uses the arm6 libs, so this should be resolved.