ARMmbed / mbed-client-linux-example

DEPRECATED: mbed Client example program for Linux platform
https://cloud.mbed.com/docs/current
Other
2 stars 0 forks source link

Example not compatible with OS X? #43

Closed Charlyo closed 8 years ago

Charlyo commented 8 years ago

After installing all the necessary packages on MAC OS X 10.11.5 using the latest xcode, im not able to build the linux client.

~/mbed-client-linux-example-master yotta -v build
info: generate for target: x86-osx-native 0.0.8 at /Users/Charlyo/mbed-client-linux-example-master/yotta_targets/x86-osx-native -- The C compiler identification is AppleClang 7.3.0.7030031 -- The CXX compiler identification is AppleClang 7.3.0.7030031 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /Users/Charlyo/mbed-client-linux-example-master/build/x86-osx-native [33/39] Building CXX object ym/mbed-client/source/CMakeFiles/mbed-client.dir/Users/Charlyo/mbed-client-linux-example-master/yotta_modules/mbed-client/source/m2mstring.cpp.o /Users/Charlyo/mbed-client-linux-example-master/yotta_modules/mbed-client/source/m2mstring.cpp:50:10: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true [-Wtautological-undefined-compare] if( &s != NULL ) { ^ ~~~~ 1 warning generated. [39/39] Linking CXX executable source/mbed-client-linux-example FAILED: source/mbed-client-linux-example : && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -O2 -g -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names source/CMakeFiles/mbed-client-linux-example.dir/Users/Charlyo/mbed-client-linux-example-master/source/main.cpp.o -o source/mbed-client-linux-example ym/mbed-client/source/libmbed-client.a ym/mbed-client-c/source/libmbed-client-c.a ym/nanostack-libservice/source/libnanostack-libservice.a ym/mbed-trace/source/libmbed-trace.a && : Undefined symbols for architecture x86_64: "M2MConnectionHandler::claim_mutex()", referenced from: _mutex_claim in libmbed-client.a(nsdlaccesshelper.cpp.o) "M2MConnectionHandler::releasemutex()", referenced from: mutex_release in libmbed-client.a(nsdlaccesshelper.cpp.o) "M2MConnectionHandler::stop_listening()", referenced from: M2MInterfaceImpl::~M2MInterfaceImpl() in libmbed-client.a(m2minterfaceimpl.cpp.o) M2MInterfaceImpl::socket_error(unsigned char, bool) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionHandler::bind_connection(unsigned short)", referenced from: M2MInterfaceImpl::M2MInterfaceImpl(M2MInterfaceObserver&, m2m::String const&, m2m::String const&, int, unsigned short, m2m::String const&, M2MInterface::BindingMode, M2MInterface::NetworkStack, m2m::String const&) in libmbed-client.a(m2minterfaceimpl.cpp.o) M2MInterfaceImpl::timer_expired(M2MTimerObserver::Type) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionHandler::resolve_serveraddress(m2m::String const&, unsigned short, M2MConnectionObserver::ServerType, M2MSecurity const)", referenced from: M2MInterfaceImpl::statebootstrap(EventData) in libmbed-client.a(m2minterfaceimpl.cpp.o) M2MInterfaceImpl::stateregister(EventData) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionHandler::start_listening_for_data()", referenced from: M2MInterfaceImpl::state_bootstrap_addressresolved(EventData) in libmbed-client.a(m2minterfaceimpl.cpp.o) M2MInterfaceImpl::state_register_addressresolved(EventData) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionHandler::set_platform_networkhandler(void)", referenced from: M2MInterfaceImpl::set_platform_networkhandler(void) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionHandler::senddata(unsigned char, unsigned short, sn_nsdl_addr)", referenced from: M2MInterfaceImpl::coap_messageready(unsigned char, unsigned short, sn_nsdl_addr_) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionHandler::M2MConnectionHandler(M2MConnectionObserver&, M2MConnectionSecurity, M2MInterface::BindingMode, M2MInterface::NetworkStack)", referenced from: M2MInterfaceImpl::M2MInterfaceImpl(M2MInterfaceObserver&, m2m::String const&, m2m::String const&, int, unsigned short, m2m::String const&, M2MInterface::BindingMode, M2MInterface::NetworkStack, m2m::String const&) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionHandler::~M2MConnectionHandler()", referenced from: M2MInterfaceImpl::~M2MInterfaceImpl() in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionSecurity::set_entropy_callback(mbedtls_entropy)", referenced from: M2MInterfaceImpl::set_entropy_callback(mbedtls_entropy) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionSecurity::set_random_numbercallback(unsigned int ()())", referenced from: M2MInterfaceImpl::set_random_numbercallback(unsigned int ()()) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MConnectionSecurity::M2MConnectionSecurity(M2MConnectionSecurity::SecurityMode)", referenced from: M2MInterfaceImpl::M2MInterfaceImpl(M2MInterfaceObserver&, m2m::String const&, m2m::String const&, int, unsigned short, m2m::String const&, M2MInterface::BindingMode, M2MInterface::NetworkStack, m2m::String const&) in libmbed-client.a(m2minterfaceimpl.cpp.o) "M2MTimer::stop_timer()", referenced from: M2MInterfaceImpl::socket_error(unsigned char, bool) in libmbed-client.a(m2minterfaceimpl.cpp.o) M2MInterfaceImpl::data_sent() in libmbed-client.a(m2minterfaceimpl.cpp.o) M2MReportHandler::set_under_observation(bool) in libmbed-client.a(m2mreporthandler.cpp.o) M2MReportHandler::stop_timers() in libmbed-client.a(m2mreporthandler.cpp.o) M2MReportHandler::set_value(float) in libmbed-client.a(m2mreporthandler.cpp.o) M2MReportHandler::report() in libmbed-client.a(m2mreporthandler.cpp.o) M2MNsdlInterface::send_registermessage(unsigned char, unsigned short, sn_nsdl_addrtype) in libmbed-client.a(m2mnsdlinterface.cpp.o) ... "M2MTimer::start_timer(unsigned long long, M2MTimerObserver::Type, bool)", referenced from: M2MInterfaceImpl::socket_error(unsigned char, bool) in libmbed-client.a(m2minterfaceimpl.cpp.o) M2MInterfaceImpl::data_sent() in libmbed-client.a(m2minterfaceimpl.cpp.o) M2MReportHandler::handle_timers() in libmbed-client.a(m2mreporthandler.cpp.o) M2MNsdlInterface::send_registermessage(unsigned char, unsigned short, sn_nsdl_addrtype) in libmbed-client.a(m2mnsdlinterface.cpp.o) M2MNsdlInterface::send_update_registration(unsigned int) in libmbed-client.a(m2mnsdlinterface.cpp.o) M2MNsdlInterface::received_from_server_callback(nsdls, sn_coap_hdr, sn_nsdladdr*) in libmbed-client.a(m2mnsdlinterface.cpp.o) "M2MTimer::M2MTimer(M2MTimerObserver&)", referenced from: M2MInterfaceImpl::M2MInterfaceImpl(M2MInterfaceObserver&, m2m::String const&, m2m::String const&, int, unsigned short, m2m::String const&, M2MInterface::BindingMode, M2MInterface::NetworkStack, m2m::String const&) in libmbed-client.a(m2minterfaceimpl.cpp.o) M2MReportHandler::handle_timers() in libmbed-client.a(m2mreporthandler.cpp.o) M2MNsdlInterface::M2MNsdlInterface(M2MNsdlObserver&) in libmbed-client.a(m2mnsdlinterface.cpp.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.

ciarmcom commented 8 years ago

ARM Internal Ref: IOTCLT-779

yogpan01 commented 8 years ago

Hi, This example is for Linux (Ubuntu) distribution, have you tried this on ubuntu environment ?

Charlyo commented 8 years ago

No, just on Mac OS X. It's the only platform that i have right now.

Charlyo commented 8 years ago

There's any expected ETA for a mac os x - unix example?

yogpan01 commented 8 years ago

Hi, You can try this solution, if this works for you https://github.com/ARMmbed/mbed-client/issues/88

yogpan01 commented 8 years ago

The solution is for Ubuntu version, the support for mac os x -unix is not planned.