Conversation
There was a problem hiding this comment.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
PRs must add only one version and must not modify any published versions
When making any changes to a library, the version or port-version in vcpkg.json or CONTROL must be modified.
Error: Local changes detected for drogon but no changes to version or port version.
-- Version: 1.7.4
-- Old SHA: 275d55a78bb61a79f0d66cd4f71e6b5892566666
-- New SHA: d7a1f5f19430546a7029c491986f87f9dcd954be
-- Did you remember to update the version or port version?
-- Pass `--overwrite-version` to bypass this check.
***No files were updated.***
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout b934807c799fd84c2e1e168b8d3472d4904a6f90 -- versions
./vcpkg x-add-version --allDiff
diff --git a/versions/d-/drogon.json b/versions/d-/drogon.json
index 566ebb7..d929cf6 100644
--- a/versions/d-/drogon.json
+++ b/versions/d-/drogon.json
@@ -1,10 +1,5 @@
{
"versions": [
- {
- "git-tree": "d7a1f5f19430546a7029c491986f87f9dcd954be",
- "version-semver": "1.7.4",
- "port-version": 1
- },
{
"git-tree": "275d55a78bb61a79f0d66cd4f71e6b5892566666",
"version-semver": "1.7.4",1821015 to
6f94d62
Compare
There was a problem hiding this comment.
This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!
After committing all other changes, the version database must be updated
git add -u && git commit
git checkout b934807c799fd84c2e1e168b8d3472d4904a6f90 -- versions
./vcpkg x-add-version --allDiff
diff --git a/versions/d-/drogon.json b/versions/d-/drogon.json
index 0f2a526..c38c515 100644
--- a/versions/d-/drogon.json
+++ b/versions/d-/drogon.json
@@ -1,7 +1,7 @@
{
"versions": [
{
- "git-tree": "554d8b686b5422c8e2489f4877f638c02acb0d5f",
+ "git-tree": "d9488b60c0805941903425f6dfac74195d4cb6fb",
"version-semver": "1.7.4",
"port-version": 1
},|
I really don't like this; I'd much prefer if we fixed libmariadb to support |
| - find_package(MySQL) | ||
| - if (MySQL_FOUND) | ||
| + find_package(unofficial-libmariadb CONFIG REQUIRED) | ||
| + if (unofficial-libmariadb_FOUND) |
There was a problem hiding this comment.
A minimal patch would just take
# Find mysql, only mariadb client liberary is supported
- find_package(MySQL)
+ find_package(unofficial-libmariadb CONFIG REQUIRED)
+ set(MySQL_FOUND TRUE)
+ set(MySQL_lib unofficial::libmariadb)
if (MySQL_FOUND)The REQUIRED implies that the build stops if unofficial-libmariadb isn't found.
There was a problem hiding this comment.
A minimal patch would just take
# Find mysql, only mariadb client liberary is supported - find_package(MySQL) + find_package(unofficial-libmariadb CONFIG REQUIRED) + set(MySQL_FOUND TRUE) + set(MySQL_lib unofficial::libmariadb) if (MySQL_FOUND)The
REQUIREDimplies that the build stops if unofficial-libmariadb isn't found.
I've tried set(MySQL_FOUND TRUE) before, but it will throw an error when you are syncing your own project since MySQL can't be found. Does set(MySQL_lib unofficial::libmariadb) solve this issue?
There was a problem hiding this comment.
I've tried
set(MySQL_FOUND TRUE)before, but it will throw an error when you are syncing your own project since MySQL can't be found.
I see.
Does
set(MySQL_lib unofficial::libmariadb)solve this issue?
I cannot answer that without know the error message. "syncing your own project " isn't clear.
But it seems either your project shouldn't directly depend on MySQL_FOUND when MySQL actually isn't used, or it is implicitly relying on drogon's FindMySQL.cmake, and then you need to patch that script instead.
There was a problem hiding this comment.
"syncing your own project " isn't clear.
Actually I mean generating Makefile from CMake after all vcpkg packages installed.
I cannot answer that without know the error message.
CMake will generate DrogonConfig.cmake in vcpkg_installed/[triplet]/share/drogon. It will call find_dependency(MySQL), which will fail since mariadb changed its name.
Also when trying your patch, I got build error.
FAILED: CMakeFiles/drogon.dir/orm_lib/src/mysql_impl/MysqlConnection.cc.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DUSE_BROTLI -DUSE_OSSP_UUID=0 -I/Users/kotori0/vcpkg/buildtrees/drogon/src/v1.7.4-3e6a1930a1.clean/lib/inc -I/Users/kotori0/vcpkg/buildtrees/drogon/src/v1.7.4-3e6a1930a1.clean/orm_lib/inc -I/Users/kotori0/vcpkg/buildtrees/drogon/src/v1.7.4-3e6a1930a1.clean/nosql_lib/redis/inc -I/Users/kotori0/vcpkg/buildtrees/drogon/x64-osx-dbg -I/Users/kotori0/vcpkg/buildtrees/drogon/src/v1.7.4-3e6a1930a1.clean/trantor -I/Users/kotori0/vcpkg/buildtrees/drogon/x64-osx-dbg/exports -isystem /Users/kotori0/Downloads/test/cmake-build-debug/vcpkg_installed/x64-osx/include -isystem /Users/kotori0/Downloads/test/cmake-build-debug/vcpkg_installed/x64-osx/include/uuid -isystem /Library/Frameworks/Mono.framework/Headers -fPIC -g -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -std=c++17 -MD -MT CMakeFiles/drogon.dir/orm_lib/src/mysql_impl/MysqlConnection.cc.o -MF CMakeFiles/drogon.dir/orm_lib/src/mysql_impl/MysqlConnection.cc.o.d -o CMakeFiles/drogon.dir/orm_lib/src/mysql_impl/MysqlConnection.cc.o -c /Users/kotori0/vcpkg/buildtrees/drogon/src/v1.7.4-3e6a1930a1.clean/orm_lib/src/mysql_impl/MysqlConnection.cc
In file included from /Users/kotori0/vcpkg/buildtrees/drogon/src/v1.7.4-3e6a1930a1.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:15:
/Users/kotori0/vcpkg/buildtrees/drogon/src/v1.7.4-3e6a1930a1.clean/orm_lib/src/mysql_impl/MysqlConnection.h:25:10: fatal error: 'mysql.h' file not found
#include <mysql.h>
^~~~~~~~~
1 error generated.
There was a problem hiding this comment.
MySQL_lib is a target, so my proposed set(MySQL_lib ...) can't help - sorry for the confusion. Your change to the target_link_libraries is already the right thing at this point.
Variable or not, when linking unofficial::libmariadb while building, the exported config will link to unofficial::libmariadb, too. So you need to replace the find_dependency(MySQL) with find_dependency(unofficial-libmariadb).
(@strega-nil-ms proposed to only patch FindMySQL.cmake. It is possible to handle the redirection entirely in that module, but it might be even more confusing when something goes wrong.)
I wanted to attach a test patch now, but I just run into another build issue with drogon. Either you try yourself again, or you wait a moment.
Note that |
|
Can you please resolve the file conflict? |
Describe the pull request
#21359 changed paths for libmariadb, which makes drogon fails to find them
What does your PR fix?
The Mysql is not supported by drogon, please install the development library first. drogonframework/drogon#1146
Which triplets are supported/not supported? Have you updated the CI baseline?
Not touched, No
Does your PR follow the maintainer guide?
Yes
If you have added/updated a port: Have you run
./vcpkg x-add-version --alland committed the result?Yes
If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/