mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Disable harmful env var check to workaround failure to start the server
This commit is contained in:
parent
7c23e48b5b
commit
dcc8751685
@ -322,6 +322,12 @@ endif()
|
|||||||
|
|
||||||
clickhouse_add_executable (clickhouse main.cpp)
|
clickhouse_add_executable (clickhouse main.cpp)
|
||||||
|
|
||||||
|
if (NOT USE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES)
|
||||||
|
# Shared split (dev) build: In CI, the server is run with custom LD_LIBRARY_PATH. This makes the harmful env check re-execute the
|
||||||
|
# process in a clean environment but as in CI the containing directory is not included in DT_RUNPATH/DT_RPATH, the server won't come up.
|
||||||
|
target_compile_definitions(clickhouse PRIVATE DISABLE_HARMFUL_ENV_VAR_CHECK)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# A library that prevent usage of several functions from libc.
|
# A library that prevent usage of several functions from libc.
|
||||||
if (ARCH_AMD64 AND OS_LINUX AND NOT OS_ANDROID)
|
if (ARCH_AMD64 AND OS_LINUX AND NOT OS_ANDROID)
|
||||||
set (HARMFUL_LIB harmful)
|
set (HARMFUL_LIB harmful)
|
||||||
|
@ -345,6 +345,7 @@ struct Checker
|
|||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef DISABLE_HARMFUL_ENV_VAR_CHECK
|
||||||
/// NOTE: We will migrate to full static linking or our own dynamic loader to make this code obsolete.
|
/// NOTE: We will migrate to full static linking or our own dynamic loader to make this code obsolete.
|
||||||
void checkHarmfulEnvironmentVariables(char ** argv)
|
void checkHarmfulEnvironmentVariables(char ** argv)
|
||||||
{
|
{
|
||||||
@ -396,6 +397,7 @@ void checkHarmfulEnvironmentVariables(char ** argv)
|
|||||||
_exit(error);
|
_exit(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +424,9 @@ int main(int argc_, char ** argv_)
|
|||||||
/// will work only after additional call of this function.
|
/// will work only after additional call of this function.
|
||||||
updatePHDRCache();
|
updatePHDRCache();
|
||||||
|
|
||||||
|
#ifndef DISABLE_HARMFUL_ENV_VAR_CHECK
|
||||||
checkHarmfulEnvironmentVariables(argv_);
|
checkHarmfulEnvironmentVariables(argv_);
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Reset new handler to default (that throws std::bad_alloc)
|
/// Reset new handler to default (that throws std::bad_alloc)
|
||||||
/// It is needed because LLVM library clobbers it.
|
/// It is needed because LLVM library clobbers it.
|
||||||
|
Loading…
Reference in New Issue
Block a user