incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Cottlehuber (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1482) Snappy NIF cannot be loaded on Windows 2008 R2 x64 Server
Date Tue, 22 May 2012 23:04:41 GMT


Dave Cottlehuber commented on COUCHDB-1482:

It looks like the OTP build scripts are adding an unwanted helping hand again:

Interestingly the subsequent #L115-133 provide switches to undo *exactly* this issue. Clearly
this is not the first time....

A fix for this is to add some OTP-specific directives into snappy/ to undo the
optimisations that and apply:

diff --git a/src/snappy/ b/src/snappy/
index bca103b..18f47ec 100644
--- a/src/snappy/
+++ b/src/snappy/
@@ -56,7 +56,7 @@ snappy_nif_la_LDFLAGS = -module -avoid-version
 snappy_nif_la_LDFLAGS += -no-undefined
-snappy_nif_la_CXXFLAGS += -EHsc
+snappy_nif_la_CXXFLAGS += -EHsc -mt -md -ml
 SNAPPY_SO_NAME = snappy_nif.dll

Increasing the optimisation level might also work. More testing reqd, &
hopefully get this down to just 1 additional flag here.
> Snappy NIF cannot be loaded on Windows 2008 R2 x64 Server
> ---------------------------------------------------------
>                 Key: COUCHDB-1482
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Build System
>    Affects Versions: 1.2
>         Environment: Windows 2008 R2 x64 Server but *not* any other Windows platform
>            Reporter: Dave Cottlehuber
>              Labels: windows
>             Fix For: 1.2.1
> Initially it looks like there is a difference in how Windows resolves DLL dependencies
for the required C++ runtimes. The snappy NIF is the only one with included C++ code, and
it depends on both debug & release DLLs. On W2008R2 server this prevents loading, but
on Windows 7 it does not. 
> My eternal thanks go to Nick North for uncovering this gem.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message