Closed robo1340 closed 5 months ago
Self answering, There were some issues with the original scripts made by crcunningham, due to changes in zmq and xcode. A few tweaks got it working. I created a fork of the original repo here for anyone running into the same issue. https://github.com/robo1340/zeromq_ios_libraries
Issue description
I'm working on getting ZeroMQ to compile for an Iphone app and for the life of me cannot get
zmq_has("curve")
to not return anything other than 0.Environment
MacBook Pro x86_64 MacOS Sonoma Version 14.4.1 Xcode version 15.3
I'm using this guy's scripts with just a few modifications listed below: https://github.com/crcunningham/zeromq_ios_libraries
Minimal test code / Steps to reproduce the issue
Main.m in Xcode Project
What's the actual result?
The build always succeeds with only two unrelated warnings but the assertion always fails. I am unable to use ZMQ curve security as a result.
What's the expected result?
zmq_has("curve") should return 1
Additional Info
I have tried installing libsodium with
brew install libsodium
and then changed the configure option--with-libzmq=yes
in libzmq.sh. To my surprise, the assertion no longer failed and I was able to set curve related options on my sockets and even was able to use a REQ socket to send a command to a REP socket on another machine. I got no response back of course because without czmq I do not have the ZAP protocol implemented.This was a comforting result to see as it proved that I have the libraries linked in Xcode correctly and am not doing anything fundamentally wrong in the way the app is making calls to zmq, but this isn't a solution for 2 reasons.