macosopensslerlangmongoose-im

Unable to install MongooseIM from source code on MAC OS 10.14.2


I am unable to install Mongooseim (latest) from the source code.

Using:

MongooseIM 3.2.0 (source code)
Mac OS 10.14.2 
Erlang: 21.2

Issue: While compiling Mongooseim from the source code, my logs are stuck on linking fast_tls.so and execution stopped. See screenshot below. I am sure something is wrong with openssl.

Solution tried:

  1. I have installed openssl and exported all flags but still the same issue.
  2. I have tried to install fast_tls from the source code. But that also failed on openssl. see screenshot
  3. Output of openssl verion

//terminal ouput

$ openssl version -a
OpenSSL 1.0.2q  20 Nov 2018
built on: reproducible build, date unspecified
platform: darwin64-x86_64-cc
options:  bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx) 
compiler: clang -I. -I.. -I../include  -fPIC -fno-common -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/local/etc/openssl"

//Screenshots

enter image description here

enter image description here


Solution

  • I guess this page regarding building ejabberd on MacOS should help: https://docs.ejabberd.im/developer/install-osx/#installation

    You need to install openSSL from homebrew and then properly set up your environment variables:

    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"