Coder Social home page Coder Social logo

matlab-leveldb's People

Contributors

kyamagu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

matlab-leveldb's Issues

Compile Error in OSX 10.9

Cause

After following the specific installation guide from Caffe (http://caffe.berkeleyvision.org/installation.html#specific-instructions-1), leveldb is installed using Homebrew and libstdc++ option.

Symptom

Error using mex
Undefined symbols for architecture x86_64:
  "leveldb::DB::Open(leveldb::Options const&, std::__1::basic_string<char,
  std::__1::char_traits<char>, std::__1::allocator<char> > const&, leveldb::DB**)", referenced
  from:
      (anonymous namespace)::Operation_new::operator()(int, mxArray_tag**, int, mxArray_tag
      const**) in LevelDB_.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)</code>

Solution

Download the source directly from https://github.com/google/leveldb, and compile with default at another place.
leveldb.make('all', '-I/path/to/leveldb/include -L/path/to/leveldb')

make fails with ISO C++ 2011 standard support error

Make fails on a fresh install of matlab-leveldb in Matlab R2013b, using gcc 4.8.2 in Ubuntu. The error is:

In file included from /usr/include/c++/4.8/type_traits:35:0,
                 from include/mexplus/mxtypes.h:10,
                 [...]
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
[...]

These are enabled. By adding $(MEX) -v to Makefile, the command which is executed is also printed:

g++ -c  -Iinclude -Ileveldb-1.18/include -I/usr/local/MATLAB/extern/include -I/usr/local/MATLAB/simulink/include -DMATLAB_MEX_FILE -std=c++11 -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread  -DMX_COMPAT_32 -O -DNDEBUG  "src/LevelDB_.cc"

It also fails with -std=gnu++11 and -std=c++0x.

Any idea what's wrong?

linking error while making

There is an error with the linking command:

-> g++ -O -fPIC -pthread -shared -Wl,--version-script,/usr/local/MATLAB/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined -o  "+leveldb/private/LevelDB_.mexa64"  LevelDB_.o  leveldb-1.18/libleveldb.a -Wl,-rpath-link,/usr/local/MATLAB/bin/glnxa64 -L/usr/local/MATLAB/bin/glnxa64 -lmx -lmex -lmat -lm

/usr/bin/ld: leveldb-1.18/libleveldb.a(db_impl.o): relocation R_X86_64_32S against `_ZTVN7leveldb2DBE' can not be used when making a shared object; recompile with -fPIC
leveldb-1.18/libleveldb.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
[...]

I tried -std=gnu++11, -std=c++0x, and -std=c++11 in CXXFLAGS. Before adding -fPIC to LDFLAGS to mexopts.sh, the error was the same.

Does it have anything to do with

rm -f libleveldb.a

which is done earlier in the make?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.