2015-07-13 63 views
1

我想在Mac OS 10.10安裝安全通道軟件,我收到以下錯誤在Mac OS架構x86_64的未定義符號

用於建築x86_64的未定義符號

在執行make命令從終端。

下面

是詳細的日誌:

Making all in src 
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am 
/bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -D_THREAD_SAFE -pthread -Wall -Wextra -Wpedantic  -Wformat=2 -Wconversion -Wno-long-long -Wno-deprecated-declarations -fstack-protector -fPIE - D_FORTIFY_SOURCE=2 -L/usr/local/openssl/lib64 -L/usr/local/openssl/lib -lssl -lcrypto -fPIE -pie -o  stunnel stunnel-tls.o stunnel-str.o stunnel-file.o stunnel-client.o stunnel-log.o stunnel-options.o stunnel-protocol.o stunnel-network.o stunnel-resolver.o stunnel-ssl.o stunnel-ctx.o stunnel-verify.o stunnel-sthreads.o stunnel-fd.o stunnel-dhparam.o stunnel-cron.o stunnel-stunnel.o stunnel-pty.o stunnel-libwrap.o stunnel-ui_unix.o -lz 
libtool: link: gcc -g -O2 -D_THREAD_SAFE -pthread -Wall -Wextra -Wpedantic -Wformat=2 -Wconversion - Wno-long-long -Wno-deprecated-declarations -fstack-protector -fPIE -D_FORTIFY_SOURCE=2 -fPIE -pie -o stunnel stunnel-tls.o stunnel-str.o stunnel-file.o stunnel-client.o stunnel-log.o stunnel-options.o  stunnel-protocol.o stunnel-network.o stunnel-resolver.o stunnel-ssl.o stunnel-ctx.o stunnel-verify.o stunnel-sthreads.o stunnel-fd.o stunnel-dhparam.o stunnel-cron.o stunnel-stunnel.o stunnel-pty.o stunnel-libwrap.o stunnel-ui_unix.o -L/usr/local/openssl/lib64 -L/usr/local/openssl/lib -lssl -lcrypto  -lz -pthread 
clang: warning: argument unused during compilation: '-pthread' 
clang: warning: argument unused during compilation: '-pie' 
clang: warning: argument unused during compilation: '-pthread' 
ld: warning: directory not found for option '-L/usr/local/openssl/lib64' 
ld: warning: directory not found for option '-L/usr/local/openssl/lib' 
Undefined symbols for architecture x86_64: 
"_CRYPTO_THREADID_set_callback", referenced from: 
    _sthreads_init in stunnel-sthreads.o 
"_CRYPTO_THREADID_set_numeric", referenced from: 
    _threadid_func in stunnel-sthreads.o 
"_ERR_remove_thread_state", referenced from: 
    _client_run in stunnel-client.o 
"_SSL_CTX_set_psk_client_callback", referenced from: 
    _context_init in stunnel-ctx.o 
"_SSL_CTX_set_psk_server_callback", referenced from: 
    _context_init in stunnel-ctx.o 
"_TLSv1_1_client_method", referenced from: 
    _parse_service_option in stunnel-options.o 
"_TLSv1_1_server_method", referenced from: 
    _parse_service_option in stunnel-options.o 
"_TLSv1_2_client_method", referenced from: 
    _parse_service_option in stunnel-options.o 
"_TLSv1_2_server_method", referenced from: 
    _parse_service_option in stunnel-options.o 
"_X509_STORE_get1_certs", referenced from: 
    _verify_callback in stunnel-verify.o 
"_X509_check_email", referenced from: 
    _verify_callback in stunnel-verify.o 
"_X509_check_host", referenced from: 
    _verify_callback in stunnel-verify.o 
"_X509_check_ip_asc", referenced from: 
    _verify_callback in stunnel-verify.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[2]: *** [stunnel] Error 1 
make[1]: *** [all] Error 2 
make: *** [all-recursive] Error 1 
+0

'brew install stunnel'你完成了([Homebrew](http://brew.sh))。 Linker表示,它無法找到x86_64架構的符號。另外,如果你仔細閱讀你的日誌('ld:warning:找不到選項'-L/usr/local/openssl/lib64'),它也說它找不到openssl目錄(32&64位)。安裝openssl,並嘗試再次構建它。或者只安裝Homebrew和'brew install stunnel'。 – robertvojta

回答

2

這個問題來了,因爲可安裝依賴於OpenSSL,它不能夠f ind與OpenSSL相關的庫。

此問題可能有兩種可能原因: 1.系統中未安裝OpenSSL。在這種情況下,需要先安裝OpenSSL,然後再安裝stunnel。

  1. OpenSSL未安裝在標準路徑中。
2

你需要傳遞參數與並行線程和餡餅 不-pthread-lpthread而不是-pie-lpie鏈接

還有一些在/usr/local/openssl/嘗試沒有庫用brew或macports安裝它們或只下載二進制文件。

的提示在那裏,就在你的面前:

鐺:警告:在編譯過程中未使用的說法: '-pthread'

...

LD:警告:目錄沒有找到選項'-L/usr/local/openssl/lib64'

相關問題