cygwin下编译swoole报错求助

发布于 2022-09-12 01:05:31 字数 7130 浏览 22 评论 0

win10系统在cygwin下安装swoole4.4.14
cygwin安装了php7.3,安装了gcc-core/gcc-objc++/libc++devel/libc++1/libpcre-devel/libpcre2-devel/libssl-devel
swoole编译参数:phpize && ./configure --enable-openssl --enable-http2 --enable-sockets --enable-mysqlnd && make clean && make && make install

报错无如下:
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/crtbeginS.o .libs/php_swoole_cxx.o src/core/.libs/array.o src/core/.libs/base.o src/core/.libs/channel.o src/core/.libs/error.o src/core/.libs/hashmap.o src/core/.libs/heap.o src/core/.libs/list.o src/core/.libs/log.o src/core/.libs/rbtree.o src/core/.libs/ring_queue.o src/core/.libs/socket.o src/core/.libs/string.o src/coroutine/.libs/base.o src/coroutine/.libs/channel.o src/coroutine/.libs/context.o src/coroutine/.libs/file_lock.o src/coroutine/.libs/hook.o src/coroutine/.libs/socket.o src/coroutine/.libs/system.o src/coroutine/.libs/thread_context.o src/coroutine/.libs/ucontext.o src/lock/.libs/atomic.o src/lock/.libs/cond.o src/lock/.libs/file_lock.o src/lock/.libs/mutex.o src/lock/.libs/rw_lock.o src/lock/.libs/semaphore.o src/lock/.libs/spin_lock.o src/memory/.libs/buffer.o src/memory/.libs/fixed_pool.o src/memory/.libs/global_memory.o src/memory/.libs/malloc.o src/memory/.libs/ring_buffer.o src/memory/.libs/shared_memory.o src/memory/.libs/table.o src/network/.libs/client.o src/network/.libs/connection.o src/network/.libs/dns.o src/network/.libs/process_pool.o src/network/.libs/stream.o src/network/.libs/thread_pool.o src/network/.libs/timer.o src/os/.libs/async_thread.o src/os/.libs/base.o src/os/.libs/msg_queue.o src/os/.libs/sendfile.o src/os/.libs/signal.o src/os/.libs/timer.o src/os/.libs/wait.o src/pipe/.libs/base.o src/pipe/.libs/eventfd.o src/pipe/.libs/unix_socket.o src/protocol/.libs/base.o src/protocol/.libs/base64.o src/protocol/.libs/http.o src/protocol/.libs/http2.o src/protocol/.libs/mime_types.o src/protocol/.libs/mqtt.o src/protocol/.libs/redis.o src/protocol/.libs/sha1.o src/protocol/.libs/socks5.o src/protocol/.libs/ssl.o src/protocol/.libs/websocket.o src/reactor/.libs/base.o src/reactor/.libs/epoll.o src/reactor/.libs/kqueue.o src/reactor/.libs/poll.o src/reactor/.libs/select.o src/server/.libs/base.o src/server/.libs/manager.o src/server/.libs/master.o src/server/.libs/port.o src/server/.libs/process.o src/server/.libs/reactor_process.o src/server/.libs/reactor_thread.o src/server/.libs/static_handler.o src/server/.libs/task_worker.o src/server/.libs/worker.o src/wrapper/.libs/event.o src/wrapper/.libs/server.o src/wrapper/.libs/timer.o .libs/swoole.o .libs/swoole_async_coro.o .libs/swoole_atomic.o .libs/swoole_buffer.o .libs/swoole_channel_coro.o .libs/swoole_client.o .libs/swoole_client_coro.o .libs/swoole_coroutine.o .libs/swoole_coroutine_scheduler.o .libs/swoole_coroutine_system.o .libs/swoole_event.o .libs/swoole_http2_client_coro.o .libs/swoole_http2_server.o .libs/swoole_http_client_coro.o .libs/swoole_http_request.o .libs/swoole_http_response.o .libs/swoole_http_server.o .libs/swoole_http_server_coro.o .libs/swoole_lock.o .libs/swoole_mysql_coro.o .libs/swoole_mysql_proto.o .libs/swoole_process.o .libs/swoole_process_pool.o .libs/swoole_redis_coro.o .libs/swoole_redis_server.o .libs/swoole_runtime.o .libs/swoole_server.o .libs/swoole_server_port.o .libs/swoole_socket_coro.o .libs/swoole_table.o .libs/swoole_timer.o .libs/swoole_websocket_server.o thirdparty/php/sockets/.libs/multicast.o thirdparty/php/sockets/.libs/sendrecvmsg.o thirdparty/php/sockets/.libs/conversions.o thirdparty/php/sockets/.libs/sockaddr_conv.o thirdparty/php/standard/.libs/proc_open.o thirdparty/.libs/swoole_http_parser.o thirdparty/.libs/multipart_parser.o thirdparty/hiredis/.libs/async.o thirdparty/hiredis/.libs/hiredis.o thirdparty/hiredis/.libs/net.o thirdparty/hiredis/.libs/read.o thirdparty/hiredis/.libs/sds.o thirdparty/nghttp2/.libs/nghttp2_hd.o thirdparty/nghttp2/.libs/nghttp2_rcbuf.o thirdparty/nghttp2/.libs/nghttp2_helper.o thirdparty/nghttp2/.libs/nghttp2_buf.o thirdparty/nghttp2/.libs/nghttp2_mem.o thirdparty/nghttp2/.libs/nghttp2_hd_huffman.o thirdparty/nghttp2/.libs/nghttp2_hd_huffman_data.o -lpthread -lphp7 -lrt -lssl -lcrypto -L/usr/lib/gcc/x86_64-pc-cygwin/7.4.0 -L/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/../../../../x86_64-pc-cygwin/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/../../../../x86_64-pc-cygwin/lib -L/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/../../.. -lstdc++ -lgcc_s -lgcc -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32 -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/crtend.o -pthread -g -O2 -pthread -o .libs/swoole.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/swoole.dll.a
.libs/swoole_client.o: In function `zim_swoole_client_getSocket':
/home/Administrator/build/swoole-src-4.4.14/swoole_client.cc:1410: undefined reference to `php_sockets_le_socket'
/home/Administrator/build/swoole-src-4.4.14/swoole_client.cc:1410:(.text+0x1dc): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `php_sockets_le_socket'
.libs/swoole_event.o: In function `swoole_convert_to_fd':
/home/Administrator/build/swoole-src-4.4.14/swoole_event.cc:338: undefined reference to `php_sockets_le_socket'
/home/Administrator/build/swoole-src-4.4.14/swoole_event.cc:338:(.text+0x2061): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `php_sockets_le_socket'
.libs/swoole_event.o: In function `swoole_convert_to_fd_ex':
/home/Administrator/build/swoole-src-4.4.14/swoole_event.cc:405: undefined reference to `php_sockets_le_socket'
/home/Administrator/build/swoole-src-4.4.14/swoole_event.cc:405:(.text+0x30f5): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `php_sockets_le_socket'
.libs/swoole_event.o: In function `swoole_php_socket_free':
/home/Administrator/build/swoole-src-4.4.14/swoole_event.cc:457: undefined reference to `php_sockets_le_socket'
/home/Administrator/build/swoole-src-4.4.14/swoole_event.cc:457:(.text+0x3269): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `php_sockets_le_socket'
.libs/swoole_server.o: In function `zim_swoole_server_getSocket':
/home/Administrator/build/swoole-src-4.4.14/swoole_server.cc:3919: undefined reference to `php_sockets_le_socket'
/home/Administrator/build/swoole-src-4.4.14/swoole_server.cc:3919:(.text+0x2c2c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `php_sockets_le_socket'
.libs/swoole_server_port.o:/home/Administrator/build/swoole-src-4.4.14/swoole_server_port.cc:790: more undefined references to `php_sockets_le_socket' follow
.libs/swoole_server_port.o: In function `zim_swoole_server_port_getSocket':
/home/Administrator/build/swoole-src-4.4.14/swoole_server_port.cc:790:(.text+0x9c3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `php_sockets_le_socket'
collect2: error: ld returned 1 exit status
make: * [Makefile:462:swoole.la] 错误 1

有哪位大神帮忙看看是什么问题?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

九局 2022-09-19 01:05:31

官方有编译好的 直接下载

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