yangweijie / note

个人博客
https://yangweijie.github.io/note/
10 stars 1 forks source link

cygwin php7.4 和swoole #103

Open yangweijie opened 1 month ago

yangweijie commented 1 month ago

先手动最小化d盘装一遍 cygwin64 然后将其重命名cygwin642

下载 网盘中的压缩包 解压至d 或其他非C 盘的根目录

压缩包里的用户名是Administrator 如果 当前机器用户不是,就手动将home/Administrator 改为自己用户,然后 双击开始菜单里的Cygwin64 Terminal 进入,将 /usr/bin 下的composer74s.bat 里d 改为实际判断(已经是d 无需更改)。

环境变量path 里 导入d:/cygwin64/bin (terminal里是/usr/bin win里只有/bin)后,

这样就可以 在cmd里 php74s -m 查看确认有swoole 扩展,composer74s 可以更新linux 下依赖了。

composer74s 加速

composer74s config -g repo.packagist composer https://mirrors.aliyun.com/composer/

composer74s repo:use 1

5526ed786ac7a500b33d3daaf61fb3d

yangweijie commented 1 month ago

手动编译 遇到的坑 openssl 版本过高要1.1.1w pcntl扩展 编译报错,需参考php8.1.5 在1329行将两个break 改为

#if defined(SIGPOLL) && !defined(__CYGWIN__)
            case SIGPOLL:
                add_assoc_long_ex(user_siginfo, "band", sizeof("band")-1, siginfo->si_band);
# ifdef si_fd
                add_assoc_long_ex(user_siginfo, "fd",   sizeof("fd")-1,   siginfo->si_fd);
# endif

phar.phar 不存在,手动将phar.php 重命名。在make 之后 make install 之前

无法手动再编译扩展,只能随源码编译