Skip to content

Linker problems on ARM-based Macs #50

@seffradev

Description

@seffradev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions