Open davidshiz opened 1 year ago
Can you acess github? this var comes from git at compiling stage. pls check your dev env. Thanks. @davidshiz
Can you acess github? this var comes from git at compiling stage. pls check your dev env. Thanks. @davidshiz I can access github,the reason for this error is personal repo in github have no tag.
Not a bug, Close it now.
in CMakeLists.txt
838 EXECUTE_PROCESS(COMMAND bash "-c" "git describe --tags `git rev-list --tags --max-count=1` |head -n 1 |awk -F'-' '{print $2}'"
839 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
840 OUTPUT_VARIABLE ER_TAG_NAME)
841 string(STRIP "${ER_TAG_NAME}" ER_TAG_NAME)
842
843 SET(STONEDB_REPO_ADDR "${ER_REPO_NAME}:${ER_BRANCH_NAME}")
844 SET(STONEDB_BRANCH_NAME "${ER_BRANCH_NAME}")
845 SET(STONEDB_COMMIT_ID "${ER_COMMIT_ID}")
846 SET(STONEDB_COMMIT_TIME "${ER_COMMIT_TIME}")
847 SET(STONEDB_BUILD_TIME "Date: ${ER_BUILD_TIME}")
848 SET(STONEDB_TAG_NAME "${ER_TAG_NAME}")
when you can not get TAG_NAME, we define a TAG_NAME
variable with empty value to make sure that cmake will generate this variable properly.
Hello, how to solve this error, we have encountered it now
@lifengfan13 You can have a try in this way. Just add an empty tag by git command git tag -a ...
.
@lifengfan13 You can have a try in this way. Just add an empty tag by git command
git tag -a ...
.
Thanks, I'll try it
hello, I still have a bug.
/stonedb/sql/mysqld.cc: In function ‘void print_build_info()’:
/stonedb/sql/mysqld.cc:7049:33: error: ‘STONEDB_BRANCH_NAME’ was not declared in this scope
7049 | printf("\tBranch name: %s\n", STONEDB_BRANCH_NAME);
| ^~~~~~~~~~~~~~~~~~~
/stonedb/sql/mysqld.cc:7050:36: error: ‘STONEDB_COMMIT_ID’ was not declared in this scope
7050 | printf("\tLast commit ID: %s\n", STONEDB_COMMIT_ID);
| ^~~~~~~~~~~~~~~~~
/stonedb/sql/mysqld.cc:7051:38: error: ‘STONEDB_COMMIT_TIME’ was not declared in this scope; did you mean ‘STONEDB_BUILD_TIME’?
7051 | printf("\tLast commit time: %s\n", STONEDB_COMMIT_TIME);
| ^~~~~~~~~~~~~~~~~~~
| STONEDB_BUILD_TIME
/stonedb/sql/mysqld.cc: In function ‘void set_server_version()’:
/stonedb/sql/mysqld.cc:8134:31: error: ‘STONEDB_TAG_NAME’ was not declared in this scope
8134 | static_cast<int>(sizeof(STONEDB_TAG_NAME)))
STONEDB_BRANCH_NAME
Is your env. clean? First time to make build? I'll try to reproduce in my machine.
STONEDB_BRANCH_NAME
Is your env. clean? First time to make build? I'll try to reproduce in my machine.
I compiled it for the first time, according to the official website dockers tutorial. The system environment is Ubuntu 2022 x86_64 x86_64 x86_64 GNU/Linux.
@lifengfan13 You can change the stonedb/CMakeLists.txt file, line 848
SET(STONEDB_TAG_NAME "${ER_TAG_NAME}")
to SET(STONEDB_TAG_NAME "V103")
, can temporarily solve this problem
Thanks,I'll try .
I am git clone repo on the host, and then mount it in docker, so these variables cannot be obtained. must be run command git config --global --add safe.directory /stonedb .
I am git clone repo on the host, and then mount it in docker, so these variables cannot be obtained. must be run command git config --global --add safe.directory /stonedb .
what result does the following command get on your instance ?
git describe --tags `git rev-list --tags --max-count=1` |head -n 1 |awk -F'-' '{print $2}'
I am git clone repo on the host, and then mount it in docker, so these variables cannot be obtained. must be run command git config --global --add safe.directory /stonedb .
what result does the following command get on your instance ?
git describe --tags `git rev-list --tags --max-count=1` |head -n 1 |awk -F'-' '{print $2}'
It has been compiled successfully! Thanks.
Have you read the Contributing Guidelines on issues?
Please confirm if bug report does NOT exists already ?
Describe the problem
When fock a branch in your own code repo, you cannot compile successfully. because your own code repo have no tag. It is recommended to decouple from tags when compiling code.
Expected behavior
No response
How To Reproduce
No response
Environment
Are you interested in submitting a PR to solve the problem?