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

Failed to build on Mac #57

Closed
ytfei opened this issue Apr 7, 2015 · 4 comments
Closed

Failed to build on Mac #57

ytfei opened this issue Apr 7, 2015 · 4 comments

Comments

@ytfei
Copy link

ytfei commented Apr 7, 2015

When built on Mac, I got .depend:1: *** missing separator. Stop.

make --version

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
@darkk
Copy link
Owner

darkk commented Apr 8, 2015

What C compiler do you use? Only gcc is supported for .depend file generation.

@ytfei
Copy link
Author

ytfei commented Apr 20, 2015

redsocks$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix

what should i do if wish to build redsocks on Mac? install gcc or simply update the Makefile ? Sorry i'm not familiar with C

@jondb
Copy link

jondb commented Sep 17, 2015

@darkk the issue is with the command echo -n.

On Ubuntu, it works

$ sh -c 'echo -n bob'
bob$
$ ls -al /bin/sh
lrwxrwxrwx 1 root root 4 Apr 17  2014 /bin/sh -> dash

On OSX, it doesn't work with sh

$ sh -c 'echo -n bob'
-n bob
$ 
$ sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.
$

But it does with bash.

The fix

Set the shell in the Makefile. Add this to the top:

SHELL := /bin/bash

example:

 DEPS := .depend
 OUT := redsocks
 VERSION := 0.4
+SHELL := /bin/bash

 LIBS := -levent
 CFLAGS += -g -O2

@darkk
Copy link
Owner

darkk commented Feb 1, 2018

I have no permanent root access to machines running MacOSX to test and develop for this platform. Was v0.4 ever working on MacOSX? If it was, please contribute documentation with working MacOSX firewall configuration guidelines.

Also, I'm closing this issue in favor of #75 that tracks current MacOSX support status.

@darkk darkk closed this as completed Feb 1, 2018
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