hjxisking
  • 1
  • 新人请关照

cygwin下编译swoole报错求助

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

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

阅读 51
评论 1月14日提问
    撰写回答

    登录后参与交流、获取后续更新提醒