← All tasks
cppalibaba/zvec #346Not a task: not reproduced

[Bug]: Linker error on Linux x86: multiple definition of std::placeholders::_1

envgap__alibaba__zvec-346

01 / FAILURE SIGNATURE

As reported upstream

collect2: error: ld returned 1 exit status
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
a6af07e841ef4995085eb7d8aec1ddb7c5bc3973
Manifest
thirdparty/arrow/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

alibaba/zvec #346 · read the original issue
### Description

I am encountering a linker error when building the project on Linux x86 using GCC 12.4. The build fails while linking the shared library libzvec_c_api.so due to a multiple definition error for the symbol std::placeholders::_1.

It appears there is a conflict between the standard library (libstdc++.a) and a symbol already defined in the libarrow.a static library.

### Steps to Reproduce

```python
1. Configure the project on a Linux x86 environment with GCC 12.4.
2. Run the build command and build target all


GCC 13 works fine.
```

### Logs / Stack Trace

```shell
[ 95%] Linking CXX shared library ../../../lib/libzvec_c_api.so
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/libstdc++.a(placeholders.o):(.rodata._ZNSt12placeholders2_1E+0x0): multiple definition of `std::placeholders::_1'; ../../../external/usr/local/lib/libarrow.a(type.cc.o):/usr/include/c++/13/functional:294: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [src/binding/c/CMakeFiles/zvec_c_api.dir/build.make:117: lib/libzvec_c_api.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:3691: src/binding/c/CMakeFiles/zvec_c_api.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
```

### Operating System

Linux x86

### Build & Runtime Environment

GCC 12.4

### Additional Context

- [x] I've checked `git status` — no uncommitted submodule changes
- [x] I built with `CMAKE_BUILD_TYPE=Debug`
- [x] This occurs with or without `COVERAGE=ON`
- [ ] The issue involves Python ↔ C++ integration (pybind11)
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]