fastogt / fastonosql

FastoNoSQL is a crossplatform Redis, Memcached, SSDB, LevelDB, RocksDB, UnQLite, LMDB, ForestDB, Pika, Dynomite, KeyDB GUI management tool.
https://fastonosql.com
GNU General Public License v3.0
1.18k stars 97 forks source link

Building #9

Closed SEAPUNK closed 7 years ago

SEAPUNK commented 7 years ago

I am trying to build this, to not much avail. What are the steps required to build this?

Currently, this is what I'm doing:

git clone ssh://git@github.com/fastogt/fastonosql
cd fastonosql
git submodule init
git submodule update
cd src/third-party/json-c
git submodule init
git submodule update
cd ~/fastonosql
cd build
cmake ..
make

I'm currently trying to build by adding an additional clone and submodule init step of fastogt/common in the src/ directory.

SEAPUNK commented 7 years ago

Okay, I can build it now, but it fails at the last step:

$ make
[  1%] Built target json-c
[  1%] Built target VersionConf
[  3%] Built target libssh2
[  4%] Built target hiredis
[ 12%] Built target memcached
[ 12%] Built target ssdb
[ 17%] Built target leveldb
[ 32%] Built target rocksdb
[ 33%] Built target unqlite
[ 34%] Built target lmdb
[ 56%] Built target qscintilla2
[ 99%] Built target fastonosqlcore
[ 99%] Linking CXX executable ../build/bin/FastoNoSQL
/usr/bin/ld: cannot find -lcommon
/usr/bin/ld: cannot find -lcommon_qt
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/FastoNoSQL.dir/build.make:250: build/bin/FastoNoSQL] Error 1
make[1]: *** [CMakeFiles/Makefile2:130: src/CMakeFiles/FastoNoSQL.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
SEAPUNK commented 7 years ago

Figured out how to generate libcommon_qt. Good grief, this build process is very long. I think I got it now.

SEAPUNK commented 7 years ago

Well, I was able to create the binary, but now the problem is that it crashed when I try to connect to LevelDB.

17:12:49.445 FastoNoSQL [INFO] Logger inited
QXcbConnection: XCB error: 3 (BadWindow), sequence: 4514, resource id: 6896492, major code: 40 (TranslateCoords), minor code: 0
17:14:17.093 FastoNoSQL [ERROR] /home/ivan/fastnosql/fastonosql/src/core/leveldb/db_connection.cpp:318 Check failed: !err
FastoNoSQL: /home/ivan/fastnosql/fastonosql/src/common/macros.cpp:40: void handle_msg(const char*, int, const char*): Assertion `0' failed.
[1]    12667 abort (core dumped)  ./FastoNoSQL
topilski commented 7 years ago

Good day, please execute make install and when install folder will be ready execute sh bin/fastonosql.sh .

SEAPUNK commented 7 years ago

Nonono, I want to know the build process from the very beginning.

I first git clone the repo and then I cd into it. Now what commands do I run?

topilski commented 7 years ago

Please looked at build/build.py script

topilski commented 7 years ago

in .travis.yml

  - git clone https://github.com/fastogt/common.git
  - cd common
  - git submodule update --init --recursive
  - mkdir build
  - cd build
  - cmake .. -GNinja -DQT_ENABLED=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local
  - sudo ninja install
  - cd ../../
  - git submodule update --init --recursive
  - cd build
  - python build.py ..  // build fastonosql
  - python build.py .. fastoredis.txt // build fastoredis
SEAPUNK commented 7 years ago

Okay, thank you. I'll try that right now.

topilski commented 7 years ago

You can use make instead of the ninja, for common library changed cmake .. -G"Unix Makefiles" -DQT_ENABLED=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local

and python build.py .. /dev/null linux 64/32 make

def print_usage():
    print("Usage:\n"
        "[required] argv[1] cmake_root_path\n"
        "[optional] argv[2] branding_file_path\n"
        "[optional] argv[3] platform\n"
        "[optional] argv[4] architecture\n"
        "[optional] argv[5] packages for example(\"ninja\", \"make\")\n"
        "[optional] argv[6] packages for example(\"DEB RPM\")\n")
SEAPUNK commented 7 years ago

Yeah, it's not building the project for me. Not sure what's going on, oh well.

But anyways, I built that one binary before, and that make the program work, but it crashed when trying to connect to LevelDB. Any idea why?

topilski commented 7 years ago

this line 17:14:17.093 FastoNoSQL [ERROR] /home/ivan/fastnosql/fastonosql/src/core/leveldb/db_connection.cpp:318 Check failed: !err FastoNoSQL: /home/ivan/fastnosql/fastonosql/src/common/macros.cpp:40: void handle_msg(const char*, int, const char*): Assertion0' failed.` please build release version

topilski commented 7 years ago

You can download Linux binary here: http://fastonosql.com/download

SEAPUNK commented 7 years ago

The Linux binary requires libsasl ~2.1.25, /usr/lib/libsasl2.so.2. My OS is Arch Linux, which has libsasl 2.1.26, /usr/lib/libsasl2.so.3.

topilski commented 7 years ago

Oh Arch Linux, please create issue, this is my fault, sasl needed only for memcached, if you disable memcached link sasl library not needed. For release binary cmake .. -DCMAKE_BUILD_TYPE=RELEASE , disable memcached -DBUILD_WITH_MEMCACHED=OFF

SEAPUNK commented 7 years ago

Alright. I'll close this issue as well.

topilski commented 7 years ago

Also like hot fix, you can create symlink ln -s /usr/lib/libsasl2.so.3 /usr/lib/libsasl2.so.2