xmake-io / xmake-repo

📦 An official xmake package repository
https://xrepo.xmake.io
Apache License 2.0
687 stars 396 forks source link

fix_poco_shared_build #4994

Closed SnowinterCat closed 2 months ago

SnowinterCat commented 2 months ago
SnowinterCat commented 2 months ago

Poco库的mysql模块本身是支持Mysql或者MariaDB的,不过它的头文件里面写死了使用

#include <mysql/mysql.h>

但是xmake-repo编译出来的MariaDB的头文件是: mariadb/mysql.h 我为了进行支持,在用户选择Poco中的mariadb选项的时候,将Poco/Data/MySQL模块中所有用到了

#include <mysql/mysql.h>

都改成了

#include <mariadb/mysql.h>

来进行支持。 这样子做好吗?如果不好的话,有没有别的办法? @waruqi

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


The mysql module of the Poco library itself supports Mysql or MariaDB, but its use is hard-coded in its header file.

#include <mysql/mysql.h>

But the header file of MariaDB compiled by xmake-repo is: mariadb/mysql.h In order to provide support, when the user selects the mariadb option in Poco, I use all the modules in the Poco/Data/MySQL module.

#include <mysql/mysql.h>

All changed to

#include <mariadb/mysql.h>

to support. Is this a good idea? If it's not good, is there any other way? @waruqi

waruqi commented 2 months ago

Poco库的mysql模块本身是支持Mysql或者MariaDB的,不过它的头文件里面写死了使用

#include <mysql/mysql.h>

但是xmake-repo编译出来的MariaDB的头文件是: mariadb/mysql.h 我为了进行支持,在用户选择Poco中的mariadb选项的时候,将Poco/Data/MySQL模块中所有用到了

#include <mysql/mysql.h>

都改成了

#include <mariadb/mysql.h>

来进行支持。 这样子做好吗?如果不好的话,有没有别的办法? @waruqi

可以

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


The mysql module of the Poco library itself supports Mysql or MariaDB, but its use is hard-coded in its header file.

#include <mysql/mysql.h>

But the header file of MariaDB compiled by xmake-repo is: mariadb/mysql.h. For support, when the user selects the mariadb option in Poco, all the modules in Poco/Data/MySQL are used.

#include <mysql/mysql.h>

All changed to

#include <mariadb/mysql.h>

for support. Is this a good idea? If it's not good, is there any other way? @waruqi

Can

waruqi commented 2 months ago

@star-hengxing https://github.com/xmake-io/xmake-repo/commit/9b9642fe7120272115020c065734b1ad6a3f3da9

这个 patch break 了 boost

error: ./packages/b/boost/xmake.lua:285: 'then' expected near '!'

SnowinterCat commented 2 months ago

在android平台上的armeabi-v7a架构r22中,会因为pcre2需要大于r22的ndk而失败,但是在arm64-v8a架构r22下不会,这个是什么原因呢?

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


In the armeabi-v7a architecture r22 on the android platform, it will fail because pcre2 requires an ndk larger than r22, but it will not fail in the arm64-v8a architecture r22. What is the reason for this?

SnowinterCat commented 2 months ago

这个Wasm平台会出现poco找不到pcre2,这就很奇怪了。我手动指定了pcre2的路径也不行,我只能暂时让poco不支持wasm了

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


This Wasm platform will show that poco cannot find pcre2, which is very strange. Even if I manually specify the path to pcre2, it doesn't work. I can only temporarily disable poco from supporting wasm.

star-hengxing commented 2 months ago

在android平台上的armeabi-v7a架构r22中,会因为pcre2需要大于r22的ndk而失败,但是在arm64-v8a架构r22下不会,这个是什么原因呢?

因为 pcre2 加了 on_check 过滤 ci https://github.com/xmake-io/xmake-repo/pull/4173

star-hengxing commented 2 months ago

这个Wasm平台会出现poco找不到pcre2,这就很奇怪了。我手动指定了pcre2的路径也不行,我只能暂时让poco不支持wasm了

这个不知道是 cmake or xmake 的原因,很多包在 wasm 平台上总是 find_package 失败

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


This Wasm platform will show that poco cannot find pcre2, which is very strange. Even if I manually specify the path to pcre2, it doesn't work. I can only temporarily disable poco from supporting wasm.

I don’t know if this is caused by cmake or xmake. Many packages always fail to find_package on the wasm platform.

SnowinterCat commented 2 months ago

在android平台上的armeabi-v7a架构r22中,会因为pcre2需要大于r22的ndk而失败,但是在arm64-v8a架构r22下不会,这个是什么原因呢?

因为 pcre2 加了 on_check 过滤 ci #4173

我其实是奇怪,为什么armeabi-v7a架构r22会报错 need ndk > 22,但是arm64-v8a架构r22 不会报错 need ndk > 22。就不是很方便做检查。不过既然pcre2已经有这个检查了,那poco应该就没必要加了吧

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


In the armeabi-v7a architecture r22 on the android platform, it will fail because pcre2 requires an ndk larger than r22, but not in the arm64-v8a architecture r22. What is the reason for this?

Because pcre2 added on_check filtering ci #4173

I am actually curious why the armeabi-v7a architecture r22 will report the error need ndk > 22, but the arm64-v8a architecture r22 will not report the error need ndk > 22. It is not very convenient for inspection. But since pcre2 already has this check, there should be no need for poco to add it.

SnowinterCat commented 2 months ago

@waruqi 这下应该正式完工了,如果只有三个因为pcre2的ndk版本导致的失败的话

SnowinterCat commented 2 months ago

最后的on_test中注释掉的那5个是exe,没有头文件我不清楚怎么测试。等以后别人来补充吧

SnowinterCat commented 2 months ago

所以如果全部编译,应该是22个dll(MySql模块和MariaDB模块冲突),加上Windows特供的NetSSL_Win.dll,一共23个;加上5个exe

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


@waruqi It should be officially completed now, if there are only three failures caused by the ndk version of pcre2

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


The 5 commented out in the last on_test are exe. I don’t know how to test without the header file. Let others add it later.

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically.


So if you compile them all, there should be 22 dlls (the MySql module conflicts with the MariaDB module), plus NetSSL_Win.dll specially provided for Windows, a total of 23; plus 5 exes