From 347a8d73029f8dfc01c063068f903931361fc835 Mon Sep 17 00:00:00 2001 From: Alexander Shorin Date: Sat, 4 Apr 2015 01:52:47 +0300 Subject: [PATCH] Make with -lstdc++ on BSD systems Without linking with libstdc++ snappy_nif builds fine, but fails to load in runtime which causes confusing errors from CouchDB side. --- rebar.config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rebar.config b/rebar.config index 84178d5..b1b067d 100644 --- a/rebar.config +++ b/rebar.config @@ -5,7 +5,8 @@ "c_src/snappy/*.cc"]}. {port_env, [ {"CXXFLAGS", "$CXXFLAGS -DNDEBUG"}, - {"(linux|solaris)", "LDFLAGS", "$LDFLAGS -lstdc++"} + {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin)", + "LDFLAGS", "$LDFLAGS -lstdc++"} ]}. {so_name, "snappy_nif.so"}. {eunit_opts, [verbose]}.