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

请问为什么xlswriter被删除了? #139

Closed
jatyPeng opened this issue May 13, 2023 · 20 comments
Closed

请问为什么xlswriter被删除了? #139

jatyPeng opened this issue May 13, 2023 · 20 comments

Comments

@jatyPeng
Copy link

@jingjingxyk 请问为什么xlswriter被删除了?您一般使用什么方案来解决xls读写文件的?我们之前使用 PHPExcel ,但是速度慢,所以就换了。您下线掉 xlswriter 是因为有更好的选择吗?

@jingjingxyk
Copy link
Contributor

@jatyPeng 因为一直都编译不成功,暂时把它移除了主分支。需要研究下xlswriter 源码,并做相应的修改。

具体信息看这里: #42

它还在这里了: jingjingxyk#59

@jatyPeng
Copy link
Author

好的。我去加他们的QQ群,看看是否能够支持下。

@jingjingxyk
Copy link
Contributor

jingjingxyk commented May 13, 2023

快速验证
添加这个文件: 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 

@jatyPeng
Copy link
Author

多谢您的回复,xlsWriter作者说会尽快给到支持。感谢大家。😀

@jatyPeng
Copy link
Author

@jingjingxyk 您xlsWriter用 main_static_built 分支编译试下,谢谢。

@netyum
Copy link

netyum commented May 13, 2023

原来就是不到自定义的宏,作者把定义宏提到了common里

不过,还得排掉 config.m4里的md5调用 就ok 了

@jatyPeng
Copy link
Author

原来就是不到自定义的宏,作者把定义宏提到了common里

不过,还得排掉 config.m4里的md5调用 就ok 了

能具体说下要怎么处理吗?🏊🏻‍♀️

@netyum
Copy link

netyum commented May 14, 2023

打开xlswriter扩展里的config.m4,删除带有md5的行,应该有两处,重新config,build就过了。

@jingjingxyk
Copy link
Contributor

快速验证 添加这个文件: 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

@jingjingxyk
Copy link
Contributor


/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

@jingjingxyk
Copy link
Contributor

构建好了:
https://github.com/jingjingxyk/swoole-cli/actions/runs/4970402562
https://github.com/jingjingxyk/swoole-cli/actions/runs/4970402472
按照提供的办法,加了 hook 后,能编译通过
可以下载下来试试

@jatyPeng
Copy link
Author

@jingjingxyk 您编译个支持m1的,我来下载测试。谢谢。

@jingjingxyk
Copy link
Contributor

jingjingxyk commented May 14, 2023

@jatyPeng 我没有M1 的 macos

github action 关于macos m1 actions/runner#805 (comment)

@jingjingxyk
Copy link
Contributor

jingjingxyk commented May 14, 2023

--with-xlswriter --enable-reader --with-openssl-md5

  # --with-openssl-md5 使用Openssl MD5
  # --with-bundled-md5 使用内置MD5

具体看这里:viest/php-ext-xlswriter#479 (comment)

我改了下 换成下面这个, 上面两个参数 不要了,换成 --with-openssl-dir=
viest/php-ext-xlswriter#479 (comment)

--with-xlswriter --enable-reader --with-openssl-dir=/usr/openssl

@jatyPeng
Copy link
Author

@jingjingxyk 我看您一直在编译,也看不懂您在处理什么。如果需要沟通的您直接说哈。

@jingjingxyk
Copy link
Contributor

@jatyPeng 对于 外部依赖库的路径处理

@jatyPeng
Copy link
Author

@jatyPeng 对于 外部依赖库的路径处理

看不懂啊。。您能去对方git里再沟通吗?

@jingjingxyk
Copy link
Contributor

@jatyPeng 对于 外部依赖库的路径处理

看不懂啊。。您能去对方git里再沟通吗?

viest/php-ext-xlswriter#483

@jingjingxyk
Copy link
Contributor

@jatyPeng 验证完毕了,现在可以了哈。 你可以在你的 macos m1 上试试

git clone -b feature_ext_xlswriter  https://github.com/jingjingxyk/swoole-cli.git 

@jatyPeng
Copy link
Author

@jingjingxyk 非常感谢周末也帮忙处理这些问题。我看xlsWriter作者早上6点也将代码合并到了master。此事完美解决了。我关掉此issue了。
等您合并推送到cli master,我就可以找cli打带swoole-loader的包了。😀

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

No branches or pull requests

4 participants