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

build: Failed to build Tarantool on MacOS with -DENABLE_BUNDLED_ZSTD=OFF #6162

Open
olegrok opened this issue Jun 18, 2021 · 2 comments
Open
Labels
bug Something isn't working build good first issue Good for newcomers osx

Comments

@olegrok
Copy link
Collaborator

olegrok commented Jun 18, 2021

Failed to build Tarantool 2.9.0-101-gc7f8fe0b2 on MacOS BigSur 11.4 with -DENABLE_BUNDLED_ZSTD=OFF

cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON -DENABLE_FEEDBACK_DAEMON=OFF -DENABLE_BUNDLED_LIBCURL=OFF -DENABLE_BUNDLED_ZSTD=OFF -DZSTD_INCLUDE_DIR=/usr/local/opt/zstd/include && make -j
...
Consolidate compiler generated dependencies of target box
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.c:31:
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.h:44:
/Users/o.babin/Projects/tarantool/src/box/xlog.h:40:10: fatal error: 'zstd.h' file not found
#include "zstd.h"
         ^~~~~~~~
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.c:31:
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.h:44:
/Users/o.babin/Projects/tarantool/src/box/xlog.h:40:10: fatal error: 'zstd.h' file not found
#include "zstd.h"
         ^~~~~~~~
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_range.c:49:
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.h:44:
/Users/o.babin/Projects/tarantool/src/box/xlog.h:40:10: fatal error: 'zstd.h' file not found
#include "zstd.h"
         ^~~~~~~~
1 error generated.
make[2]: *** [test/unit/CMakeFiles/vy_point_lookup.test.dir/__/__/src/box/vy_range.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_write_iterator.c:33:
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.h:44:
/Users/o.babin/Projects/tarantool/src/box/xlog.h:40:10: fatal error: 'zstd.h' file not found
#include "zstd.h"
         ^~~~~~~~
1 error generated.
1 error generated.
make[2]: *** [test/unit/CMakeFiles/vy_write_iterator.test.dir/__/__/src/box/vy_run.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [test/unit/CMakeFiles/vy_point_lookup.test.dir/__/__/src/box/vy_run.c.o] Error 1
[ 79%] Linking CXX executable xrow.test
1 error generated.
make[2]: *** [test/unit/CMakeFiles/vy_write_iterator.test.dir/__/__/src/box/vy_write_iterator.c.o] Error 1
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_write_iterator.c:33:
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.h:44:
/Users/o.babin/Projects/tarantool/src/box/xlog.h:40:10: fatal error: 'zstd.h' file not found
#include "zstd.h"
         ^~~~~~~~
1 error generated.
make[2]: *** [test/unit/CMakeFiles/vy_point_lookup.test.dir/__/__/src/box/vy_write_iterator.c.o] Error 1
[ 79%] Built target xrow.test
In file included from /Users/o.babin/Projects/tarantool/test/unit/vy_point_lookup.c:5:
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.h:44:
/Users/o.babin/Projects/tarantool/src/box/xlog.h:40:10: fatal error: 'zstd.h' file not found
#include "zstd.h"
         ^~~~~~~~
1 error generated.
make[2]: *** [test/unit/CMakeFiles/vy_point_lookup.test.dir/vy_point_lookup.c.o] Error 1
[ 79%] Linking CXX executable vy_mem.test
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_point_lookup.c:46:
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.h:44:
/Users/o.babin/Projects/tarantool/src/box/xlog.h:40:10: fatal error: 'zstd.h' file not found
#include "zstd.h"
         ^~~~~~~~
1 error generated.
make[1]: *** [test/unit/CMakeFiles/vy_write_iterator.test.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [test/unit/CMakeFiles/vy_point_lookup.test.dir/__/__/src/box/vy_point_lookup.c.o] Error 1
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_lsm.c:52:
In file included from /Users/o.babin/Projects/tarantool/src/box/vy_run.h:44:
/Users/o.babin/Projects/tarantool/src/box/xlog.h:40:10: fatal error: 'zstd.h' file not found
#include "zstd.h"
         ^~~~~~~~
[ 79%] Linking CXX executable vy_cache.test
...
@olegrok olegrok added build bug Something isn't working labels Jun 18, 2021
@olegrok
Copy link
Collaborator Author

olegrok commented Jun 18, 2021

This patch helps me:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e4e630a5..2c280706f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -383,6 +383,7 @@ if (ENABLE_BUNDLED_ZSTD)
 else()
     set(ZSTD_FIND_REQUIRED ON)
     find_package(ZSTD)
+    include_directories(${ZSTD_INCLUDE_DIR})
 endif()
 
 #

After this patch fails because of #6145. And it seems to be OK if diff applied on top of #6145.

➜  tarantool git:(master) ✗ otool -L src/tarantool
src/tarantool:
	/usr/local/opt/icu4c/lib/libicui18n.69.dylib (compatibility version 69.0.0, current version 69.1.0)
	/usr/local/opt/icu4c/lib/libicuuc.69.dylib (compatibility version 69.0.0, current version 69.1.0)
	/usr/local/opt/icu4c/lib/libicudata.69.dylib (compatibility version 69.0.0, current version 69.1.0)
	/usr/local/opt/readline/lib/libreadline.8.dylib (compatibility version 8.1.0, current version 8.1.0)
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/usr/lib/libform.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/usr/local/opt/curl/lib/libcurl.4.dylib (compatibility version 12.0.0, current version 12.0.0)
	/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
	/usr/local/opt/openssl@1.1/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/usr/local/opt/zstd/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 905.6.0)

@Totktonada Totktonada added the osx label Jun 18, 2021
@Totktonada
Copy link
Member

Verified the build on Linux (@olegrok asked me). Checked out the latest master (c7f8fe0), applied PR #6145 patches, applied the patch above. Built with external ZSTD:

$ cmake . -DCMAKE_BUILD_TYPE=Debug -DENABLE_BACKTRACE=ON -DENABLE_DIST=ON -DENABLE_FEEDBACK_DAEMON=OFF -DENABLE_BUNDLED_LIBCURL=OFF -DENABLE_BUNDLED_ZSTD=OFF && make -j

It is successful.

@kyukhin kyukhin added good first issue Good for newcomers teamQ labels Jun 25, 2021
@kyukhin kyukhin added this to the 2.9.1 milestone Jun 25, 2021
@kyukhin kyukhin modified the milestones: 2.9.1, 2.10.1 Aug 19, 2021
@kyukhin kyukhin modified the milestones: 2.10.0-rc1, 2.10.1 Dec 30, 2021
@kyukhin kyukhin modified the milestones: 2.10.0, 2.11.0 Jun 1, 2022
@kyukhin kyukhin removed this from the 2.11.0 milestone Aug 25, 2022
@TarantoolBot TarantoolBot removed the teamX label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build good first issue Good for newcomers osx
Projects
None yet
Development

No branches or pull requests

4 participants