[Tarantool-patches] [PATCH v1 2/5] build: set include path to bootstrap.h

Igor Munkin imun at tarantool.org
Thu Oct 15 12:18:27 MSK 2020


Sasha,

Thanks for the patch! The patch LGTM per se, but this is just a partial
fix: there is no need to split this one and the following[1] into
separate patches; just move these changes out from gitlab-ci ones.

Furthermore, the commit message doesn't relate to the root problem at
all. This error occurs when bootstrap.h is generated outside the source
directory (as a result of the next patch, right?). So I propose the
following:
* join this patch with the following[1], since their separation breaks
  out of source build
* write the original purpose for these changes

Here is my version, feel free to adjust it on your own:
| build: generate bootstrap.h in CMAKE_BINARY_DIR
|
| Prior to these changes bootstrap.h was generated right in the source
| directory even for out of source build. Firstly such approach doesn't
| respect the idea of building outside the source files. Furthermore
| this leads to build failures when the source directory is located on
| read-only file system.
|
| As a result of the patch bootstrap.h is generated within the build
| tree and include directories are adjusted the corresponding way.

On 14.10.20, Alexander V. Tikhonov wrote:
> Running out-of-source build got the issue:
> 
>   /source/src/box/memtx_engine.c:48:23: fatal error: bootstrap.h: No such file or directory
> 
> To fix it added path to the header in cmake file.
> 
> Part of #4968
> ---
> 
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-4874-out-of-source-build-full-ci
> Issue: https://github.com/tarantool/tarantool/issues/4968
> 
>  src/box/CMakeLists.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt
> index 8b2e704cf..6e25401a1 100644
> --- a/src/box/CMakeLists.txt
> +++ b/src/box/CMakeLists.txt
> @@ -77,6 +77,7 @@ set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${lua_sources})
>  
>  include_directories(${ZSTD_INCLUDE_DIRS})
>  include_directories(${CMAKE_BINARY_DIR}/src/box/sql)
> +include_directories(${CMAKE_BINARY_DIR}/src/box)
>  
>  add_library(vclock STATIC vclock.c)
>  target_link_libraries(vclock core bit)
> -- 
> 2.25.1
> 

[1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-October/020159.html

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list