I built 8c09ded0e4ad and attempting to create/open a persistent LevelDB using
leveled.Open(dirname, nil) fails with an error message complaining that file
locking is not implemented in solaris. The issue is the build constraints in
leveldb/db/file_lock_unix.go and leveldb/db/file_lock_generic.go do not include
Solaris/Illumos (which is supported as of Go 1.3).
The fix is:
diff -r 8c09ded0e4ad leveldb/db/file_lock_generic.go
--- a/leveldb/db/file_lock_generic.go Thu Sep 25 10:17:15 2014 +1000
+++ b/leveldb/db/file_lock_generic.go Fri Oct 10 20:02:50 2014 -0700
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!windows
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!windows,!solaris
package db
diff -r 8c09ded0e4ad leveldb/db/file_lock_unix.go
--- a/leveldb/db/file_lock_unix.go Thu Sep 25 10:17:15 2014 +1000
+++ b/leveldb/db/file_lock_unix.go Fri Oct 10 20:02:50 2014 -0700
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package db
Original issue reported on code.google.com by ma...@apsalar.com on 11 Oct 2014 at 3:03
Original issue reported on code.google.com by
ma...@apsalar.com
on 11 Oct 2014 at 3:03