gpt4 book ai didi

compiler-errors - 在这种情况下,如何修复体系结构 x86_64 的 undefined symbol ?

转载 作者:行者123 更新时间:2023-12-04 07:06:10 26 4
gpt4 key购买 nike

我正在尝试编译 cgminer在我的 Mac OS X 10.8.3 电脑上。我使用自制软件安装了 libcurl。花了一段时间才得到./configure工作,但我终于做到了(参见这个问题 How do I specify LDFLAGS and CPPFLAGS for ./configure? )。

现在,当我尝试 make程序,我收到一个错误 Undefined symbols for architecture x86_64这似乎与 curl 有关.这是从开始到错误的整个 make 消息:

c10:cgminer-3.0.0 haroldbr$ make
make all-recursive
Making all in lib
GEN signal.h
GEN stdint.h
GEN string.h
make all-recursive
CC memmem.o
AR libgnu.a
/usr/bin/ranlib: file: libgnu.a(dummy.o) has no symbols
ranlib: file: libgnu.a(dummy.o) has no symbols
Making all in compat
make[3]: Nothing to be done for `all-am'.
Making all in ccan
CC libccan_a-helpers.o
CC libccan_a-opt.o
CC libccan_a-parse.o
CC libccan_a-usage.o
AR libccan.a
CC cgminer-cgminer.o
CC cgminer-util.o
CC cgminer-sha2.o
CC cgminer-api.o
api.c: In function ‘print_data’:
api.c:1104: warning: format ‘%06ld’ expects type ‘long int’, but argument 6 has type ‘__darwin_suseconds_t’
CC cgminer-logging.o
CC cgminer-driver-opencl.o
CC cgminer-ocl.o
CC cgminer-findnonce.o
CC cgminer-adl.o
CC cgminer-scrypt.o
CCLD cgminer
Undefined symbols for architecture x86_64:
"_curl_easy_cleanup", referenced from:
_update_gbt in cgminer-cgminer.o
_pool_active in cgminer-cgminer.o
_longpoll_thread in cgminer-cgminer.o
_reap_curl in cgminer-cgminer.o
_setup_stratum_curl in cgminer-util.o
_suspend_stratum in cgminer-util.o
"_curl_easy_getinfo", referenced from:
_json_rpc_call in cgminer-util.o
_setup_stratum_curl in cgminer-util.o
"_curl_easy_init", referenced from:
_update_gbt in cgminer-cgminer.o
_recruit_curl in cgminer-cgminer.o
_pool_active in cgminer-cgminer.o
_longpoll_thread in cgminer-cgminer.o
_setup_stratum_curl in cgminer-util.o
"_curl_easy_perform", referenced from:
_json_rpc_call in cgminer-util.o
_setup_stratum_curl in cgminer-util.o
"_curl_easy_reset", referenced from:
_json_rpc_call in cgminer-util.o
"_curl_easy_setopt", referenced from:
_longpoll_thread in cgminer-cgminer.o
_keep_curlalive in cgminer-util.o
_json_rpc_call in cgminer-util.o
_setup_stratum_curl in cgminer-util.o
"_curl_global_cleanup", referenced from:
_clean_up in cgminer-cgminer.o
"_curl_global_init", referenced from:
_main in cgminer-cgminer.o
"_curl_slist_append", referenced from:
_json_rpc_call in cgminer-util.o
"_curl_slist_free_all", referenced from:
_json_rpc_call in cgminer-util.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [cgminer] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

从我读过的所有内容来看,这是某种类型的链接器错误,而不是编译错误。这显示在 ./configure 的末尾脚本:

------------------------------------------------------------------------
cgminer 3.0.0
------------------------------------------------------------------------


Configuration Options Summary:

curses.TUI...........: FOUND: -lncurses
OpenCL...............: FOUND. GPU mining support enabled
scrypt...............: Enabled
ADL..................: SDK NOT found, GPU monitoring support DISABLED

Avalon.ASICs.........: Disabled
BFL.ASICs............: Disabled
BitForce.FPGAs.......: Disabled
Icarus.FPGAs.........: Disabled
ModMiner.FPGAs.......: Disabled
Ztex.FPGAs...........: Disabled

Compilation............: make (or gmake)
CPPFLAGS.............: -I/usr/local/opt/curl/include
CFLAGS...............: -g
LDFLAGS..............: -L/usr/local/opt/curl/lib
LDADD................: -L/usr/local/opt/curl/lib -ljansson -lpthread -framework OpenCL -lm

Installation...........: make install (as root if needed, with 'su' or 'sudo')
prefix...............: /usr/local

我不知道如何解决链接器错误。我需要改变我的 ./configure 吗? ?非常感谢任何建议。

最佳答案

这似乎可行:

LIBCURL_CFLAGS="-I/usr/local/opt/curl/include" LIBCURL_LIBS="-L/usr/local/opt/curl/lib -lcurl" ./configure

关于compiler-errors - 在这种情况下,如何修复体系结构 x86_64 的 undefined symbol ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16247276/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com