MinGW-w64 build of `wg_core` fails to link: `rstrtmgr` is only requested through `#pragma comment(lib)`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cmake, cpp
- Domain
- build-system
Research direction
Start by reading clean/installer/CMakeLists.txt and clean/installer/build-mingw.sh, then check how each build route links wg_core and uses LIBS. Add the Restart Manager library to both link configurations as described in the issue, and confirm the MinGW build links successfully.
Written by the indexing model from the issue text.
Description
Since the Restart Manager check in src/wg_core/record.cpp (#include <restartmanager.h> and
#pragma comment(lib, "rstrtmgr.lib")), a MinGW-w64 build fails at link time:
ld.lld: error: undefined symbol: RmStartSession
ld.lld: error: undefined symbol: RmRegisterResources
ld.lld: error: undefined symbol: RmGetList
ld.lld: error: undefined symbol: RmEndSession
#pragma comment(lib, ...) is an MSVC extension, so GCC and clang under MinGW ignore it. This hits the documented
MinGW routes: build-mingw.sh and the CMake build with a MinGW toolchain (also what clean/linux/run_wine_tests.py --tests launcher uses). The MSVC build is not affected.
Suggested fix: add rstrtmgr to target_link_libraries(wg_core PUBLIC ...) in clean/installer/CMakeLists.txt and
-lrstrtmgr to LIBS in clean/installer/build-mingw.sh (harmless with MSVC). Adding a MinGW build job to CI would
catch this kind of break; happy to send either as a small PR.
- Dominant language
- C++
- Stars
- 12
- Forks
- 2
- Avg merge
- 3h 10m
- Merged PRs (30d)
- 171
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phantoslayer21/wronggpu
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
phantoslayer21/wronggpu#275 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
phantoslayer21/wronggpu#241 ·
Maintainers usually reply within 1 day
-
bug build
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
phantoslayer21/wronggpu#234 ·
Maintainers usually reply within 1 day
-
bug build
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
phantoslayer21/wronggpu#233 ·
Maintainers usually reply within 1 day
-
area: build-ci build
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phantoslayer21/wronggpu#56 ·
Maintainers usually reply within 1 day
All issues in phantoslayer21/wronggpu
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ReyeMe/SaturnRingLib#155 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Nheko-Reborn/nheko#2092 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
isocpp/CppCoreGuidelines#2345 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
ROCm/rocm-libraries#16108 ·
Maintainers usually reply within 2 days