mikejs / gridfs-fuse Goto Github PK
View Code? Open in Web Editor NEWA FUSE wrapper around MongoDB's GridFS
License: GNU General Public License v3.0
A FUSE wrapper around MongoDB's GridFS
License: GNU General Public License v3.0
Hi, is there a successor to this project? There hasn't been much recent activity. Thanks!
Hi Mike,
I've managed to copy at least one file to the mounted directory :)
then I start to receive this error all the time:
cp: cannot overwrite directory `/mnt/mongo-test/myfile.txt' with non-directory
Is it fixable?
P.S. I know that write operations are experimental :-/
regards
Valery
Try to install:
boost_1_48_0
fuse-2.8.6
mongodb-linux-x86_64-2.0.0
CentOS release 5.5
Error occur :
g++ -o mount_gridfs main.o operations.o options.o local_gridfile.o -L/usr/local/lib -L. -lmongoclient -lfuse_ino64 -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
/usr/bin/ld: cannot find -lmongoclient
collect2: ld returned 1 exit status
When I try to build with scons I get:
Error: can't find library: mongoclient
I've tried copying the contents of mongodb/lib and mongodb/include/mongo/client to my gridfs-fuse dir before building and that doesn't help. Any ideas?
I am trying to compile the wwoods fork of gridfs-fuse in an Ubuntu server with the lastest stable version of MongoDB, but I am getting the following error:
operations.cpp:30:36: error: mongo/util/hostandport.h: No such file or directory
I noticed that that file is in the "mongo/util/net" directory instead of "mongo/util".
Maybe something need to be updated in order to work with this version of MongoDB?
I solved all the dependencies.
Just the last won't to give up!
g++ -o mount_gridfs main.o operations.o options.o local_gridfile.o -L/usr/local/lib -L. -lmongoclient -lfuse_ino64 -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
/usr/bin/ld: cannot find -lfuse_ino64
collect2: ld returned 1 exit status
There are a couple problems I had building in Linux.
-mt
suffixes (which aren't necessary -- see the comments on this issue: https://bugs.archlinux.org/task/22471)This patch fixes the problems:
diff --git a/Makefile b/Makefile
index e73c523..f0c600d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CC=g++
CCOPTS=-g -D_FILE_OFFSET_BITS=64 -I. -I/usr/local/include
-LDOPTS=-L/usr/local/lib -L. -lmongoclient -lfuse_ino64 -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
+LDOPTS=-L/usr/local/lib -L. -lmongoclient -lfuse -lboost_thread -lboost_filesystem -lboost_system
mount_gridfs : operations.o local_gridfile.o main.o options.o
$(CC) -o mount_gridfs main.o operations.o options.o local_gridfile.o $(LDOPTS)
diff --git a/local_gridfile.h b/local_gridfile.h
index 2353a1a..70e48b0 100644
--- a/local_gridfile.h
+++ b/local_gridfile.h
@@ -1,6 +1,7 @@
#ifndef _LOCAL_GRIDFILE_H
#define _LOCAL_GRIDFILE_H
+#include "sys/types.h"
#include <vector>
#include <cstring>
#include <iostream>
I'm trying to compile this on Debian Lenny 5.0 and I'm getting the following output when I try to compile:
scons: Reading SConscript files ...
Checking for C library mongoclient... yes
Checking for C library fuse... yes
Checking for C library boost_thread-mt... yes
Checking for C library boost_filesystem-mt... yes
Checking for C library boost_system-mt... yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o main.o -c -D_FILE_OFFSET_BITS=64 main.cpp
g++ -o operations.o -c -D_FILE_OFFSET_BITS=64 operations.cpp
g++ -o options.o -c -D_FILE_OFFSET_BITS=64 options.cpp
g++ -o local_gridfile.o -c -D_FILE_OFFSET_BITS=64 local_gridfile.cpp
g++ -o mount_gridfs main.o operations.o options.o local_gridfile.o -lmongoclient -lfuse -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/libmongoclient.a(jsobj.o): In function __static_initialization_and_destruction_0(int, int)': (.text+0x58bf): undefined reference to
boost::system::get_generic_category()'
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/libmongoclient.a(jsobj.o): In function __static_initialization_and_destruction_0(int, int)': (.text+0x58cb): undefined reference to
boost::system::get_generic_category()'
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/libmongoclient.a(jsobj.o): In function __static_initialization_and_destruction_0(int, int)': (.text+0x58d7): undefined reference to
boost::system::get_generic_category()'
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/libmongoclient.a(json.o): In function __static_initialization_and_destruction_0(int, int)': (.text+0x61): undefined reference to
boost::system::get_generic_category()'
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/libmongoclient.a(json.o): In function __static_initialization_and_destruction_0(int, int)': (.text+0x6d): undefined reference to
boost::system::get_generic_category()'
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/libmongoclient.a(json.o):(.text+0x79): more undefined references to `boost::system::get_generic_category()' follow
collect2: ld returned 1 exit status
scons: *** [mount_gridfs] Error 1
scons: building terminated because of errors.
I am using the libboost1.35-dev libraries
Changes required to compile it under freebsd ( mabe other *BSD systems )
-LDOPTS=-L/usr/local/lib -L. -lmongoclient -lfuse_ino64 -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
+LDOPTS=-L/usr/local/lib -L. -lmongoclient -lfuse -lboost_thread -lboost_filesystem -lboost_system
Tested under:
FreeBSD 8.1-RELEASE #6: Sat May 21 21:46:12 CEST 2011 amd64
MongoDB, Boost-* from freebsd ports collection.
g++ -o mount_gridfs main.o operations.o options.o local_gridfile.o -L/usr/local/lib -L. -lmongoclient -lfuse_ino64 -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
/usr/bin/ld: cannot find -lmongoclient
collect2: ld returned 1 exit status
make: *** [mount_gridfs] Error 1
I'm curious if anyone has come across "‘off_t’ has not been declared" error, here's the dump i got:
g++ -g -D_FILE_OFFSET_BITS=64 -I. -I/usr/local/include -c local_gridfile.cpp
In file included from local_gridfile.cpp:1:0:
local_gridfile.h:31:44: error: ‘off_t’ has not been declared
local_gridfile.h:32:36: error: ‘off_t’ has not been declared
local_gridfile.cpp:7:5: error: prototype for ‘int LocalGridFile::write(const char_, size_t, off_t)’ does not match any in class ‘LocalGridFile’
In file included from local_gridfile.cpp:1:0:
local_gridfile.h:31:7: error: candidate is: int LocalGridFile::write(const char_, size_t, int)
local_gridfile.cpp:46:5: error: prototype for ‘int LocalGridFile::read(char_, size_t, off_t)’ does not match any in class ‘LocalGridFile’
In file included from local_gridfile.cpp:1:0:
local_gridfile.h:32:7: error: candidate is: int LocalGridFile::read(char_, size_t, int)
make: *** [local_gridfile.o] Error 1
I'm willing to fix it, but i'm at a lost.
I'm getting this one when mongo stopped and then started again. Looks like it doesnt try to reconnect.
Is this project still active ?
I trying to compile gridfs-fuse and get some errors:
root@z11:
/111/gridfs-fuse# make/111/gridfs-fuse#
g++ -o mount_gridfs main.o operations.o options.o local_gridfile.o -L/usr/local/lib -L. -lmongoclient -lfuse_ino64 >-lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
/usr/bin/ld: cannot find -lmongoclient
/usr/bin/ld: cannot find -lfuse_ino64
collect2: ld returned 1 exit status
make: *** [mount_gridfs] Error 1
root@z11:
What shall I do to compile it correctly?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.