Builds without problem on my computer and on Github actions but fails on Appveyor

costallat's Avatar

costallat

22 May, 2020 06:40 PM

Hi there,

I have a change that is working locally in Linux, but it was failing on Windows (Github Action + Appveyor). To try to fix that I opened the code on the Visual Studio where it gave a very stranger error, complaining about something that was isolated by namespace, I fixed that and the build on Github actions(were the project uses vcpkg + cmake) started to work, but on Appveyor where it get things from the VS project it didn't work. So I tried to change the/update the project files, I saw a few changes that VS made after I open the project updating to VS 2019. Now it's working but only locally and I am not a master on Windows stuff so I don't know more were to look if it is working locally with the VS 2019 and same code from repo.

This is my PR with the changes (there a lot of 'testing' commits trying to fix the build on appveyor)
https://github.com/FootOT/otservbr-global/pull/15

Project on AppVeyor:
https://ci.appveyor.com/project/Costallat/otservbr-global

  1. Support Staff 1 Posted by Feodor Fitsner on 22 May, 2020 07:19 PM

    Feodor Fitsner's Avatar

    Try disabling vcpkg cache. It could do a trick.

  2. 2 Posted by costallat on 22 May, 2020 09:46 PM

    costallat's Avatar

    I am trying but the build takes too long > 1hr and it is aborted, it's possible to increase the job timeout?

    Thanks

  3. 3 Posted by costallat on 22 May, 2020 11:33 PM

    costallat's Avatar

    Found the problem, for some reason the Windows compiler complains that a value inside my enum is a 'constant', I opened the code on another machine and VS show that even if I am inside a namespace and on my own 'enum' the values "ERROR_INVALID_PASSWORD" and "ERROR_INVALID_NAME" are some global values that can't be used.

    I didn't go further to check where/why, as my main OS is Linux, but that was a very stranger things.

    After changing those enum 'names' the code compiled!

    Thanks for the help!

    BR,
    Renato Foot

  4. Support Staff 4 Posted by Feodor Fitsner on 23 May, 2020 03:41 AM

    Feodor Fitsner's Avatar

    I'm glad you managed to fix that! Thanks for the update!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac