Linker problems on ARM-based Macs

Aperta
#50 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
c, cmake, macos

Direzione di ricerca

Start by reproducing the reported cmake . and cmake --build . failure on an ARM-based Mac. Inspect the modules/wiremock target and impl.c, then determine why the listed Testcontainers symbols are missing during linking; done means the CMake build links testcontainers-c-wiremock successfully for arm64.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

We have a problem when linking on modern MacBooks. I have not delved deep into exactly what about the linking that is wrong but here's the output.

ha@Hampuss-MacBook-Pro testcontainers-native % cmake . -DCMAKE_POLICY_VERSION_MINIMUM=3.5
-- Found Python: /opt/homebrew/Frameworks/Python.framework/Versions/3.13/bin/python3.13 (found version "3.13.5") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done (1.4s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/ha/Source/testcontainers-native
ha@Hampuss-MacBook-Pro testcontainers-native % cmake --build .
[  5%] Building Testcontainers C shared library
[  5%] Built target testcontainers-c-shim
[ 11%] Building C object modules/wiremock/CMakeFiles/testcontainers-c-wiremock.dir/impl.c.o
[ 17%] Linking C shared library libtestcontainers-c-wiremock.dylib
Undefined symbols for architecture arm64:
  "_tc_new_container_request", referenced from:
      _tc_wm_new_container in impl.c.o
  "_tc_send_http_get", referenced from:
      _tc_wm_get_mappings in impl.c.o
  "_tc_with_exposed_tcp_port", referenced from:
      _tc_wm_new_container in impl.c.o
  "_tc_with_file", referenced from:
      _tc_wm_with_mapping in impl.c.o
  "_tc_with_wait_for_http", referenced from:
      _tc_wm_new_container in impl.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [modules/wiremock/libtestcontainers-c-wiremock.0.0.1.dylib] Error 1
make[1]: *** [modules/wiremock/CMakeFiles/testcontainers-c-wiremock.dir/all] Error 2
make: *** [all] Error 2
Lingua principale
C
Stelle
58
Fork
14
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di testcontainers/testcontainers-native

Tutte le issue di testcontainers/testcontainers-native

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.