Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building #9

Closed
SEAPUNK opened this issue Oct 19, 2016 · 16 comments
Closed

Building #9

SEAPUNK opened this issue Oct 19, 2016 · 16 comments

Comments

@SEAPUNK
Copy link

SEAPUNK commented Oct 19, 2016

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
Copy link
Author

SEAPUNK commented Oct 19, 2016

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
Copy link
Author

SEAPUNK commented Oct 19, 2016

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

@SEAPUNK
Copy link
Author

SEAPUNK commented Oct 19, 2016

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
Copy link
Member

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

@SEAPUNK
Copy link
Author

SEAPUNK commented Oct 20, 2016

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
Copy link
Member

Please looked at build/build.py script

@topilski
Copy link
Member

topilski commented Oct 20, 2016

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
Copy link
Author

SEAPUNK commented Oct 20, 2016

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

@topilski
Copy link
Member

topilski commented Oct 20, 2016

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
Copy link
Author

SEAPUNK commented Oct 20, 2016

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
Copy link
Member

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
Copy link
Member

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

@SEAPUNK
Copy link
Author

SEAPUNK commented Oct 20, 2016

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
Copy link
Member

topilski commented Oct 20, 2016

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
Copy link
Author

SEAPUNK commented Oct 20, 2016

Alright. I'll close this issue as well.

@SEAPUNK SEAPUNK closed this as completed Oct 20, 2016
@topilski
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants