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

Build on OSX #22

Closed
MikeSchroll opened this issue Dec 6, 2014 · 3 comments
Closed

Build on OSX #22

MikeSchroll opened this issue Dec 6, 2014 · 3 comments

Comments

@MikeSchroll
Copy link

I was able to get it built on OSX by:

brew install openssl

And the following changes to the Makefile:

diff --git a/Makefile b/Makefile
index df6546c..76d4497 100644
--- a/Makefile
+++ b/Makefile
@@ -18,8 +18,8 @@ WARNINGS = -Wall -Wformat=2
DEFINES = -DVERSION="$(GIT_VERSION)"

for dynamic linkung

-LDFLAGS = -L/usr/local/ssl/lib/
-CFLAGS = -I/usr/local/ssl/include/ -I/usr/local/ssl/include/openssl/
+LDFLAGS = -L/usr/local/opt/openssl/lib
+CFLAGS = -I/usr/local/opt/openssl/include
LIBS = -lssl -lcrypto

for static linking

I'm not versed in how best to share this, or I'd do a pull request. Appreciate help from anyone!

@rbsec
Copy link
Owner

rbsec commented Dec 6, 2014

Thanks for this. I've never tried building on OSX, but if this is working for you then great. I've added the extra flags you have above (I kept the original ones as well so as not to break the build for people on Linux), see commit 01d223d. It you could verify that the latest revision builds correctly on OSX that'd be great.

With regards to sharing changes like this, generally it's best to fork the project on GitHub, then make the changes in a commit to your fork. You can then create a pull request from your fork to the original project through the GitHub web interface. In this case it's a simple commit, so I've just merged it manually.

@MikeSchroll
Copy link
Author

Sorry I was unclear -- I'm familiar with the fork, pull process. I was not familiar with Makefiles. Didn't realize it was as easy as adding the new library paths to the list.

Thanks for the commit.

Compiles fine from the repo now! great!

@Wingless-Archangel
Copy link

Can you reopen this case?

I can't compile even you add the extra flags. it still struck at the first PATH for both LDFLAGS and CFLAGS as shown below.

❯ make
cc -o sslscan -Wall -Wformat=2 -L/usr/local/opt/openssl/lib -L/usr/local/ssl/lib/   -I/usr/local/opt/openssl/include -I/usr/local/ssl/include/ -I/usr/local/ssl/include/openssl/    -DVERSION=\"1.10.6-rbsec-2-gc980c00-wip\" sslscan.c -lssl -lcrypto
ld: warning: directory not found for option '-L/usr/local/ssl/lib/'

also I have a problem with make static that the architecture not found as shown below.


ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [sslscan] Error 1
make: *** [static] Error 2

The workaround for me is just make command and comment put only the available path for both flags.

Did I miss anything during the installation?

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

3 participants