Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 32-bit arch may need linking to libatomic, otherwise build fails #434

Open
barracuda156 opened this issue May 4, 2024 · 0 comments

Comments

@barracuda156
Copy link
Contributor

Describe the bug

Nothing checks for support of 8-byte atomics in hardware. So linking to libatomic is not done where required.

To reproduce

Build on ppc or arm.

Expected behavior

-latomic should be passed when needed.

Additional information

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_databases_valkey/valkey/work/compwrap/cc/opt/local/bin/gcc-mp-13 -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -arch ppc -O3 -flto -g -ggdb -L/usr/local/opt/openssl/lib -o valkey-benchmark ae.o anet.o valkey-benchmark.o adlist.o dict.o zmalloc.o redisassert.o release.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o strl.o ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/jemalloc/lib/libjemalloc.a -lm -ldl ../deps/hiredis/libhiredis_ssl.a -L/opt/local/libexec/openssl3/lib -lssl -L/opt/local/libexec/openssl3/lib -lcrypto 
ld: warning: directory '/usr/local/opt/openssl/lib' following -L not found
Undefined symbols:
  "___atomic_fetch_add_8", referenced from:
      _hdr_record_values_atomic in libhdrhistogram.a(hdr_histogram.o)
      _hdr_record_values_atomic in libhdrhistogram.a(hdr_histogram.o)
  "___atomic_load_8", referenced from:
      _hdr_record_values_atomic in libhdrhistogram.a(hdr_histogram.o)
      _hdr_record_values_atomic in libhdrhistogram.a(hdr_histogram.o)
  "___atomic_compare_exchange_8", referenced from:
      _hdr_record_values_atomic in libhdrhistogram.a(hdr_histogram.o)
      _hdr_record_values_atomic in libhdrhistogram.a(hdr_histogram.o)
ld: symbol(s) not found
collect2: error: ld returned 1 exit status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant