replete-repl / replete-ios

ClojureScript REPL iOS app
Eclipse Public License 1.0
395 stars 25 forks source link

Check on a few build dependencies #117

Closed cellularmitosis closed 5 years ago

cellularmitosis commented 5 years ago

This PR checks for:

and recommends the appropriate brew invocation to install the dependency.

cellularmitosis commented 5 years ago

Hmm, still not quite there with this one.

There is some issue on this laptop between libzip, brew and pkg-config.

$ pkg-config libzip
$ echo $?
1

However, clearly it is installed:

$ find /usr/local/Cellar/libzip/ | grep pkgconfig
/usr/local/Cellar/libzip/1.2.0/lib/pkgconfig
/usr/local/Cellar/libzip/1.2.0/lib/pkgconfig/libzip.pc

But I have to force pkg-config to see it:

$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/Cellar/libzip/1.2.0/lib/pkgconfig
$ pkg-config --list-all | grep libzip
libzip                              libzip - library for handling zip archives

Not sure how to address this in the build script.  🤔

cellularmitosis commented 5 years ago

hmm, ok so the problem is that I need /usr/local/lib/pkgconfig

$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig/
$ pkg-config libzip
$ echo $?
0
cellularmitosis commented 5 years ago

Ok, I've accounted for pkg-config not being able to find libzip, despite it being installed.

cellularmitosis commented 5 years ago

Spent a while trying to get these scripts to run from within Xcode. The main issue seems to be that Xcode is polluting $PATH, etc, with its own toolchain. As a result, the planck build script invokes the wrong cc and ld (intended for building to the simulator or a phone), and thus can't find things like icu4c.

This can definitely be made to work with the right amount of environment variable massaging, but that'll be the subject of a different PR.