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

Unable to verify build on Mac osx 10.15 #30

Open
yamamushi opened this issue Feb 10, 2020 · 3 comments
Open

Unable to verify build on Mac osx 10.15 #30

yamamushi opened this issue Feb 10, 2020 · 3 comments

Comments

@yamamushi
Copy link

After building with (which didn't fail with any errors, and appears to have completed successfully because of the "Done building all" message after it finished):

CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go run build.go -verbose build-all

Then running

go get -u github.com/cretz/bine/tor

I'm still unable to actually run the provided tests (or any other examples using embedded tor):

$ go test -v build_test.go -tor.verbose
# github.com/cretz/bine/process/embedded/tor-0.3.5
Undefined symbols for architecture x86_64:
  "_libscrypt_scrypt", referenced from:
      _secret_to_key_compute_key in libtor-crypt-ops.a(libtor_crypt_ops_a-crypto_s2k.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FAIL	command-line-arguments [build failed]
FAIL

Here is the output of show-libs:

$ go run build.go show-libs
-Ltor/src/core -ltor-app
-Ltor/src/lib -ltor-compress -ltor-evloop -ltor-tls -ltor-crypt-ops -lcurve25519_donna -ltor-geoip -ltor-process -ltor-time -ltor-fs -ltor-encoding -ltor-sandbox -ltor-container -ltor-net -ltor-thread -ltor-memarea -ltor-math -ltor-meminfo -ltor-osinfo -ltor-log -ltor-lock -ltor-fdio -ltor-string -ltor-term -ltor-smartlist-core -ltor-malloc -ltor-wallclock -ltor-err -ltor-intmath -ltor-ctime -ltor-trace
-Ltor/src/ext/keccak-tiny -lkeccak-tiny
-Ltor/src/ext/ed25519/ref10 -led25519_ref10
-Ltor/src/ext/ed25519/donna -led25519_donna
-Ltor/src/trunnel -lor-trunnel
-Llibevent/dist/lib -levent
-Lxz/dist/lib -llzma
-Lzlib/dist/lib -lz
-Lopenssl/dist/lib -lssl -lcrypto
@yamamushi
Copy link
Author

It's also probably worth pointing out that the Travis builds for osx seem to have been failing for the past few months :)

https://travis-ci.org/cretz/tor-static/jobs/605723231

@cretz
Copy link
Owner

cretz commented Feb 12, 2020

Hrmm, yeah I do all my work on Windows and Linux, so I haven't worked with macOS (I usually have a friend verify macOS). I see firoorg/firo#352 references a similar bug and says it was a system issue. At first glance it appears to be a libscrypt issue. Can you install libscrypt-dev and retry? Technically I think Tor is suppose to be able to build and run fine without scrypt present (it's optional), but it appears something is requiring it here. Anything you can find while debugging would be appreciated.

@coupez
Copy link
Contributor

coupez commented Jun 9, 2020

Actually, I had this same issue and it turned out to be because I had tor (and thus libscrypt) installed via brew. After uninstalling libscrypt (brew uninstall libscrypt) I could build my application.

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

3 participants