Skip to content

Linking error #3

@jdf-id-au

Description

@jdf-id-au

Thank you for this amazing thing. I'm trying to get it to work with:

  • gambit 4.9.5 (via homebrew)
  • macOS Ventura 13.4.1 (c)
  • intel cpu

I made some naïve function call updates, which seem to satisfy the compiler, but then linking fails with output below.

[EDIT] ooh just adding -lcrypto and -lssl to LDFLAGS fixed nearly everything; still working on clrsbdi2...

    MAKE-PROGRAM test/objc-test
ld: warning: could not create compact unwind for ____H___kernel: stack subq instruction is too different from dwarf stack size
Undefined symbols for architecture x86_64:
  "_BN_bin2bn", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_BN_free", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_DH_check", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_DH_free", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_DH_new", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_DH_set0_pqg", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_ERR_clear_error", referenced from:
      ____device_tcp_client_write_raw_virt in libgambit.a(os_io.o)
      ____device_tcp_client_read_raw_virt in libgambit.a(os_io.o)
      ____device_tcp_client_close_raw_virt in libgambit.a(os_io.o)
  "_ERR_error_string", referenced from:
      ____os_err_code_to_string in libgambit.a(os_base.o)
  "_OPENSSL_init_ssl", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_OpenSSL_version_num", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_PEM_read_DHparams", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_RAND_status", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_check_private_key", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_ctrl", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_free", referenced from:
      ____release_rc_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_new", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_set_client_CA_list", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_set_default_verify_paths", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_set_options", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_set_session_id_context", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_set_verify", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_use_PrivateKey_file", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_CTX_use_certificate_file", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_accept", referenced from:
      ____device_tcp_server_read in libgambit.a(os_io.o)
  "_SSL_connect", referenced from:
      _try_connect in libgambit.a(os_io.o)
  "_SSL_ctrl", referenced from:
      ____device_tcp_client_setup_from_sockaddr in libgambit.a(os_io.o)
  "_SSL_free", referenced from:
      ____device_tcp_client_release_raw_virt in libgambit.a(os_io.o)
      ____device_tcp_client_close_raw_virt in libgambit.a(os_io.o)
  "_SSL_get_error", referenced from:
      ____device_tcp_client_write_raw_virt in libgambit.a(os_io.o)
      ____device_tcp_client_read_raw_virt in libgambit.a(os_io.o)
      ____device_tcp_client_close_raw_virt in libgambit.a(os_io.o)
  "_SSL_get_shutdown", referenced from:
      ____device_tcp_client_write_raw_virt in libgambit.a(os_io.o)
      ____device_tcp_client_read_raw_virt in libgambit.a(os_io.o)
  "_SSL_is_init_finished", referenced from:
      ____device_tcp_client_close_raw_virt in libgambit.a(os_io.o)
  "_SSL_load_client_CA_file", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_SSL_new", referenced from:
      ____device_tcp_client_setup_from_sockaddr in libgambit.a(os_io.o)
      ____device_tcp_server_read in libgambit.a(os_io.o)
  "_SSL_read", referenced from:
      ____device_tcp_client_read_raw_virt in libgambit.a(os_io.o)
  "_SSL_set_fd", referenced from:
      ____device_tcp_client_setup_from_sockaddr in libgambit.a(os_io.o)
      ____device_tcp_server_read in libgambit.a(os_io.o)
  "_SSL_shutdown", referenced from:
      ____device_tcp_client_write_raw_virt in libgambit.a(os_io.o)
      ____device_tcp_client_read_raw_virt in libgambit.a(os_io.o)
      ____device_tcp_client_close_raw_virt in libgambit.a(os_io.o)
  "_SSL_write", referenced from:
      ____device_tcp_client_write_raw_virt in libgambit.a(os_io.o)
  "_TLS_client_method", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "_TLS_server_method", referenced from:
      ____os_make_tls_context in libgambit.a(os_io.o)
  "___clrsbdi2", referenced from:
      ____H___num in libgambit.a(_num.o)
      ____H___system in libgambit.a(_system.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [test/objc-test] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions