Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cygwin 编译预览--编译swoole-cli一次 耗时 30分钟左右 #108

Open
jingjingxyk opened this issue Apr 1, 2023 · 3 comments
Open

Comments

@jingjingxyk
Copy link
Contributor

jingjingxyk commented Apr 1, 2023

缘由: 反复尝试 github action windows-latest 环境,发现编译始终不通过

解决办法: 用一台全新的服务器来编译测试 ,找到问题所在。

阿里云按量付费服务器 4核16G windows 2022 数据中心版 服务器成本:3元RMB左右

安装 cygwin setup-x86_64.exe依赖,花费半小时左右 (有情提醒: 提前准备好安装包等,可以节省时间)

提前准备脚本如下: (备注 ^ 是windows cmd 换行符)

setup-x86_64.exe  --no-desktop --no-shortcuts --no-startmenu --quiet-mode    -s https://mirrors.ustc.edu.cn/cygwin/  -P git,curl,wget,tar,libtool,re2c,bison,gcc-g++,autoconf,automake,openssl,libpcre2-devel,libssl-devel,libcurl-devel,libxml2-devel,libxslt-devel,libgmp-devel,ImageMagick,libpng-devel,libjpeg-devel,libfreetype-devel,libwebp-devel,libsqlite3-devel,zlib-devel,libbz2-devel,liblz4-devel,liblzma-devel,libzip-devel,libicu-devel,libonig-devel,libcares-devel,libsodium-devel,libyaml-devel,libMagick-devel,libzstd-devel,libbrotli-devel,libreadline-devel,libintl-devel,libpq-devel,libssh2-devel,libidn2-devel,gettext-devel,coreutils


发现问题所在: 因github runner 已经内置了msys 环境, cygwin 如果不安装 make ,默认引用的是 mingw-make。需要cygwin 安装 make 解决问题 。另外还有需要创建目录 mkdir -p bin/.libs

image
mkdir -p bin/.libs

image
image

@jingjingxyk jingjingxyk changed the title cygwin 编译预览--编译一次 耗时 30分钟左右 cygwin 编译预览--编译swoole-cli一次 耗时 30分钟左右 Apr 1, 2023
@jingjingxyk
Copy link
Contributor Author

本地虚拟机:

image

@jingjingxyk
Copy link
Contributor Author

jingjingxyk commented Apr 1, 2023

如果选择 msys2 提供的cygwin 环境 ,

msys2提供了这些包

pacman -Sy --noconfirm  wget tar libtool re2c bison gcc autoconf automake openssl

pacman -Sy --noconfirm pcre2-devel openssl-devel libcurl-devel libxml2-devel libxslt-devel gmp-devel libsqlite-devel zlib-devel libbz2-devel \
           liblz4-devel liblzma-devel icu-devel libcares-devel libyaml-devel libzstd-devel brotli-devel libreadline-devel  libintl \
           libssh2-devel  libidn2-devel gettext-devel coreutils

pacman -Sy --noconfirm zip gzip lzip p7zip zlib bzip2 unzip

存在如下的问题
msys2 提供的cygwin 环境,缺少如下这些库:


     ImageMagick libpng-devel libjpeg-devel libfreetype-devel libwebp-devel  \
     libzip-devel  libonig-devel  libsodium-devel  libMagick-devel     libpq-devel

导致一些扩展并不能启用 ,比如 gd2 freetype magick

最好还是选择 cygwin 提供的环境

@netyum
Copy link

netyum commented Jun 10, 2023

windows下 使用swoole-cli 调用shell_exec不成功,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants