iCepa / Tor.framework

Tor framework for the iCepa project
Other
245 stars 53 forks source link

can not build and getting Undefined symbols #72

Closed zoff99 closed 2 years ago

zoff99 commented 2 years ago

I have added to my Podfile https://github.com/zoff99/Antidote/blob/e3209bdf3f9d9a3dd02231d09809ce9c89f821c5/Podfile

pod 'Tor', :podspec => 'https://raw.githubusercontent.com/iCepa/Tor.framework/v406.9.2/TorStatic.podspec'

and i get these errors:

https://github.com/zoff99/Antidote/runs/4884920280?check_suite_focus=true#step:8:15081

Undefined symbols for architecture x86_64:
  "_tor_main_configuration_set_command_line", referenced from:
      -[TORThread main] in libTor.a(TORThread.o)
      -[TORThread main] in libtor.a(TORThread.o)
  "_tor_main_configuration_new", referenced from:
      -[TORThread main] in libTor.a(TORThread.o)
      -[TORThread main] in libtor.a(TORThread.o)
  "_tor_main_configuration_free", referenced from:
      -[TORThread main] in libTor.a(TORThread.o)
      -[TORThread main] in libtor.a(TORThread.o)
  "_tor_malloc_zero_", referenced from:
      -[TORX25519KeyPair init] in libTor.a(TORX25519KeyPair.o)
      -[TORX25519KeyPair init] in libtor.a(TORX25519KeyPair.o)
  "_base32_decode", referenced from:
      +[TORX25519KeyPair base32Decode:] in libTor.a(TORX25519KeyPair.o)
      +[TORX25519KeyPair base32Decode:] in libtor.a(TORX25519KeyPair.o)
  "_base32_encoded_size", referenced from:
      +[TORX25519KeyPair base32Encode:] in libTor.a(TORX25519KeyPair.o)
      +[TORX25519KeyPair base32Encode:] in libtor.a(TORX25519KeyPair.o)
  "_base32_encode", referenced from:
      +[TORX25519KeyPair base32Encode:] in libTor.a(TORX25519KeyPair.o)
      +[TORX25519KeyPair base32Encode:] in libtor.a(TORX25519KeyPair.o)
  "_tor_run_main", referenced from:
      -[TORThread main] in libTor.a(TORThread.o)
      -[TORThread main] in libtor.a(TORThread.o)
  "_curve25519_init", referenced from:
      -[TORX25519KeyPair init] in libTor.a(TORX25519KeyPair.o)
      -[TORX25519KeyPair init] in libtor.a(TORX25519KeyPair.o)
  "_curve25519_keypair_generate", referenced from:
      -[TORX25519KeyPair init] in libTor.a(TORX25519KeyPair.o)
      -[TORX25519KeyPair init] in libtor.a(TORX25519KeyPair.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
tladesignz commented 2 years ago

Ok, tried to compile and run https://github.com/zoff99/Antidote/tree/zoff99/add_tor_framework both on Apple Silicon and Intel. -> Works just fine for me.

Maybe you've got some hick-ups because of old stuff laying around? Make yourself a fresh environment!

rm -rf *
git restore .
pod install
zoff99 commented 2 years ago

@tladesignz this is a CI run on a fresh spun up system. there is no caching at all. could there be some tool missing "brew install ...." ?

you can see my CI run here: https://github.com/zoff99/Antidote/runs/4884920280?check_suite_focus=true#step:8:15081 i get the same error on the Mac also.

  brew install autoconf
  brew install automake
  brew install libtool
  brew install gettext

do i need more than those? or maybe i need a newer version XCode?

tladesignz commented 2 years ago
Current runner version: '2.286.1'
2
Operating System
3
  macOS
4
  11.6.2
5
  20G314
6
Virtual Environment
7
  Environment: macos-11
8
  Version: 20220118.8
9
  Included Software: https://github.com/actions/virtual-environments/blob/macOS-11/20220118.8/images/macos/macos-11-Readme.md
10
  Image Release: https://github.com/actions/virtual-environments/releases/tag/macOS-11%2F20220118.8
11
Virtual Environment Provisioner
12
  1.0.0.0-main-20211214-1
13
GITHUB_TOKEN Permissions
14
  Contents: read
15
  Metadata: read
16
Secret source: Actions
17
Prepare workflow directory
18
Prepare all required actions
19
Getting action download info
20
Download action repository 'actions/checkout@v2' (SHA:ec3a7ce113134d7a93b817d10a8272cb61118579)
21
Download action repository 'actions/upload-artifact@v2' (SHA:82c141cc518b40d92cc801eee768e7aafc9c2fa2)

Seems you're running on old MacOS Big Sur. I'm on Monterey 12.1.

Apple has the tradition of cutting of Xcode support for older MacOSes in half-versions and degrade support earlier. So move on, mate!

zoff99 commented 2 years ago

oh it seems github workflow does not yet have macos 12 :-(

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners

zoff99 commented 2 years ago

i managed it now. in the example in the README [self.controller connect:nil]; is missing. thats why the example is not doing anything

tladesignz commented 2 years ago

True! Thanks for the hint!