Skip to content
Snippets Groups Projects
  1. May 20, 2019
    • Alexander V. Tikhonov's avatar
      travis-ci: fix LTO and clang · e55396c8
      Alexander V. Tikhonov authored
      Made fixes:
      
      - Added CMAKE_EXTRA_PARAMS environment to docker's container
        runs to enable -DENABLE_LTO=ON/OFF cmake option.
      
      - Added CC/CXX environment to docker's container runs to set
        clang for cmake. Also the additional environment variables
        {CC,CXX}_FOR_BUILD were postponed, because we didn't
        run cross-compilation at the moment, for more info check:
      
          https://docs.travis-ci.com/user/languages/cpp/#choosing-compilers-to-test-against
      
      - Changed LTO docker's image to 'debian-buster' due to LTO needed
        higher versions of packages, check for more information commit:
      
          f9e28ce4 ('Add LTO support')
      
      - Fixed sources to avoid of failures on builds by GCC with LTO:
      
      1)  src/box/memtx_rtree.c: In function ‘mp_decode_rect’:
          src/box/memtx_rtree.c:86:24: error: ‘c’ may be used uninitialized
            in this function [-Werror=maybe-uninitialized]
              rect->coords[i * 2] = c;
                                  ^
          src/box/memtx_rtree.c:74:10: note: ‘c’ was declared here
            coord_t c;
                    ^
      
      2)  src/box/sql/func.c: In function ‘quoteFunc’:
          src/box/sql/func.c:1103:3: error: ‘b’ may be used uninitialized
            in this function [-Werror=maybe-uninitialized]
             sql_result_text(context, sql_value_boolean(argv[0]) ?
             ^
          src/box/sql/vdbeapi.c:217:7: note: ‘b’ was declared here
            bool b;
                 ^
      
      3)  src/box/tuple_update.c: In function ‘update_read_ops’:
          src/box/tuple_update.c:1022:4: error: ‘field_no’ may be used
            uninitialized in this function [-Werror=maybe-uninitialized]
              diag_set(ClientError, ER_NO_SUCH_FIELD_NO, field_no);
              ^
          src/box/tuple_update.c:1014:11: note: ‘field_no’ was declared here
             int32_t field_no;
                     ^
      
      4)  src/httpc.c: In function ‘httpc_set_verbose’:
          src/httpc.c:267:2: error: call to ‘_curl_easy_setopt_err_long’
            declared with attribute warning: curl_easy_setopt expects a long
            argument for this option [-Werror]
            curl_easy_setopt(req->curl_request.easy, CURLOPT_VERBOSE, curl_verbose);
            ^
      
      5)  src/lua/httpc.c: In function ‘luaT_httpc_request’:
          src/lua/httpc.c:128:64: error: ‘MEM[(int *)&parser + 20B]’ may be used
            uninitialized in this function [-Werror=maybe-uninitialized]
            lua_pushinteger(L, (parser.http_minor > 0) ? parser.http_minor: 0);
                                                                          ^
          src/lua/httpc.c:67:21: note: ‘MEM[(int *)&parser + 20B]’ was declared here
            struct http_parser parser;
                               ^
          src/lua/httpc.c:124:64: error: ‘MEM[(int *)&parser + 16B]’ may be used
            uninitialized in this function [-Werror=maybe-uninitialized]
            lua_pushinteger(L, (parser.http_major > 0) ? parser.http_major: 0);
                                                                          ^
          src/lua/httpc.c:67:21: note: ‘MEM[(int *)&parser + 16B]’ was declared here
            struct http_parser parser;
                               ^
      
      Close #4215
      Unverified
      e55396c8
  2. May 06, 2019
    • Alexander V. Tikhonov's avatar
      travis-ci: set jobs not to stop on failed tests · 5f87a3a3
      Alexander V. Tikhonov authored
      Added --force flag to travis-ci jobs not to stop on failed tests.
      Due to any found failed test breaks the testing it masks the other
      fails and in the following ways it's not good:
      - flaky test masks real problem
      - release testing needs overall result to fix it fast
      - parallel testing may produce flaky test
      
      Close: #4131
      Unverified
      5f87a3a3
  3. Apr 29, 2019
    • Alexander Turenko's avatar
      travis-ci: set right flags in release testing jobs · c308f35d
      Alexander Turenko authored
      It is important to have testing jobs that build the project with both
      -Werror and -O2 to keep the code clean. -O2 is needed, because some
      compiler warnings are available only after extra analyzing passes that
      are disabled with lesser optimization levels.
      
      The first attempt to add -Werror for release testing jobs was made in
      da505ee7 ('Add -Werror for CI (1.10
      part)'), but it mistakely doesn't enable -O2 for RelWithDebInfoWError
      build. It is possible to fix it in this way:
      
       | --- a/cmake/compiler.cmake
       | +++ b/cmake/compiler.cmake
       | @@ -113,10 +113,14 @@ set (CMAKE_C_FLAGS_DEBUG
       |      "${CMAKE_C_FLAGS_DEBUG} ${CC_DEBUG_OPT} -O0")
       |  set (CMAKE_C_FLAGS_RELWITHDEBINFO
       |      "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${CC_DEBUG_OPT} -O2")
       | +set (CMAKE_C_FLAGS_RELWITHDEBINFOWERROR
       | +    "${CMAKE_C_FLAGS_RELWITHDEBINFOWERROR} ${CC_DEBUG_OPT} -O2")
       |  set (CMAKE_CXX_FLAGS_DEBUG
       |      "${CMAKE_CXX_FLAGS_DEBUG} ${CC_DEBUG_OPT} -O0")
       |  set (CMAKE_CXX_FLAGS_RELWITHDEBINFO
       |      "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CC_DEBUG_OPT} -O2")
       | +set (CMAKE_CXX_FLAGS_RELWITHDEBINFOWERROR
       | +    "${CMAKE_CXX_FLAGS_RELWITHDEBINFOWERROR} ${CC_DEBUG_OPT} -O2")
       |
       |  unset(CC_DEBUG_OPT)
      
      However I think that a build type (and so `tarantool --version`) should
      not show whether -Werror was passed or not. So I have added
      ENABLE_WERROR CMake option for that. It can be set like so:
      
       | cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON
      
      Enabled the option in testing Travis-CI jobs with the RelWithDebInfo
      build type. Deploy jobs don't include it as before.
      
      Fixed all -Wmaybe-uninitialized and -Wunused-result warnings. A few
      notes about the fixes:
      
      * net.box does not validate received data in general, so I don't add a
        check for autoincrement IDs too. Set the ID to INT64_MIN, because this
        value is less probably will appear here in a normal case and so is the
        best one to signal a user that something probably going wrongly.
      * xrow_decode_*() functions could read uninitialized data from
        row->body[0].iov_base in xrow_on_decode_err() when printing a hex code
        for a row. It could be possible when the received msgpack was empty
        (row->bodycnt == 0), but there were expected keys (key_map != 0).
      * getcwd() is marked with __attribute__((__warn_unused_result__)) in
        glibc, but the buffer filled by this call is not used anywhere and so
        just removed.
      * Vinyl -Wmaybe-uninitialized warnings are false positive ones.
      
      Added comments and quotes into .travis.yml to ease reading. Removed
      "test" word from the CentOS 6 job name, because we don't run tests on
      this distro (disabled in the RPM spec).
      
      Fixes #4178.
      c308f35d
  4. Mar 25, 2019
  5. Mar 15, 2019
    • Alexander V. Tikhonov's avatar
      travis-ci: fix OS X Mojave 10.14 build · eb964471
      Alexander V. Tikhonov authored
      Fixed Mojave Mac build with setting MACOSX_DEPLOYMENT_TARGET environment
      variable for LuaJIT's Makefile. This variable specifies the minimum
      version of OS X on which the target binaries are to be deployed.
      
      The reason why we need to set MACOSX_DEPLOYMENT_TARGET to at least 10.6
      is that 10.4 SDK (which is set by default in LuaJIT's Makefile) is not
      longer included in Mac OS X Mojave 10.14.
      
      See also https://github.com/LuaJIT/LuaJIT/issues/484
      
      We already set -Wl,-macosx_version_min,10.6 (-macosx_version_min and
      MACOSX_DEPLOYMENT_TARGET are synonymous), but it affects only a linker.
      We possibly should remove -macosx_version_min, because it superseded by
      MACOSX_DEPLOYMENT_TARGET, but it should be done with verification that
      the original problem really fixed by the new way to set a deployment
      target. This is not part of this patch.
      
      Removed virtualenv usage in CI for OS X (so pip just installs packages
      into a system), because OS X Mojave 10.14 does not offer virtualenv by
      default.
      
      Fixed #3797
      Unverified
      eb964471
  6. Oct 25, 2018
  7. Oct 05, 2018
    • Alexander Turenko's avatar
      Add -Werror for CI (1.10 part) · da505ee7
      Alexander Turenko authored
      Added MAKE_BUILD_TYPE=RelWithDebInfoWError option, which means enabling
      -DNDEBUG=1, -O2 and -Wall -Wextra -Werror. This ensures we have clean
      release build without warnings.
      
      Fixed found -Wunused-variable and -Wunused-parameter warnings.
      
      Part of #3238.
      da505ee7
  8. Aug 07, 2018
  9. May 05, 2018
  10. 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
  11. Apr 11, 2018
  12. Apr 10, 2018
  13. Apr 09, 2018
  14. Feb 01, 2018
  15. Jan 31, 2018
  16. Jan 26, 2018
  17. Oct 13, 2017
  18. Oct 06, 2017
  19. Oct 05, 2017
  20. Sep 18, 2017
  21. Sep 15, 2017
  22. Sep 12, 2017
  23. Jun 16, 2017
    • Ilya's avatar
      Add HTTP client based on libcurl · 7e62ac79
      Ilya authored
      Inpspired by tarantool/curl module by Vasiliy Soshnikov.
      Reviewed and refactored by Roman Tsisyk.
      
      Closes #2083
      7e62ac79
  24. May 22, 2017
  25. May 11, 2017
    • Kirill Yukhin's avatar
      sql: Add dependency on TCL shell for linux in Travis · 21c3e29b
      Kirill Yukhin authored
      SQLite uses TCL shell to generate common headers.
      Add dependency in Travis to TCL shell for linux targets.
      OSX comes with TCL pre-installed - no need to add dependency.
      
      	* .travis.mk (deps_linux): Add tcl.
      
      sql: Add dependency to TCL in packages.
      
      As far as SQLite sources depend on TCLsh we need to
      add dependency to TCL in package info.
      
      	* debian/control: Add dependency on TCL.
      	* rpm/tarantool.spec: Ditto.
      	* snapcraft.yaml: Ditto.
      
      sql: Avoid multiline string to satisfy older cmake
      
      RHEL uses some old cmake which doesn't work with long string
      which span over few lines w/ '\' terminator. Make it single line.
      
      	* src/box/CMakeLists.txt (set_source_files_properties): Use
      	single line instead of vreaks w/ '\'.
      21c3e29b
  26. May 04, 2017
  27. Feb 27, 2017
Loading