Closed jatyPeng closed 1 year ago
@jatyPeng 因为一直都编译不成功,暂时把它移除了主分支。需要研究下xlswriter 源码,并做相应的修改。
好的。我去加他们的QQ群,看看是否能够支持下。
快速验证 添加这个文件: https://github.com/jingjingxyk/swoole-cli/blob/feature_ext_xlswriter/conf.d/xlswriter.php
php prepare.php --with-build-type=release \
-zip -swoole -curl -gd -imagick -mongodb -redis -sqlite3 -pdo_sqlite -mysqli -pdo_mysql -soap -xsl -gmp -yaml \
-openssl -bcmatch -pcntl -mbstring -sockets -mysqlnd -sodium -exif -readline -intl -opcache -bcmath \
-pdo \
+xlswriter
bash make.sh config
bash make.sh build
多谢您的回复,xlsWriter作者说会尽快给到支持。感谢大家。😀
@jingjingxyk 您xlsWriter用 main_static_built 分支编译试下,谢谢。
原来就是不到自定义的宏,作者把定义宏提到了common里
不过,还得排掉 config.m4里的md5调用 就ok 了
原来就是不到自定义的宏,作者把定义宏提到了common里
不过,还得排掉 config.m4里的md5调用 就ok 了
能具体说下要怎么处理吗?🏊🏻♀️
打开xlswriter扩展里的config.m4,删除带有md5的行,应该有两处,重新config,build就过了。
快速验证 添加这个文件: https://github.com/jingjingxyk/swoole-cli/blob/feature_ext_xlswriter/conf.d/xlswriter.php
php prepare.php --with-build-type=release \ -zip -swoole -curl -gd -imagick -mongodb -redis -sqlite3 -pdo_sqlite -mysqli -pdo_mysql -soap -xsl -gmp -yaml \ -openssl -bcmatch -pcntl -mbstring -sockets -mysqlnd -sodium -exif -readline -intl -opcache -bcmath \ -pdo \ +xlswriter bash make.sh config bash make.sh build
按照这个,我本地已经编译成功 https://github.com/jingjingxyk/swoole-cli/pull/59/files#diff-fdc5006be5d11efba7f32aa4463ef212c137e952383aad3991f709589456407b
不过,还需要有处理的地方
https://github.com/jingjingxyk/swoole-cli/actions/runs/4970122832/jobs/8893799193
/usr/bin/ld: /usr/openssl/lib/libcrypto.a(libcrypto-lib-md5_dgst.o): in function `MD5_Update':
md5_dgst.c:(.text+0x0): multiple definition of `MD5_Update'; ext/xlswriter/library/libxlsxwriter/third_party/md5/md5.o:/work/ext/xlswriter/library/libxlsxwriter/third_party/md5/md5.c:219: first defined here
/usr/bin/ld: /usr/openssl/lib/libcrypto.a(libcrypto-lib-md5_dgst.o): in function `MD5_Final':
md5_dgst.c:(.text+0x130): multiple definition of `MD5_Final'; ext/xlswriter/library/libxlsxwriter/third_party/md5/md5.o:/work/ext/xlswriter/library/libxlsxwriter/third_party/md5/md5.c:259: first defined here
/usr/bin/ld: /usr/openssl/lib/libcrypto.a(libcrypto-lib-md5_dgst.o): in function `MD5_Init':
md5_dgst.c:(.text+0x1e0): multiple definition of `MD5_Init'; ext/xlswriter/library/libxlsxwriter/third_party/md5/md5.o:/work/ext/xlswriter/library/libxlsxwriter/third_party/md5/md5.c:208: first defined here
more info : https://github.com/jingjingxyk/swoole-cli/actions/runs/4970122832/jobs/8893799193#step:7:8456
构建好了: https://github.com/jingjingxyk/swoole-cli/actions/runs/4970402562 https://github.com/jingjingxyk/swoole-cli/actions/runs/4970402472 按照提供的办法,加了 hook 后,能编译通过 可以下载下来试试
@jingjingxyk 您编译个支持m1的,我来下载测试。谢谢。
@jatyPeng 我没有M1 的 macos
github action 关于macos m1 https://github.com/actions/runner/issues/805#issuecomment-1438149537
--with-xlswriter --enable-reader --with-openssl-md5
# --with-openssl-md5 使用Openssl MD5
# --with-bundled-md5 使用内置MD5
具体看这里:https://github.com/viest/php-ext-xlswriter/pull/479#issuecomment-1546815878
我改了下 换成下面这个, 上面两个参数 不要了,换成 --with-openssl-dir= https://github.com/viest/php-ext-xlswriter/pull/479#issuecomment-1546880076
--with-xlswriter --enable-reader --with-openssl-dir=/usr/openssl
@jingjingxyk 我看您一直在编译,也看不懂您在处理什么。如果需要沟通的您直接说哈。
@jatyPeng 对于 外部依赖库的路径处理
@jatyPeng 对于 外部依赖库的路径处理
看不懂啊。。您能去对方git里再沟通吗?
@jatyPeng 对于 外部依赖库的路径处理
看不懂啊。。您能去对方git里再沟通吗?
@jatyPeng 验证完毕了,现在可以了哈。 你可以在你的 macos m1 上试试
git clone -b feature_ext_xlswriter https://github.com/jingjingxyk/swoole-cli.git
@jingjingxyk 非常感谢周末也帮忙处理这些问题。我看xlsWriter作者早上6点也将代码合并到了master。此事完美解决了。我关掉此issue了。 等您合并推送到cli master,我就可以找cli打带swoole-loader的包了。😀
@jingjingxyk 请问为什么xlswriter被删除了?您一般使用什么方案来解决xls读写文件的?我们之前使用 PHPExcel ,但是速度慢,所以就换了。您下线掉 xlswriter 是因为有更好的选择吗?