typesense / typesense/typesense
Problems in building typesense in ubuntu
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.6k
- Forks
- 973
- Avg merge
- 18h 45m
- Merged PRs (30d)
- 4
Description
Description
I think I've installed the required dependencies in guidance, but still ran into building error.And it seems like it's not the problem of my local environment but the network issues when downloading third-party dependencies in cmake directory.
Steps to reproduce
./build.sh --create-binary [--clean] [--depclean]
Expected Behavior
I expect to have a successful executable file output.
Actual Behavior
Error:
CMake Error at cmake/H2O.cmake:28 (message):
h2o-2.3.0-beta2 configure failed!
Call Stack (most recent call first):
CMakeLists.txt:50 (include)
Previous info:
tomgeller@tomgeller-VMware-Virtual-Platform:~/桌面/typesense-0.12.0$ ./build.sh --create-binary [--clean] [--depclean]
++ dirname ./build.sh
++ read a
++ cd .
++ pwd
++ break
+ PROJECT_DIR=/home/tomgeller/桌面/typesense-0.12.0
++ uname -s
+ SYSTEM_NAME=Linux
+ BUILD_DIR=build-Linux
+ '[' -z '' ']'
+ TYPESENSE_VERSION=nightly
+ [[ --create-binary [--clean] [--depclean] == *\-\-\c\l\e\a\n* ]]
+ echo Cleaning...
Cleaning...
+ rm -rf /home/tomgeller/桌面/typesense-0.12.0/build-Linux
+ mkdir /home/tomgeller/桌面/typesense-0.12.0/build-Linux
+ [[ --create-binary [--clean] [--depclean] == *\-\-\d\e\p\c\l\e\a\n* ]]
+ echo 'Cleaning dependencies...'
Cleaning dependencies...
+ rm -rf /home/tomgeller/桌面/typesense-0.12.0/external-Linux
+ mkdir /home/tomgeller/桌面/typesense-0.12.0/external-Linux
+ cmake -DTYPESENSE_VERSION=nightly -DCMAKE_BUILD_TYPE=Release -H/home/tomgeller/桌面/typesense-0.12.0 -B/home/tomgeller/桌面/typesense-0.12.0/build-Linux
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.a (found suitable version "3.0.13", minimum required is "1.1.1")
-- Found Snappy: /usr/lib/x86_64-linux-gnu/libsnappy.a
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.a (found version "1.3")
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.a (found version "8.5.0")
-- Found ICU header files in /usr/include
-- Found ICU libraries: /usr/lib/x86_64-linux-gnu/libicuuc.a
-- Found Protobuf: /usr/local/lib/libprotobuf.a (found version "3.14.0")
-- Found LevelDB: /usr/include
-- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.a)
OpenSSL library: /usr/lib/x86_64-linux-gnu/libssl.a;/usr/lib/x86_64-linux-gnu/libcrypto.a
-- Downloading libfor...
-- Extracting libfor...
Building libfor locally...
/usr/bin/cc -pedantic -Wall -Wextra -O3 -c for.c
ar rvs libfor.a for.o
ar: 正在创建 libfor.a
a - for.o
/usr/bin/cc -pedantic -Wall -Wextra -O3 -o benchmark benchmark.c libfor.a
benchmark.c: In function ‘run’:
benchmark.c:52:13: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
52 | VERIFY(s1 == s2);
| ^~
benchmark.c:21:31: note: in definition of macro ‘VERIFY’
21 | #define VERIFY(c) while (!c) { \
| ^
benchmark.c:21:30: note: add parentheses around left hand side expression to silence this warning
21 | #define VERIFY(c) while (!c) { \
| ^
benchmark.c:52:3: note: in expansion of macro ‘VERIFY’
52 | VERIFY(s1 == s2);
| ^~~~~~
benchmark.c:53:13: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
53 | VERIFY(s2 == s3);
| ^~
benchmark.c:21:31: note: in definition of macro ‘VERIFY’
21 | #define VERIFY(c) while (!c) { \
| ^
benchmark.c:21:30: note: add parentheses around left hand side expression to silence this warning
21 | #define VERIFY(c) while (!c) { \
| ^
benchmark.c:53:3: note: in expansion of macro ‘VERIFY’
53 | VERIFY(s2 == s3);
| ^~~~~~
/usr/bin/cc -pedantic -Wall -Wextra -O3 -o test test.c libfor.a
echo "please run unit tests by running ./test"
please run unit tests by running ./test
-- Downloading h2o-2.3.0-beta2...
-- Extracting h2o-2.3.0-beta2...
Configuring h2o-2.3.0-beta2...
CMake Error: The source directory "/home/tomgeller/桌面/typesense-0.12.0/external-Linux/h2o-2.3.0-beta2" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Metadata
Typesense Version:typesense-v0.12.0
OS:Ubuntu
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with build.sh and reproduce using ./build.sh --create-binary --clean --depclean on Ubuntu. Then inspect cmake/H2O.cmake, CMakeLists.txt, and the extracted external-Linux/h2o-2.3.0-beta2 directory to determine why it lacks CMakeLists.txt. Done means the H2O dependency configures and the build produces the expected executable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100