Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about CFLAGS env variable in build from source documentation #88

Closed
gausby opened this issue Feb 19, 2016 · 5 comments
Closed

Comments

@gausby
Copy link
Contributor

gausby commented Feb 19, 2016

I just made vernemq build use Erlang 18 on OS X by doing the following.

  1. I checked out the currently open pull-request that resolves the Erlang 18 build issues. Make it build and run on erlang 18 #81
  2. I merged the current master into this branch, as it resolves an issue with Cuttlefish
  3. I ran make rel, but it failed at vmq-passwd, as it couldn't find the openssl headers on my system
  4. I fixed this by adding -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include to the Makefile in vmq-passwd/c_src and run a build in that directory.
  5. Then I ran the make rel again and it made it all the way through.

I later found out that I could specify the headers using CFLAGS. I think that CFLAGS would be worthy of a mention in the build from source instructions.

@gausby
Copy link
Contributor Author

gausby commented Feb 19, 2016

I forgot to mention; I have openssl installed via Homebrew. A package manager for OS X.

@larshesel
Copy link
Contributor

Hey @gausby sorry for letting this issue stew for so long, thank you for contributing it. Maybe @ioolkos can adapt the docs to include something about this as he actually owns a mac. If not I'll try and write something up, but full disclosure: I'm no mac user so I'm hardly qualified :)

@dergraf
Copy link
Contributor

dergraf commented May 13, 2016

closing this issue in favor of #119

@syberkitten
Copy link

@gausby This works for me as well, adding this line into the MakeFile:
-L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include

final result:

CC?=	gcc

compile:
	$(CC) $(CFLAGS) vmq_passwd.c -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include -lcrypto -o ../priv/vmq_passwd

Now the code compiles on El-Capitan using Erlang OTP/19.3 (with Kerl)

@gausby
Copy link
Contributor Author

gausby commented Jul 20, 2017

@syberkitten I got it running now, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants