Closed daveyostcom closed 7 years ago
Hi Dave,
I will need to obtain a machine with latest MacOS and XCode to test the recommended changes. This may take a couple of days.
I don't understand why libpthread.dylib and libz.dylib are not found in "/usr/lib". Will have to check latest MacOS.
libuv.a is only required if AS_USE_LIBUV is defined as a CFLAG in the xcode project. If this flag is not defined, the build and execute will work fine even though the library is red.
Hi Brian,
Re libuv being required, try running my script with the “brew install libuv” commented out.
I have reworked the xcode project files, added a prepare_xcode script and updated the readme. This will appear in the next release of the C client.
C client 4.1.4 has been released:
The README.md file could make life much easier for Mac users by providing a separate Mac section, which contains a ready-to-use shell script, as shown at the end of this report.
Using macOS 10.12.3 with Xcode 8.2.1, I tried to follow the instructions in the README.md file, as follows.
Start with this:
Homebrew complains and suggests doing this, which doesn't seem to help (more later):
Do this:
In Xcode, try to build
aerospike-test
(which is not the default when Xcode opens). Xcode complains'lua.h' file not found
In Xcode, try to build
aerospike-test
. Xcode complains'openssl/ssl.h' file not found
Do this by hand to get around brew's refusal to do so (above, despite the --force argument):
In Xcode, try to build
aerospike-test
. Xcode complains about lua symbols. Brian says that this is because the lua installed by Homebrew is too recent. So do this:In Xcode, try to build
aerospike-test
. Xcode complains'lua.h' file not found
again.Do this workaround, so that Xcode can see the lua that comes with the client from the repo. The README.md doesn't say that even if you're going to be building with Xcode, you nevertheless have to run
make
. This was not at all obvious.Incidentally, I wasted some time because I didn't expect
make
to build lua in its source tree:Now that
make
has built the right version of lua, do this:In Xcode, try to build
aerospike-test
. Xcode complainsld: library not found for -luv
.Do this (even though the README.md file implies that it's optional):
In Xcode, try to build
aerospike-test
. Build Succeeded! (but with many warnings)Xcode has many hard-coded paths to libs (mostly in red):
Only the
liblua.a
andlibev.a
references work. The others don't work for path and version reasons. In any case, if these references are going to be here and made to work, they should probably be shared, either in theaerospike
project or in a newaerospike-libs
project.Here are all of my workarounds, collected in one script: