Giter Site home page Giter Site logo

求助:如何让gorocks支持lz4 about qdb HOT 3 OPEN

reborndb avatar reborndb commented on August 11, 2024
求助:如何让gorocks支持lz4

from qdb.

Comments (3)

siddontang avatar siddontang commented on August 11, 2024

is lz4 in system path, like /usr/local/lib? maybe youcan add lz4 lib path in LD_LIBRARY_PATH.

from qdb.

guileen avatar guileen commented on August 11, 2024

也就是说rocksdb会自动检测系统有没有lz4,来自动进行编译。

lz4在/usr/local/lib中。之前系统没有设置 LD_LIBRARY_PATH,所以可能是/usr/lib 路径。现在使用 cd extern/rocksdb && LD_LIBRARY_PATH=/usr/local/lib make -j4 install-shared 进行编译,编译成功。

但是,在编译gorocks时无法通过,哪怕没有llz4 。

    cd extern/gorocks && go clean -i ./ && LD_LIBRARY_PATH=$(LIBRARY_PATH) CGO_CFLAGS="-I$(ROCKS_INCLUDE) -I$(LZ4_INCLUDE)" CGO_LDFLAGS="-L$(ROCKS_LIB) -L$(LZ4_PATH) -L/usr/local/lib -lz -llz4" go install ./

报如信息很长,最后一段如下:

      bool std::__1::__insertion_sort_incomplete<rocksdb::(anonymous namespace)::CompareLogByPointer&, std::__1::unique_ptr<rocksdb::LogFile, std::__1::default_delete<rocksdb::LogFile> >*>(std::__1::unique_ptr<rocksdb::LogFile, std::__1::default_delete<rocksdb::LogFile> >*, std::__1::unique_ptr<rocksdb::LogFile, std::__1::default_delete<rocksdb::LogFile> >*, rocksdb::(anonymous namespace)::CompareLogByPointer&) in librocksdb.a(wal_manager.o)
  "___gxx_personality_v0", referenced from:
      _rocksdb_open in librocksdb.a(c.o)
      _rocksdb_open_for_read_only in librocksdb.a(c.o)
      _rocksdb_backup_engine_open in librocksdb.a(c.o)
      _rocksdb_backup_engine_create_new_backup in librocksdb.a(c.o)
      _rocksdb_backup_engine_restore_db_from_latest_backup in librocksdb.a(c.o)
      _rocksdb_open_column_families in librocksdb.a(c.o)
      _rocksdb_open_for_read_only_column_families in librocksdb.a(c.o)
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [install_golibs] Error 2

我的系统是mac OSX,很奇怪,现在无论我如何尝试,都无法编译gorocks了,总是报ld错误。甚至无法恢复到以前的情况。

哪怕我删掉liblz4,去掉LD_LIBRARY_PATH环境变量。

from qdb.

siddontang avatar siddontang commented on August 11, 2024

LD_LIBRARY_PATH is not for mac osx, but for linux.
Btw, you should use make shared_lib to build rocksdb in mac osx, not static lib.

from qdb.

Related Issues (20)

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.