4paradigm / 4paradigm/OpenMLDB

build and link warnings on mac

Open
#242 0 comments 1 reaction 1 assignee Claimed by @imotai View on GitHub
bug
Dominant language
C++
Stars
1.7k
Forks
331
Avg merge
12d 12h
Merged PRs (30d)
1

Description

ld warnings from mac Big Sur using the pre-compiled thirdparty & zetasql
- *.o was built for newer macOS version (11.1) than being linked (11.0)
- direct access in function `boost::system::detail::system_error_category::default_error_condition(int) const` from file '/Users/danielace/Git/4paradigm/OpenMLDB/hybridse/thirdparty/lib/libboost_filesystem.a(operations.o)' to global weak symbol `boost::system::detail::is_generic_value(int)::gen` from file 'src/CMakeFiles/ast_node_converter_test.dir/planv2/ast_node_converter_test.cc.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
- maybe more type of warnings

## Current Behavior

```log
ld: warning: object file (/Users/danielace/Git/4paradigm/OpenMLDB/hybridse/thirdparty/lib/libre2.a(unicode_casefold.o)) was built for newer macOS version (11.1) than being linked (11.0)
ld: warning: object file (/Users/danielace/Git/4paradigm/OpenMLDB/hybridse/thirdparty/lib/libre2.a(simplify.o)) was built for newer macOS version (11.1) than being linked (11.0)
ld: warning: object file (/Users/danielace/Git/4paradigm/OpenMLDB/hybridse/thirdparty/lib/libre2.a(tostring.o)) was built for newer macOS version (11.1) than being linked (11.0)
ld: warning: direct access in function 'boost::system::detail::system_error_category::default_error_condition(int) const' from file '/Users/danielace/Git/4paradigm/OpenMLDB/hybridse/thirdparty/lib/libboost_filesystem.a(operations.o)' to global weak symbol 'boost::system::detail::is_generic_value(int)::gen' from file 'src/CMakeFiles/ast_node_converter_test.dir/planv2/ast_node_converter_test.cc.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
```

## Possible Solution

## Steps to Reproduce
```bash
cmake -H. -B=build -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE_ENABLE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja -DCMAKE_INSTALL_PREFIX=install
ninja
```

## Context (Environment)

## Detailed Description

## Possible Implementation

Contributor guide

Open the contributing guide

Research direction

The warnings are from linking third-party libraries (libre2.a, libboost_filesystem.a) on macOS. Examine the CMake configuration in hybridse/thirdparty to understand how these libraries are built or fetched. Check for macOS version flags and visibility settings. Reproduce the build with the given cmake and ninja commands to see the full warning output. The fix likely involves adjusting build flags or updating the pre-compiled third-party binaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, macos
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.