I tried to make module ejabberd in elixir in OSX EL Captitan following this guide https://blog.process-one.net/ejabberd-joins-the-elixir-revolution/
I have a trouble when make && make install
I got error like these
rm -rf deps/.got
rm -rf deps/.built
/usr/local/Cellar/erlang/18.3/lib/erlang/bin/escript rebar get-deps && :> deps/.got
==> goldrush (get-deps)
==> lager (get-deps)
==> p1_utils (get-deps)
==> cache_tab (get-deps)
==> fast_tls (get-deps)
==> stringprep (get-deps)
==> fast_xml (get-deps)
==> stun (get-deps)
==> esip (get-deps)
==> fast_yaml (get-deps)
==> jiffy (get-deps)
==> p1_oauth2 (get-deps)
==> p1_xmlrpc (get-deps)
==> luerl (get-deps)
==> ezlib (get-deps)
==> elixir (get-deps)
==> rebar_elixir_plugin (get-deps)
==> iconv (get-deps)
==> rel (get-deps)
==> ejabberd (get-deps)
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/local/Cellar/erlang/18.3/lib/erlang/erts-7.3/bin/erl
checking for erlc... /usr/local/Cellar/erlang/18.3/lib/erlang/erts-7.3/bin/erlc
checking for SSL_free in -lssl... yes
checking for SHA1_Init in -lcrypto... yes
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
checking openssl/err.h usability... no
checking openssl/err.h presence... no
checking for openssl/err.h... no
checking openssl/sha.h usability... no
checking openssl/sha.h presence... no
checking for openssl/sha.h... no
configure: error: OpenSSL header file "openssl/ssl.h" was not found
ERROR: Command ['get-deps'] failed!
make: *** [deps/.got] Error 1
I have tried
brew link openssl --force
It still not working
Do you have any solution for this?
Edit
just got solution
What was the solution ?
Had you installed openssl through homebrew ?
Path set up ?
yes path setup
export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib"
export CFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include"
export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include"
it solve my problem
@philipmoniaga nice!thank you
Just a note to others that after path setup with export run the ./configure again and then make.
This didn't work for me:
$ brew install openssl
Warning: openssl 1.0.2n is already installed
$ export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib"
$ export CFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include"
$ export CPPFLAGS="-I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include"
$ ./configure
loading cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc -I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include -L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib) works... yes
checking whether the C compiler (gcc -I/usr/local/opt/openssl/include/ -I/usr/local/include -I/usr/local/opt/expat/include -L/usr/local/opt/openssl/lib -L/usr/local/lib -L/usr/local/opt/expat/lib) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for X... no
checking for ANSI C header files... yes
checking for err.h... yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/queue.h... yes
checking for unistd.h... yes
checking for libgen.h... yes
checking for net/if_tun.h... no
checking for MIN and MAX in sys/param.h... yes
checking for working const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for in_addr_t... yes
checking whether gcc needs -traditional... no
checking for 8-bit clean memcmp... yes
checking return type of signal handlers... void
checking for strftime... yes
checking for gethostname... yes
checking for socket... yes
checking for strdup... yes
checking for strstr... yes
checking for xdr_fhstatus in -lrpcsvc... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... no
checking for dn_expand in -lresolv... yes
checking for dirname... yes
checking for strlcpy... yes
checking for strlcat... yes
checking for strsep... yes
checking for MD5Update... no
checking for warnx... yes
checking for ether_ntoa... yes
checking for Berkeley DB with 1.85 compatibility... yes
checking for libpcap... yes
checking for libnet... yes
checking for libnids... yes
checking whether libnids version is good... yes
checking for OpenSSL... no
configure: error: OpenSSL not found
Any ideas?
EDIT: I successfully installed with this instead.
another env variable maybe work sometimes, see below
export LIBRARY_PATH="/usr/local/opt/openssl/lib"
Here is a detailed explanation
It depends on what it checking, headers or library, and also when it occur, configure or make. The *FLAGS and LIBRARY_PATH work for different scenes
This works for me
export LDFLAGS="$LDFLAGS -arch x86_64 -flat_namespace -undefined suppress -L/usr/local/Cellar/openssl/1.0.2n/lib/"
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/Cellar/openssl/1.0.2n/include
where you substitute 1.0.2n with your openssl version
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
yes path setup
it solve my problem