在 AIX 5.3 上构建 WWW::Curl::Easy Perl 模块的未定义符号
我正在尝试在 AIX 5.3 上安装 WWW::Curl::Easy Perl 模块。我已经在 /usr/local 中安装了curl(从源代码)。当尝试构建 Perl 模块时,我得到这样的信息:
$ perl Makefile.PL Found curl.h in /usr/local/include/curl/curl.h Building curlopt-constants.c for your libcurl version Building Easy.pm constants for your libcurl version Note (probably harmless): No library found for -lcurl Writing Makefile for WWW::Curl
我认为“可能无害”的错误并不是那么无害。
$ make Skip blib/lib/WWW/Curl/Form.pm (unchanged) Skip blib/lib/WWW/Curl.pm (unchanged) Skip blib/lib/WWW/Curl/Multi.pm (unchanged) Skip blib/lib/WWW/Curl/Easy.pm (unchanged) cc_r -c -I/usr/local/include -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"3.02\" -DXS_VERSION=\"3.02\" "-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" Curl.c "Curl.xs", line 681.36: 1506-280 (W) Function argument assignment between types "unsigned long*" and "int*" is not allowed. Running Mkbootstrap for WWW::Curl () chmod 644 Curl.bs rm -f blib/arch/auto/WWW/Curl/Curl.so ld -bhalt:4 -bM:SRE -bI:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp -bE:Curl.exp -bnoentry -lpthreads -lc_r Curl.o -o blib/arch/auto/WWW/Curl/Curl.so ld: 0711-317 ERROR: Undefined symbol: .curl_global_init ld: 0711-317 ERROR: Undefined symbol: .curl_multi_perform ld: 0711-317 ERROR: Undefined symbol: .curl_multi_fdset ld: 0711-317 ERROR: Undefined symbol: .curl_multi_remove_handle ld: 0711-317 ERROR: Undefined symbol: .curl_multi_add_handle ld: 0711-317 ERROR: Undefined symbol: .curl_global_cleanup ld: 0711-317 ERROR: Undefined symbol: .curl_easy_getinfo ld: 0711-317 ERROR: Undefined symbol: .curl_easy_perform ld: 0711-317 ERROR: Undefined symbol: .curl_slist_free_all ld: 0711-317 ERROR: Undefined symbol: .curl_slist_append ld: 0711-317 ERROR: Undefined symbol: .curl_easy_setopt ld: 0711-317 ERROR: Undefined symbol: .curl_version ld: 0711-317 ERROR: Undefined symbol: .curl_multi_cleanup ld: 0711-317 ERROR: Undefined symbol: .curl_multi_init ld: 0711-317 ERROR: Undefined symbol: .curl_easy_cleanup ld: 0711-317 ERROR: Undefined symbol: .curl_easy_duphandle ld: 0711-317 ERROR: Undefined symbol: .curl_easy_init ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. make: The error code from the last command is 8. Stop.
我怀疑对于熟悉 C 编译器和链接器的人来说这是一件相当简单的事情。感谢任何帮助。
I'm trying to get the WWW::Curl::Easy Perl module installed on AIX 5.3. I have curl installed (from source) in /usr/local. When trying to build the Perl module, I get this:
$ perl Makefile.PL Found curl.h in /usr/local/include/curl/curl.h Building curlopt-constants.c for your libcurl version Building Easy.pm constants for your libcurl version Note (probably harmless): No library found for -lcurl Writing Makefile for WWW::Curl
I'm thinking the "probably harmless" error is not so harmless.
$ make Skip blib/lib/WWW/Curl/Form.pm (unchanged) Skip blib/lib/WWW/Curl.pm (unchanged) Skip blib/lib/WWW/Curl/Multi.pm (unchanged) Skip blib/lib/WWW/Curl/Easy.pm (unchanged) cc_r -c -I/usr/local/include -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"3.02\" -DXS_VERSION=\"3.02\" "-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" Curl.c "Curl.xs", line 681.36: 1506-280 (W) Function argument assignment between types "unsigned long*" and "int*" is not allowed. Running Mkbootstrap for WWW::Curl () chmod 644 Curl.bs rm -f blib/arch/auto/WWW/Curl/Curl.so ld -bhalt:4 -bM:SRE -bI:/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE/perl.exp -bE:Curl.exp -bnoentry -lpthreads -lc_r Curl.o -o blib/arch/auto/WWW/Curl/Curl.so ld: 0711-317 ERROR: Undefined symbol: .curl_global_init ld: 0711-317 ERROR: Undefined symbol: .curl_multi_perform ld: 0711-317 ERROR: Undefined symbol: .curl_multi_fdset ld: 0711-317 ERROR: Undefined symbol: .curl_multi_remove_handle ld: 0711-317 ERROR: Undefined symbol: .curl_multi_add_handle ld: 0711-317 ERROR: Undefined symbol: .curl_global_cleanup ld: 0711-317 ERROR: Undefined symbol: .curl_easy_getinfo ld: 0711-317 ERROR: Undefined symbol: .curl_easy_perform ld: 0711-317 ERROR: Undefined symbol: .curl_slist_free_all ld: 0711-317 ERROR: Undefined symbol: .curl_slist_append ld: 0711-317 ERROR: Undefined symbol: .curl_easy_setopt ld: 0711-317 ERROR: Undefined symbol: .curl_version ld: 0711-317 ERROR: Undefined symbol: .curl_multi_cleanup ld: 0711-317 ERROR: Undefined symbol: .curl_multi_init ld: 0711-317 ERROR: Undefined symbol: .curl_easy_cleanup ld: 0711-317 ERROR: Undefined symbol: .curl_easy_duphandle ld: 0711-317 ERROR: Undefined symbol: .curl_easy_init ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. make: The error code from the last command is 8. Stop.
I suspect this is a fairly simple thing for someone familiar with C compilers and linkers. Appreciate any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来
ld
行中缺少 libcurl 的链接器参数。这是curl-config --libs
的输出,应该类似于-L/opt/local/lib -lcurl
。确保/opt/local/lib/libcurl.so
存在(其中/opt/local/lib
是-L
之后的内容)。您可能有 libcurl 标头,但没有共享库。
It looks like the linker arguments for libcurl are missing from the
ld
line. That's the output ofcurl-config --libs
and should look something like-L/opt/local/lib -lcurl
. Make sure/opt/local/lib/libcurl.so
exists (where/opt/local/lib
is whatever comes after-L
).You may have the libcurl headers but not the shared library.