leedm777 / homebrew-asterisk

Homebrew tap for building an Asterisk dev environment
50 stars 27 forks source link

JSON support not found #7

Closed Elastino closed 10 years ago

Elastino commented 10 years ago
server:jansson-2.6 dev$ brew install asterisk
==> Downloading http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-12.2.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/asterisk-12.2.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/asterisk/12.2.0 --without-netsnmp --without-gtk2 --with-ssl=/usr/local/opt/openssl --with-sqlite3=/usr/local/opt/sqlite --with-unixodbc=/usr/local/opt/unixodbc
checking for json_dumps in -ljansson... yes
checking jansson.h usability... no
checking jansson.h presence... no
checking for jansson.h... no
configure: error: *** JSON support not found (this typically means the libjansson development package is missing)

READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/leedm777/homebrew-asterisk/issues
Elastino commented 10 years ago

Initially, Jansson was installed via dependency. Didn't work. So, I installed Jansson 2.6 manually from Jansson website. Still Asterisk ./configure can not detect jansson.h

janson.h is located in /usr/local/include/jansson.h

Can anyone help me on this please?

morgant commented 10 years ago

Strange, configure did find jansson for me on OS X 10.10.1 (though compilation didn't work, but that's a separate issue), and it was installed via dependancy:

checking for json_dumps in -ljansson... yes
checking jansson.h usability... yes
checking jansson.h presence... yes
checking for jansson.h... yes
yluom commented 10 years ago

I also have the same problem as Elastino's. brew install https://raw.githubusercontent.com/Elastino/homebrew-asterisk/767dac7f3dc922a6bd169e14987e0dad49c9e679/asterisk.rb returns checking for jansson.h... no configure: error: *** JSON support not found (this typically means the libjansson development package is missing) Installed jansson from sources, and it's correctly installed on my system in : /usr/include/jansson.h and /usr/local/include/jansson.h

Can someone help ?

morgant commented 10 years ago

@yluom Since you build jansson from source instead of using Homebrew, it's in /usr instead of /usr/local and so it's not finding it. You could try installing it with brew, you could try setting the JANSSON_DIR=/usr/local environment variable prior to installing homebrew-asterisk, or updating homebrew-asterisk/asterisk.rb to call configure with the --with-jansson=/usr/local option.

leedm777 commented 10 years ago

GCC isn't searching /usr/local, but I have no idea why it wouldn't. Even if you can get past the libjansson problem, it's going to have problems finding any other brew-installed dependencies.

leedm777 commented 10 years ago

This is a bug in homebrew's build of GCC. If you install the CLT, and re-install GCC, then it will properly search /usr/local as expected. See homebrew #34461.

# Remove old GCC
$ brew uninstall gcc
# Install the CLT
$ xcode-select --install
# Re-install GCC; it should download the bottle instead of build the world
$ brew install gcc
# Verify
$ brew info gcc | head -4
gcc: stable 4.9.2 (bottled)
http://gcc.gnu.org
/usr/local/Cellar/gcc/4.9.2 (1156 files, 203M) *
  Poured from bottle