Skip to content
Snippets Groups Projects
  1. Nov 10, 2023
    • Vladimir Davydov's avatar
      cmake: allow to bundle static dependencies in main project · f3b31aee
      Vladimir Davydov authored
      The BUILD_STATIC cmake config option forces the build system link
      Tarantool binary statically with its dependencies. It expects that all
      static libraries on which Tarantool binary depends are available at
      build time.
      
      We don't use this option directly to create static binaries because it
      would produce different results on different build systems. Instead, we
      use the separate cmake config located in the static-build directory,
      which fetches all Tarantool dependencies from a predefined location
      before building a static binary.
      
      Having a separate cmake config is inconvenient. Let's enable bundling of
      static binary dependencies right in the main project cmake config, like
      we bundle, for example, libcurl. To achieve that, the new build option
      was introduced BUILD_STATIC_WITH_BUNDLED_LIBS. It implies BUILD_STATIC
      and also fetches and builds all required dependencies, like the
      static-build cmake config used to. The latter doesn't do it anymore;
      from now on, it just sets BUILD_STATIC_WITH_BUNDLED_LIBS when building
      Tarantool. We can't remove the static-build cmake config yet because
      there are quire a few CI workflows depending on it.
      
      Note that, just like BUILD_STATIC, BUILD_STATIC_WITH_BUNDLED_LIBS
      doesn't imply OPENSSL_USE_STATIC_LIBS so the latter should be set
      explicitly if one wants to use the static openssl library. However,
      setting OPENSSL_USE_STATIC_LIBS with BUILD_STATIC_WITH_BUNDLED_LIBS will
      force the build system use bundled static openssl library.
      
      This patch is relatively straightforward. It just moves the external
      projects from /static-build/cmake/AddDependencyProjects.cmake to /cmake
      adding build dependencies where required and setting variables that are
      set by the corresponding /cmake/FindXXX.cmake configs.
      
      There are a few things that should be noted separately though:
       - We dropped the ZLIB_FOUND check from the main project cmake config.
         It was used for building EE but the latter is going to be broken
         anyway once this patch is committed. We'll fix it in following
         commits.
       - FindLibUnwind referenced zlib library by ZLIB::ZLIB. We don't set
         it for bundled zlib so let's use ZLIB_LIBRARIES instead.
       - We don't need to detect dependency cflags while building bundled
         libraries as we can reuse the flags set by the main project.
       - We don't use HARDENING_LDFLAGS because it makes no sense when
         building static libraries.
      
      Closes #9242
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      
      (cherry picked from commit 98b38e89)
      f3b31aee
  2. Aug 22, 2023
    • Timur Safin's avatar
      debugger: proper readline support · df7675dc
      Timur Safin authored
      Implemented readline history and autocomplete by reusing
      readline facilities of Tarantool console. They used to be
      being hidden once Lua 'console' module is loaded. With c432e9e9
      (lua: don't use public module name as internal one), now they
      are available as 'console.lib'.
      
      Closes #7738
      
      NO_TEST=covered by refactored console_debugger_session_test.lua
      
      @TarantoolBot document
      Title: proper readline support in readline
      
      Similar to tarantool interactive console, tdbg now uses readline
      for its shell. It enables handier input editing, command history
      and so on.
      
      (cherry picked from commit 92222451)
      df7675dc
  3. Mar 06, 2023
    • Mergen Imeev's avatar
      test: add rule to ignore Makefile · df062b6a
      Mergen Imeev authored
      This patch adds a rule to ignore the Makefile on the path test/*/*/.
      
      NO_DOC=No need, changes in .gitignore
      NO_TEST=No need, changes in .gitignore
      NO_CHANGELOG=No need, changes in .gitignore
      
      (cherry picked from commit 25d93952)
      df062b6a
  4. Feb 10, 2023
    • Vladimir Davydov's avatar
      static-build: move all patches to patches sub-directory · b8ec809e
      Vladimir Davydov authored
      We're going to add a whole bunch of them. Putting them all in
      a sub-directory will help keeping the file tree organized.
      
      Note, we have to update .gitignore so that the patches/ sub-directory
      is ignored only at the top level (it's used by quilt).
      
      NO_DOC=build
      NO_TEST=build
      NO_CHANGELOG=build
      b8ec809e
  5. Oct 20, 2022
  6. Jul 01, 2022
    • Yaroslav Lobankov's avatar
      test: fix running 'small' lib tests for OOS build · 28426f67
      Yaroslav Lobankov authored
      The 'small' lib test suite was not run for out-of-source builds since
      the wrong symlink was created for test binaries and test-run couldn't
      find them. Now it is fixed.
      
      When test-run loads tests, first, it searches the suite.ini file and if
      it exists test-run consider the dir as a test suite. So there was sense
      to create a permanent link for 'small' lib tests.
      
      Closes #4485
      
      NO_DOC=testing stuff
      NO_TEST=testing stuff
      NO_CHANGELOG=testing stuff
      28426f67
  7. May 06, 2022
    • Yaroslav Lobankov's avatar
      cleanup: delete old unused files · eaf96984
      Yaroslav Lobankov authored
      It looks like we have some files in the source tree that are not used
      anymore. So there is no sense to keep them.
      Files to be deleted: .appveyor.yml, Jenkinsfile, snapcraft.yaml.
      
      NO_DOC=files removal
      NO_TEST=files removal
      NO_CHANGELOG=files removal
      eaf96984
  8. Mar 03, 2022
    • mechanik20051988's avatar
      msgpack: add stubs for compressed data support · 55f968b4
      mechanik20051988 authored
      This commit add stub functions for compressed data
      support. Add new MP_EXT type MP_COMPRESSION. Despite
      the fact that this type is added to open source version
      all functions for working with it are implemented only
      in enterprise version of tarantool. In open source version
      add stubs for appropriate functions.
      
      Part of #2695
      
      NO_CHANGELOG=stubs for enterprise version
      NO_DOC=stubs for enterprise version
      55f968b4
  9. Dec 28, 2021
  10. Dec 10, 2021
  11. Aug 12, 2021
  12. Aug 09, 2021
    • Leonid Vasiliev's avatar
      cmake: hide tarantool symbols back · 5ceabb37
      Leonid Vasiliev authored
      After unhiding all internal symbols([1]) we experience a bunch of
      problems ([2], [3]). The second one (clash of symbols from different version
      of the "small" library) still have no good solution.
      You can find more on the topic [4].
      
      The situation for tarantool executable is the same as for any other library.
      A library should expose only its public API and should not increase probability
      of hard to debug problems due to clash of a user's code with an internal name
      from the library.
      
      Let's hide all symbols by default and create a list of exported symbols.
      (In fact, this patch is a revert of the patch
      03790ac5 ([5]) taking into account the changes
      made to the code)
      
      Explanation of adding some controversial symbols to the export list:
      
      * The following symbols are used in shared libraries used in tests
        ("cfunc*.so", "sql_uuid.so", "gh-6024-funcs-return-bin.so", "function1.so",
        "gh-5938-wrong-string-length.so", "module_api.so")
      
          mp_check
          mp_encode_array
          mp_encode_bin
          mp_encode_bool
          mp_encode_int
          mp_encode_map
          mp_encode_nil
          mp_encode_str
          mp_encode_uint
          mp_decode_array_slowpath
          mp_decode_str
          mp_next_slowpath
          mp_load_u8
          mp_next
          mp_sizeof_array
          mp_sizeof_str
          mp_type_hint
          decimal_from_string
      
      * These symbols are used in "crypto.lua" and, if absent, will lead to the
        failure of the "static_build_cmake_linux" on CI (the crypto prefix was
        used to avoid the clashes of names)
      
          crypto_ERR_error_string
          crypto_ERR_get_error
          crypto_EVP_DigestInit_ex
          crypto_EVP_DigestUpdate
          crypto_EVP_DigestFinal_ex
          crypto_EVP_get_digestbyname
          crypto_HMAC_Init_ex
          crypto_HMAC_Update
          crypto_HMAC_Final
      
      * For correct work of "schema.lua" in the "static_build_cmake_linux"
      
          rl_get_screen_size
      
      * The following symbols are used in "ssl-cert-paths-discover.test.lua"
        (I think these symbols will have to be wrapped in the to avoid clashes
        problems)
      
          X509_get_default_cert_dir_env
          X509_get_default_cert_file_env
          ssl_cert_paths_discover
      
      From "exports.test.lua" have been removed ZSTD symbols checking (see [6]) and
      "tt_uuid_str" (see [7]).
      
      1. https://github.com/tarantool/tarantool/issues/2971
      2. https://github.com/tarantool/tarantool/issues/5001
      3. https://github.com/tarantool/memcached/issues/59
      4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html
      5. https://github.com/tarantool/tarantool/commit/03790ac5510648d1d9648bb2281857a7992d0593
      6. https://github.com/tarantool/tarantool/issues/4225
      7. https://github.com/tarantool/tarantool/commit/acf8745ed8fef47e6d1f1c31708c7c9d6324d2f3
      
      Part of #5932
      5ceabb37
  13. Oct 16, 2020
  14. Sep 25, 2020
    • Sergey Bronnikov's avatar
      gitignore: ignore directories made on running jepsen tests · 25fc1c06
      Sergey Bronnikov authored
      On running Jepsen tests created directory with Terraform state and directory
      with Jepsen tests source code in a build directory. Everything is ok on using
      out of source build in a separate directory, but with building in a project
      root directory these directories appears in `git status` output. This patch add
      ignores for these directories.
      25fc1c06
  15. Sep 15, 2020
    • HustonMmmavr's avatar
      build: refactor static build process · 800e5ed6
      HustonMmmavr authored
      
      Refactored static build process to use static-build/CMakeLists.txt
      instead of Dockerfile.staticbuild (this allows to support static
      build on macOS). Following third-party dependencies for static build
      are installed via cmake `ExternalProject_Add`:
        - OpenSSL
        - Zlib
        - Ncurses
        - Readline
        - Unwind
        - ICU
      
      * Added support static build for macOS
      * Fixed `CONFIGURE_COMMAND` while building bundled libcurl for static
        build at file cmake/BuildLibCURL.cmake:
          - disable building shared libcurl libraries (by setting
            `--disable-shared` option)
          - disable hiding libcurl symbols (by setting
            `--disable-symbol-hiding` option)
          - prevent linking libcurl with system libz (by setting
            `--with-zlib=${FOUND_ZLIB_ROOT_DIR}` option)
      * Removed Dockerfile.staticbuild
      * Added new gitlab.ci jobs to test new style static build:
        - static_build_cmake_linux
        - static_build_cmake_osx_15
      * Removed static_docker_build gitlab.ci job
      
      Closes #5095
      
      Co-authored-by: default avatarYaroslav Dynnikov <yaroslav.dynnikov@gmail.com>
      800e5ed6
  16. May 18, 2020
    • Vladislav Shpilevoy's avatar
      cmake: remove dynamic-list linker option · 03790ac5
      Vladislav Shpilevoy authored
      dynamic-list (exported_symbols_list on Mac) was used to forbid
      export of all symbols of the tarantool executable except a given
      list. Motivation of that was to avoid hacking the linker with
      false usage of symbols needed to be exported. As a consequence,
      symbols not listed in these options became invisible.
      
      Before these options, when a symbol was defined, but not used in
      the final executable, the linker could throw it away, even though
      many symbols were used by Lua FFI, or should be visible for user's
      dynamic modules. Where the linker, obviously, can't see if they
      are needed.
      
      To make the linker believe the symbols are actually needed there
      was a hack with getting pointers at these functions and doing
      something with them.
      
      For example, assume we have 'test()' function in 'box' static
      library:
      
          int
          test(void);
      
      It is not used anywhere in the final executable. So to trick the
      linker there is a function 'export_syms()' declared, which takes a
      pointer at 'test()' and seemingly does something with it (or
      actually does - it does not matter):
      
          void
          export_syms()
          {
              void *syms[] = {test};
              if (time(NULL) == 0) {
                  syms[0]();
                  syms[1]();
                  ...
              }
          }
      
      Some users want to use not documented but visible symbols, so the
      patch removes the dynamic-list option, and returns the linker
      hack back. But with 0 dependencies in the export file.
      
      Closes #2971
      03790ac5
  17. Mar 26, 2020
    • Cyrill Gorcunov's avatar
      test: unit/popen -- provide a child process · 12086678
      Cyrill Gorcunov authored
      
      Testing via plain C interface with a shell is not stable,
      the shell might simply be misconfigured or not found and
      we will simply stuck forever (the signal handling in libev
      is tricky and requires at least idle cycles or similar to
      pass event processing). Thus lets rather run a program we
      know is presenting in the system (popen-child executable).
      
      Fixes #4811
      
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
      12086678
  18. Dec 17, 2019
  19. Sep 10, 2019
    • Igor Munkin's avatar
      test: move luajit-tap suite to luajit repo · 43575303
      Igor Munkin authored
      * All test chunks related to luajit were moved from tarantool source
      tree to the luajit repo
      * Adjusted CMakeLists via creating a symlink to luajit test directory
      to fix out-of-source tests
      
      Closed #4478
      43575303
  20. Jun 16, 2019
  21. Mar 02, 2019
  22. Oct 12, 2018
  23. Apr 22, 2018
    • Alexander Turenko's avatar
      Remove autogenerated files · 1473e30e
      Alexander Turenko authored
      Rewrote TCL scripts as posix shell ones, enabled SQL_MAINTAINER_MODE
      commands unconditionally.
      
      Rewrote cmake targets to generate those files in a build directory
      instead of the source directory.
      
      Fixes #3183.
      1473e30e
  24. Jul 14, 2017
  25. May 05, 2017
    • Nick Zavaritsky's avatar
      Check in sqlite 3.16.2 · d0a9dfed
      Nick Zavaritsky authored
      * do not include autotools build files
      
      sql: [#2387] [#2267] Cleanup unused SQLite fines.
      
      sql: Checkin SQLite test coverage
      
      sql: Remove TCL-based tests
      
      Remove sqlite-tcl testsuite along with all TCL-relared libs.
      Clean up sqlite's CMakeLists and remove redundant TCL-related
      sources.
      
      	* src/lib/sqlite/CMakeLists.txt: Remove dependency on TCL library.
      	* src/lib/sqlite/src/CMakeLists.txt: Remove testfixture target.
      	* src/lib/sqlite/src/test.*: Remove.
      	* src/lib/sqlite/src/sqlite3.rc: Ditto.
      	* src/lib/sqlite/src/tclsqlite.c: Ditto.
      	* src/lib/sqlite/ext: Ditto.
      	* test/sqlite-tcl: Ditto.
      
      Add -o option in lemon (output file name)
      
      This is necessary for out-of-source CMake builds.
      
      Use dummy commit date and UUID in sqlite3.h
      
      Last commit date and UUID are included in generated sqlite3.h. We don't
      distribute standalone sqlite, and Tarantool itself is already
      version-stamped.
      
      sqlite: Add VERSION
      Implement CMake build rules for sqlite.
      d0a9dfed
  26. Mar 28, 2017
  27. Oct 06, 2016
  28. Sep 01, 2016
  29. Aug 30, 2016
  30. Aug 19, 2016
  31. Aug 03, 2016
  32. Jun 09, 2016
  33. May 16, 2016
  34. May 11, 2016
  35. Feb 18, 2016
  36. Feb 09, 2016
  37. Feb 01, 2016
  38. Jan 22, 2016
Loading