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

Build regression after upgrading MySQL version on Windows #2231

Closed
3 of 6 tasks
peace-maker opened this issue Dec 15, 2024 · 0 comments · Fixed by #2232
Closed
3 of 6 tasks

Build regression after upgrading MySQL version on Windows #2231

peace-maker opened this issue Dec 15, 2024 · 0 comments · Fixed by #2232
Labels
Bug general bugs; can be anything

Comments

@peace-maker
Copy link
Member

Help us help you

  • I have checked that my issue doesn't exist yet.
  • I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
  • I can always reproduce the issue with the provided description below.

Environment

  • Operating System version: Microsoft Windows Server 2022 10.0.20348
  • Game/AppID (with version if applicable):
  • Current SourceMod version:
  • Current SourceMod snapshot:
  • Current Metamod: Source snapshot:

Description

#2192 broke building the mysql extension on Windows - but only after some time? Probably Github Actions caching the old MySQL version?
The release notes for MySQL 5.5.55 state under Compilation Notes:

Windows builds now use the default runtime libraries (builds use the /MD flag). (Bug #25611609)

Which was the reason 5.5.54 was selected on Windows. We compile statically using /MT which links the libcmt.lib common runtime statically. The mysqlclient links the dynamic .dll now too which causes a conflict and would require the dynamic library to be available in the library path when loading the mysql extension.

This causes builds to fail to link in CI. The build servers don't use the checkout-deps.sh script and thus are still on the old mysql version 5.5.54.

Problematic Code (or Steps to Reproduce)

Build sourcemod on Windows and grab dependencies using the `tools/checkout-deps.sh` script.

Logs

LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library

LINK : warning LNK4286: symbol 'exit' defined in 'libucrt.lib(exit.obj)' is imported by 'mysqlclient.lib(str_alloc.obj)'

...


mysqlclient.lib(my_init.obj) : error LNK2001: unresolved external symbol __imp_getenv

mysqlclient.lib(handshake_client.obj) : error LNK2001: unresolved external symbol __imp_getenv

...

https://github.com/alliedmodders/sourcemod/actions/runs/12089683390/job/33715394830

@peace-maker peace-maker added the Bug general bugs; can be anything label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug general bugs; can be anything
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant