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

Windows - Meson does not check if the version of installed libraries match with the one built with #3099

Open
bilhox opened this issue Sep 14, 2024 · 5 comments
Labels
meson Meson build system Windows

Comments

@bilhox
Copy link
Contributor

bilhox commented Sep 14, 2024

Hello,

First of all, this is more an enhancement proposal. A fast solution is just to delete prebuild directories, and let meson (download_win_prebuilt.py) recreate them.

Currently this is how meson checks if libraries are downloaded and download them if it's not the case :

prebuilt_dir = base_dir / 'prebuilt-' + arch_suffix

    # download prebuilts (uses legacy builconfig code)
    if not fs.is_dir(prebuilt_dir)
        run_command(
            [
                find_program('python3', 'python'),
                'buildconfig/download_win_prebuilt.py',
            ],
            check: true,
        )
    endif

As you can see it only checks if the directory is here. So basically if the version does not match with the downloaded version, it should delete the directories, and redownload them.

@bilhox bilhox added Windows meson Meson build system labels Sep 14, 2024
@Starbuck5
Copy link
Member

I see the root problem as the buildconfig being too picky about dependency versions. If the new bundled is 2.30.7 and I only have 2.30.6 downloaded it should still build fine.

But I see why the meson buildconfig was written the way it was, it's not trying to change too much stuff from the setup.py buildconfig, so it doesn't change the directories so that the SDL version number isn't in the directory name.

@ankith26
Copy link
Member

This was kinda intentional really. As starbuck said, it just follows closely what the old buildconfig is doing. So I don't see anything that needs fixing here

@bilhox
Copy link
Contributor Author

bilhox commented Sep 22, 2024

@ankith26 As I said, it's more an enhancement proposal (forgot to add the label btw). I know it's intentional, but could be interesting to make the install program smarter.

@ankith26
Copy link
Member

Hmm, thinking about it, I think the current behavior is actually better than what you propose because it gives the developer more control. With the current system, you just gotta delete the existing prebuilts folder to force an upgrade.

Now I'm not a windows user, but I can see the usecase for a dev downgrading SDL. If the buildconfig is going to "auto upgrade", it may lead to conflicts

@bilhox
Copy link
Contributor Author

bilhox commented Sep 22, 2024

I think there might be a better solution, proposing a better error message if it fails to find the correct version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meson Meson build system Windows
Projects
None yet
Development

No branches or pull requests

3 participants