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

[libmariadb] Fix patch #10043

Merged
merged 1 commit into from Feb 26, 2020
Merged

Conversation

JackBoosY
Copy link
Contributor

Due to version update, fix outdated patche.

Related: #10024.

Note: this port doesn't contain any features.

@JackBoosY JackBoosY added the info:internal This PR or Issue was filed by the vcpkg team. label Feb 13, 2020
This was referenced Feb 13, 2020
@LilyWangL
Copy link
Contributor

/azp run

@MoustafaFL
Copy link

I added the commits by myself to my vcpkg folder (in my PC) and tried to rebuild still same error or adding it by myself isn't an option?

@JackBoosY
Copy link
Contributor Author

@Moustafa1337 Could you provide failure logs?

@jo3bingham
Copy link

I checked this branch out and tested it; works for me.

@JackBoosY
Copy link
Contributor Author

@Moustafa1337 @ainz7892 please pull this branch.

@MoustafaFL
Copy link

MoustafaFL commented Feb 19, 2020

Still

Computing installation plan...
The following packages will be built and installed:
libmariadb[core]:x64-windows
Starting package 1/1: libmariadb:x64-windows
Building package libmariadb[core]:x64-windows...
-- Using cached E:/vcpkg/downloads/MariaDB-mariadb-connector-c-8e9c3116105d9a998a60991b7f4ba910d454d4b1.tar.gz
-- Extracting source E:/vcpkg/downloads/MariaDB-mariadb-connector-c-8e9c3116105d9a998a60991b7f4ba910d454d4b1.tar.gz
-- Applying patch md.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:50 (message):
Applying patch failed. Patch needs to be updated to work with source being
used by vcpkg!
Call Stack (most recent call first):
scripts/cmake/vcpkg_extract_source_archive_ex.cmake:134 (vcpkg_apply_patches)
scripts/cmake/vcpkg_from_github.cmake:139 (vcpkg_extract_source_archive_ex)
ports/libmariadb/portfile.cmake:8 (vcpkg_from_github)
scripts/ports.cmake:90 (include)

Error: Building package libmariadb:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: libmariadb:x64-windows
Vcpkg version: 2020.02.04-nohash

Additionally, attach any relevant sections from the log files above.

@JackBoosY
Copy link
Contributor Author

@Moustafa1337 Could you provide your cmake version?

@MoustafaFL
Copy link

cmake version 3.16.4

@NoFr1ends
Copy link
Contributor

@JackBoosY Applying this patch fixes the issue for me

@JackBoosY
Copy link
Contributor Author

/azp run

@LilyWangL LilyWangL marked this pull request as ready for review February 20, 2020 13:02
@LilyWangL LilyWangL added the info:reviewed Pull Request changes follow basic guidelines label Feb 20, 2020
Copy link

@Derimax3 Derimax3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- Extracting source C:/Users/Adorius Black/vcpkg/downloads/MariaDB-mariadb-connector-c-8e9c3116105d9a998a60991b7f4ba910d454d4b1.tar.gz
-- Applying patch md.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:50 (message):
Applying patch failed. Patch needs to be updated to work with source being
used by vcpkg!
Call Stack (most recent call first):
scripts/cmake/vcpkg_extract_source_archive_ex.cmake:134 (vcpkg_apply_patches)
scripts/cmake/vcpkg_from_github.cmake:139 (vcpkg_extract_source_archive_ex)
ports/libmariadb/portfile.cmake:8 (vcpkg_from_github)
scripts/ports.cmake:90 (include)

Error: Building package libmariadb:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: libmariadb:x64-windows
Vcpkg version: 2020.02.04-nohash

@JackBoosY JackBoosY removed the info:reviewed Pull Request changes follow basic guidelines label Feb 21, 2020
@JackBoosY
Copy link
Contributor Author

@Moustafa1337 @NoFr1ends @Derimax3 After installed cmake 3.16.4, I still can't repro that.
Could you provide failure logs VCPKG_PATH/buildtrees/libmariadb/patch-x86-windows-*-err.log ?

@Derimax3
Copy link

@Moustafa1337 @NoFr1ends @Derimax3 After installed cmake 3.16.4, I still can't repro that.
Could you provide failure logs VCPKG_PATH/buildtrees/libmariadb/patch-x86-windows-*-err.log ?

Hello JackBoosY this is log from patch-x86-windows-0-err
error: corrupt patch at line 13

@Derimax3
Copy link

@Moustafa1337 @NoFr1ends @Derimax3 After installed cmake 3.16.4, I still can't repro that.
Could you provide failure logs VCPKG_PATH/buildtrees/libmariadb/patch-x86-windows-*-err.log ?

Should I reinstall Cmake? Sorry i am totaly beginner in this. What version should i have? Because i have cmake-3.17.0 .

@JackBoosY
Copy link
Contributor Author

@Derimax3 I think it has nothing to do with cmake version.
Can you delete VCPKG_PATH/buildtrees/libmariadb/src/ and try again?

Please provide full log.

@Derimax3
Copy link

@Derimax3 I think it has nothing to do with cmake version.
Can you delete VCPKG_PATH/buildtrees/libmariadb/src/ and try again?

Please provide full log.

I deleted /buildtrees/libmariadb/src/ and still same error.

C:\Users\Adorius Black\vcpkg>vcpkg install boost-iostreams:x64-windows boost-asio:x64-windows boost-system:x64-windows boost-filesystem:x64-windows boost-variant:x64-windows boost-lockfree:x64-windows luajit:x64-windows libmariadb:x64-windows pugixml:x64-windows mpir:x64-windows cryptopp:x64-windows
Computing installation plan...
The following packages are already installed:
boost-asio[core]:x64-windows
boost-filesystem[core]:x64-windows
boost-iostreams[core]:x64-windows
boost-lockfree[core]:x64-windows
boost-system[core]:x64-windows
boost-variant[core]:x64-windows
cryptopp[core]:x64-windows
The following packages will be built and installed:
libmariadb[core]:x64-windows
luajit[core]:x64-windows
mpir[core]:x64-windows
pugixml[core]:x64-windows
Package boost-filesystem:x64-windows is already installed
Package boost-asio:x64-windows is already installed
Package boost-iostreams:x64-windows is already installed
Package boost-lockfree:x64-windows is already installed
Package boost-system:x64-windows is already installed
Package boost-variant:x64-windows is already installed
Package cryptopp:x64-windows is already installed
Starting package 1/4: libmariadb:x64-windows
Building package libmariadb[core]:x64-windows...
-- Using cached C:/Users/Adorius Black/vcpkg/downloads/MariaDB-mariadb-connector-c-8e9c3116105d9a998a60991b7f4ba910d454d4b1.tar.gz
-- Extracting source C:/Users/Adorius Black/vcpkg/downloads/MariaDB-mariadb-connector-c-8e9c3116105d9a998a60991b7f4ba910d454d4b1.tar.gz
-- Applying patch md.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:50 (message):
Applying patch failed. Patch needs to be updated to work with source being
used by vcpkg!
Call Stack (most recent call first):
scripts/cmake/vcpkg_extract_source_archive_ex.cmake:134 (vcpkg_apply_patches)
scripts/cmake/vcpkg_from_github.cmake:139 (vcpkg_extract_source_archive_ex)
ports/libmariadb/portfile.cmake:8 (vcpkg_from_github)
scripts/ports.cmake:90 (include)

Error: Building package libmariadb:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: libmariadb:x64-windows
Vcpkg version: 2020.02.04-nohash

Additionally, attach any relevant sections from the log files above.

@JackBoosY
Copy link
Contributor Author

@ras0219-msft Can you take a look?
I still can't repro it.

@NoFr1ends
Copy link
Contributor

@JackBoosY You maybe misunderstood me but your PR is working for me.

@Toxe
Copy link
Contributor

Toxe commented Feb 21, 2020

I have had the same issue when trying to install libmariadb (error while trying to apply the md.patch file) and this PR fixes it on Mac, Linux and Windows.

Can we merge this into master?

@NoFr1ends
Copy link
Contributor

@Derimax3 Are you sure that you have checked out this PR instead of the master, or at least have applied this PR as a patch to your vcpkg folder?

@Derimax3
Copy link

I have had the same issue when trying to install libmariadb (error while trying to apply the md.patch file) and this PR fixes it on Mac, Linux and Windows.

Can we merge this into master?

Hi how you fixed it ? Can you tell me please?

@NoFr1ends
Copy link
Contributor

NoFr1ends commented Feb 21, 2020

I have had the same issue when trying to install libmariadb (error while trying to apply the md.patch file) and this PR fixes it on Mac, Linux and Windows.
Can we merge this into master?

Hi how you fixed it ? Can you tell me please?

You should learn how to use git and GitHub first.
Download: https://patch-diff.githubusercontent.com/raw/microsoft/vcpkg/pull/10043.patch
And then you can do for example git apply 10043.patch

@Derimax3
Copy link

Derimax3 commented Feb 21, 2020

I have had the same issue when trying to install libmariadb (error while trying to apply the md.patch file) and this PR fixes it on Mac, Linux and Windows.
Can we merge this into master?

Hi how you fixed it ? Can you tell me please?

You should learn how to use git and GitHub first.
Download: https://patch-diff.githubusercontent.com/raw/microsoft/vcpkg/pull/10043.patch
And then you can do for example git apply 10043.patch

One more question. How to download it? Just save it in vcpkg as text with name 10043.patch? or should i donwload it in git? Anyway Thank you. You pushed me little bit

@NoFr1ends
Copy link
Contributor

I have had the same issue when trying to install libmariadb (error while trying to apply the md.patch file) and this PR fixes it on Mac, Linux and Windows.
Can we merge this into master?

Hi how you fixed it ? Can you tell me please?

You should learn how to use git and GitHub first.
Download: https://patch-diff.githubusercontent.com/raw/microsoft/vcpkg/pull/10043.patch
And then you can do for example git apply 10043.patch

One more question. How to download it? Just save it in vcpkg as text with name 10043.patch? or should i donwload it in git?

Just download it so you have a file called 10043.patch (or anything else, but then you have to change the git apply command)

@Derimax3
Copy link

I have had the same issue when trying to install libmariadb (error while trying to apply the md.patch file) and this PR fixes it on Mac, Linux and Windows.
Can we merge this into master?

Hi how you fixed it ? Can you tell me please?

You should learn how to use git and GitHub first.
Download: https://patch-diff.githubusercontent.com/raw/microsoft/vcpkg/pull/10043.patch
And then you can do for example git apply 10043.patch

One more question. How to download it? Just save it in vcpkg as text with name 10043.patch? or should i donwload it in git?

Just download it so you have a file called 10043.patch (or anything else, but then you have to change the git apply command)

I downloaded it and i did i use this command: git apply 10043.patch

error: patch failed: ports/libmariadb/CONTROL:1
error: ports/libmariadb/CONTROL: patch does not apply
error: patch failed: ports/libmariadb/md.patch:1
error: ports/libmariadb/md.patch: patch does not apply
:-/

@NoFr1ends
Copy link
Contributor

On which branch are you and are you on the newest version?

@Derimax3
Copy link

On which branch are you and are you on the newest version?

https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows-(vcpkg)
I have cmake-3.17.0

@NoFr1ends
Copy link
Contributor

On which branch are you and are you on the newest version?

https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows-(vcpkg)
I have cmake-3.17.0

That wasn't my question..
Can you please do git pull then git apply 10043.patch again?

@Derimax3
Copy link

On which branch are you and are you on the newest version?

https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows-(vcpkg)
I have cmake-3.17.0

That wasn't my question..
Can you please do git pull then git apply 10043.patch again?

C:\Users\Adorius Black\vcpkg>git pull
Already up to date.

C:\Users\Adorius Black\vcpkg>git apply 10043.patch
error: patch failed: ports/libmariadb/CONTROL:1
error: ports/libmariadb/CONTROL: patch does not apply
error: patch failed: ports/libmariadb/md.patch:1
error: ports/libmariadb/md.patch: patch does not apply

Where should i donwload 10043.patch? Desktop,Vcpkg or it doesnt matter?

@Toxe
Copy link
Contributor

Toxe commented Feb 22, 2020

I have had the same issue when trying to install libmariadb (error while trying to apply the md.patch file) and this PR fixes it on Mac, Linux and Windows.
Can we merge this into master?

Hi how you fixed it ? Can you tell me please?

In this case you don't even have to bother with applying a PR to your code, simply just download the whole contents of the md.patch file from the PR and copy it to ports/libmariadb and you are done. And make of course sure that you have a clean install of Vcpkg.

Because this was basically just what I did when I tested this PR, because after I initially ran into this issue I had fixed it on my own and only after I was done I had the idea to actually look if other people ran into this issue as well and if someone already submitted a PR, which was of course the case. ;-)

@JackBoosY
Copy link
Contributor Author

Please follow the steps below:

  1. git clone https://github.com/JackBoosY/vcpkg.git
  2. git checkout -b dev/jack/10024 origin/dev/jack/10024
  3. ./bootstrap-vcpkg.bat
  4. ./vcpkg install libmariadb

@OlafvdSpek
Copy link
Contributor

Please follow the steps below:

  1. git clone https://github.com/JackBoosY/vcpkg.git

cd vcpkg

  1. git checkout -b dev/jack/10024 origin/dev/jack/10024
  2. ./bootstrap-vcpkg.bat
  3. ./vcpkg install libmariadb
Building package libmariadb[core]:x86-windows... done
Installing package libmariadb[core]:x86-windows...
Installing package libmariadb[core]:x86-windows... done
Elapsed time for package libmariadb:x86-windows: 2.286 min

Total elapsed time: 2.286 min

@Toxe
Copy link
Contributor

Toxe commented Feb 22, 2020

There is another way to just switch to a branch that contains exactly the changes of this PR:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
git fetch origin pull/10043/head:pr-fix-libmariadb
git checkout pr-fix-libmariadb
./bootstrap-vcpkg.sh
./vcpkg install libmariadb

This creates a new branch pr-fix-libmariadb from this PR.

@MoustafaFL
Copy link

There is another way to just switch to a branch that contains exactly the changes of this PR:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
git fetch origin pull/10043/head:pr-fix-libmariadb
git checkout pr-fix-libmariadb
./bootstrap-vcpkg.sh
./vcpkg install libmariadb

This creates a new branch pr-fix-libmariadb from this PR.

Thanks this fixed it for me, other solutions didn't work.

@JackBoosY JackBoosY added the info:reviewed Pull Request changes follow basic guidelines label Feb 24, 2020
@strega-nil
Copy link
Contributor

This looks good! (although I wonder how it ever worked...) Thanks! 😄

@strega-nil strega-nil merged commit 5d69273 into microsoft:master Feb 26, 2020
@JackBoosY JackBoosY deleted the dev/jack/10024 branch February 26, 2020 01:54
@JackBoosY
Copy link
Contributor Author

@strega-nil I just judate the patch. Looking at the changes in detail, you will find that the source code content related to the patch has been changed.

@OlafvdSpek
Copy link
Contributor

Shouldn't a test have caught the build failure before it was merged into master?

@JackBoosY
Copy link
Contributor Author

@OlafvdSpek Well, obviously the pipeline test didn't catch this regression.

@OlafvdSpek
Copy link
Contributor

Wouldn't that be an issue by itself?
They should've caught this right?

@strega-nil
Copy link
Contributor

@OlafvdSpek because mariadb clashes with mysql, we don't test it; this is an issue with our current CI system, and will be fixed at some point. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants