在 AIX 5.3 上构建 WWW::Curl::Easy Perl 模块的未定义符号

发布于 2024-09-08 05:13:21 字数 2466 浏览 13 评论 0原文

我正在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花伊自在美 2024-09-15 05:13:21

看起来 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 of curl-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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文