pierrep / ofxLws

openFrameworks libwebsockets addon
Other
13 stars 6 forks source link

MacOS Libs #4

Open danzeeeman opened 2 years ago

pierrep commented 2 years ago

I don't have any Apple hardware at the moment. Feel free to send a PR, otherwise I can try setting up a VM at some point

danzeeeman commented 2 years ago

I got them built against the OpenSSL libs in ofxPoco I’ll do a PR today

On Wed, Sep 8, 2021 at 9:53 PM Pierre Proske @.***> wrote:

I don't have an Apple hardware at the moment. Feel free to send a PR, otherwise I can try setting up a VM at some point

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pierrep/ofxLws/issues/4#issuecomment-915696818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFPVTAX5HHPSKQKTXEW2VDUBAHSHANCNFSM5DVLDXGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Sent from Gmail Mobile #autocorrect

pierrep commented 2 years ago

Awesome!

itsflores commented 2 years ago

hi! did this get resolved? I think I'm running into this problem with an m1 machine

` "sio::client::set_open_listener(std::1::function<void ()> const&)", referenced from: ofxSocketIO::setup(std::1::basic_string<char, std::1::char_traits, std::1::allocator >&, std::1::map<std::__1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::less<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > >, std::1::allocator<std::1::pair<std::1::basic_string<char, std::1::char_traits, std::1::allocator > const, std::1::basic_string<char, std::1::char_traits, std::1::allocator > > > >&) in ofxSocketIO.o "sio::client::set_close_listener(std::1::function<void (sio::client::close_reason const&)> const&)", referenced from: ofxSocketIO::setup(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::map<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::less<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > >, std::1::allocator<std::1::pair<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > > > >&) in ofxSocketIO.o "sio::client::set_fail_listener(std::1::function<void ()> const&)", referenced from: ofxSocketIO::setup(std::1::basic_string<char, std::1::char_traits, std::1::allocator >&, std::1::map<std::__1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::less<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > >, std::1::allocator<std::1::pair<std::1::basic_string<char, std::1::char_traits, std::1::allocator > const, std::1::basic_string<char, std::1::char_traits, std::1::allocator > > > >&) in ofxSocketIO.o "sio::client::set_reconnect_listener(std::1::function<void (unsigned int, unsigned int)> const&)", referenced from: ofxSocketIO::setup(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::map<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::less<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > >, std::1::allocator<std::1::pair<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > > > >&) in ofxSocketIO.o "sio::client::~client()", referenced from: ofxSocketIO::ofxSocketIO() in main.o ofxSocketIO::~ofxSocketIO() in ofApp.o "sio::client::connect(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::map<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::less<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > >, std::1::allocator<std::1::pair<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > > > > const&)", referenced from: ofxSocketIO::setup(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >&, std::1::map<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::less<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > >, std::1::allocator<std::1::pair<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > > > >&) in ofxSocketIO.o "sio::client::client()", referenced from: ofxSocketIO::ofxSocketIO() in main.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

`

pierrep commented 2 years ago

Unfortunately not, I never received a PR, and I don't have Mac hardware to test.

antoniohof commented 2 years ago

clang: error: no such file or directory: '../../../addons/ofxLws/libs/openssl/lib/osx/libcrypto.a' clang: error: no such file or directory: '../../../addons/ofxLws/libs/openssl/lib/osx/libssl.a' Command Ld failed with a nonzero exit code

Have the same issue, anyone fixed this?

pierrep commented 2 years ago

No not yet. What OS version are you on by the way?

tomorrowevening commented 3 weeks ago

M3Max on Sonoma 14.2: I installed openssl with homebrew, then inside /opt/homebrew/Cellar/openssl@3/3.3.1/lib you'll find the required libcrypto.a and libssl.a. From there I moved them into addons/ofxLws/libs/openssl/lib/osx/, however now within Xcode I get these 2 build errors:

ld: library 'ssl' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ld /Users/colin/Projects/openframeworks/apps/KinectSockets/bin/KinectSocketsDebug.app/Contents/MacOS/KinectSocketsDebug normal (in target 'KinectSockets' from project 'KinectSockets')
    cd /Users/colin/Projects/openframeworks/apps/KinectSockets

Any idea why it can't find the library? I'm open-sourcing the project here.

tomorrowevening commented 3 weeks ago

Am I wrong or doesn't ofxPoco also contain the openssl libs? Can't we just remove the ofxLws openssl .a includes? Now I get 18 errors:

  1. Undefined symbol: _lws_callback_on_writable
  2. Undefined symbol: _lws_cancel_service
  3. Undefined symbol: _lws_client_connect_via_info
  4. Undefined symbol: _lws_context_destroy
  5. Undefined symbol: _lws_create_context
  6. Undefined symbol: _lws_frame_is_binary
  7. Undefined symbol: _lws_get_peer_addresses
  8. Undefined symbol: _lws_get_peer_simple
  9. Undefined symbol: _lws_get_protocol
  10. Undefined symbol: _lws_get_socket_fd
  11. Undefined symbol: _lws_get_vhost
  12. Undefined symbol: _lws_is_final_fragment
  13. Undefined symbol: _lws_remaining_packet_payload
  14. Undefined symbol: _lws_serve_http_file
  15. Undefined symbol: _lws_service
  16. Undefined symbol: _lws_set_log_level
  17. Undefined symbol: _lws_write
  18. Linker command failed with exit code 1 (use -v to see invocation)
Undefined symbols for architecture arm64:
  "_lws_callback_on_writable", referenced from:
      ofxLibwebsockets::Connection::update() in Connection.o
      ofxLibwebsockets::Connection::update() in Connection.o
      ofxLibwebsockets::Connection::update() in Connection.o
      ofxLibwebsockets::Connection::update() in Connection.o
      ofxLibwebsockets::lws_client_callback(lws*, lws_callback_reasons, void*, void*, unsigned long) in Util.o
      ofxLibwebsockets::lws_callback(lws*, lws_callback_reasons, void*, void*, unsigned long) in Util.o
  "_lws_cancel_service", referenced from:
      ofxLibwebsockets::Server::close() in Server.o
  "_lws_client_connect_via_info", referenced from:
      ofxLibwebsockets::Client::connect(ofxLibwebsockets::ClientOptions) in Client.o
  "_lws_context_destroy", referenced from:
      ofxLibwebsockets::Client::close() in Client.o
      ofxLibwebsockets::Server::close() in Server.o
  "_lws_create_context", referenced from:
      ofxLibwebsockets::Client::connect(ofxLibwebsockets::ClientOptions) in Client.o
      ofxLibwebsockets::Server::setup(ofxLibwebsockets::ServerOptions) in Server.o
  "_lws_frame_is_binary", referenced from:
      ofxLibwebsockets::Reactor::_notify(ofxLibwebsockets::Connection*, lws_callback_reasons, char const*, unsigned int) in Reactor.o
  "_lws_get_peer_addresses", referenced from:
      ofxLibwebsockets::Reactor::_allow(lws*, ofxLibwebsockets::Protocol*, long) in Reactor.o
  "_lws_get_peer_simple", referenced from:
      ofxLibwebsockets::Connection::setupAddress() in Connection.o
  "_lws_get_protocol", referenced from:
      ofxLibwebsockets::lws_client_callback(lws*, lws_callback_reasons, void*, void*, unsigned long) in Util.o
      ofxLibwebsockets::lws_callback(lws*, lws_callback_reasons, void*, void*, unsigned long) in Util.o
  "_lws_get_socket_fd", referenced from:
      ofxLibwebsockets::Reactor::_allow(lws*, ofxLibwebsockets::Protocol*, long) in Reactor.o
  "_lws_get_vhost", referenced from:
      ofxLibwebsockets::lws_callback(lws*, lws_callback_reasons, void*, void*, unsigned long) in Util.o
  "_lws_is_final_fragment", referenced from:
      ofxLibwebsockets::Reactor::_notify(ofxLibwebsockets::Connection*, lws_callback_reasons, char const*, unsigned int) in Reactor.o
      ofxLibwebsockets::Reactor::_notify(ofxLibwebsockets::Connection*, lws_callback_reasons, char const*, unsigned int) in Reactor.o
      ofxLibwebsockets::Reactor::_notify(ofxLibwebsockets::Connection*, lws_callback_reasons, char const*, unsigned int) in Reactor.o
  "_lws_remaining_packet_payload", referenced from:
      ofxLibwebsockets::Reactor::_notify(ofxLibwebsockets::Connection*, lws_callback_reasons, char const*, unsigned int) in Reactor.o
  "_lws_serve_http_file", referenced from:
      ofxLibwebsockets::Reactor::_http(lws*, char const*) in Reactor.o
  "_lws_service", referenced from:
      ofxLibwebsockets::Client::threadedFunction() in Client.o
      ofxLibwebsockets::Server::threadedFunction() in Server.o
  "_lws_set_log_level", referenced from:
      ofxLibwebsockets::Client::connect(ofxLibwebsockets::ClientOptions) in Client.o
      ofxLibwebsockets::Server::setup(ofxLibwebsockets::ServerOptions) in Server.o
  "_lws_write", referenced from:
      ofxLibwebsockets::Connection::update() in Connection.o
      ofxLibwebsockets::Connection::update() in Connection.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
tomorrowevening commented 3 weeks ago

You can test my branch (where it breaks because of this addon) here