OpenMLDB icon indicating copy to clipboard operation
OpenMLDB copied to clipboard

build(Release): dynamic link error when `BUILD_SHARED_LIBS=ON` and `CMAKE_BUILD_TYPE=RelWithDebInfo`

Open aceforeverd opened this issue 3 years ago • 3 comments

Bug Description

in Release or RelWithDebInfo profile, test executable fails e.g the ast_node_converter_test:

ERROR: something wrong with flag 'flagfile' in file '/Users/runner/work/hybridsql-asserts/hybridsql-asserts/deps/build/src/gflags/src/gflags.cc'.  One possibility: file '/Users/runner/work/hybridsql-asserts/hybridsql-asserts/deps/build/src/gflags/src/gflags.cc' is being linked both statically and dynamically into this executable.

Expected Behavior

Steps to Reproduce

aceforeverd avatar Jun 08 '22 02:06 aceforeverd

hybridse_core was linked with gflags, if elsewhere links gflags again, come to the problem. because hybridse_core is shared library, the elsewhere linked gflags is treated as second link. I see there should only one flag useful in hybridse now: enable_spark_unsaferow_format, we better replace the use of gflags

aceforeverd avatar Jun 10 '22 06:06 aceforeverd

unsolved, keep open to follow up

aceforeverd avatar Jul 15 '22 13:07 aceforeverd