http://bugs.winehq.org/show_bug.cgi?id=58929
Bug ID: 58929 Summary: Missing IID_IMetaDataDispenserEx interface of class CLSID_CorMetaDataDispenser Product: Wine Version: 10.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@list.winehq.org Reporter: madebr@gmail.com Distribution: ---
Building a C application using a modern CMake using Visual C++ 2005 fails during manifest generation.
Reproducer:
- Fetch Visual C++ 2005 ``` git clone https://github.com/sourcehold/msvc1400 /tmp/msvc1400 ``` - Fetch small C hello world project ``` git clone https://github.com/madebr/build-helloworld /tmp/build-helloworld ``` - Download CMake for Windows, and add to PATH ``` CMAKE_VERSION=4.1.2 wget https://github.com/Kitware/CMake/releases/download/v$%7BCMAKE_VERSION%7D/cma... -O /tmp/cmake.zip unzip -j /tmp/cmake.zip -d /tmp/cmake export WINEPATH="/tmp/cmake/cmake-${CMAKE_VERSION}-windows-x86_64;${WINEPATH}" ```
- Start wine cmd shell
``` wine cmd ```
- Following commands must be run in the cmd shell - Set environment variables for VC++ ``` Z:\tmp\msvc1400\vsvars32-portable.bat ``` - Configure CMake project ``` cmake -S Z:\tmp\build-helloworld -B Z:\tmp\build-helloworld\build -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" --fresh ``` - Build CMake project ``` cmake --build Z:\tmp\build-helloworld\build --verbose ```
Result: build fails during manifest compilation ``` [ 33%] Linking C shared library library_shared.dll 0694:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 00000000009AFEE0 C:\cmake\bin\cmake.exe -E vs_link_dll --msvc-ver=1400 --intdir=CMakeFiles\library_shared.dir --rc=Z:\tmp \msvc1400\VC\bin\rc.exe --mt=Z:\tmp\msvc1400\VC\bin\mt.exe --manifests -- Z:\tmp\msvc1400\VC\bin\link.exe /nologo @ CMakeFiles\library_shared.dir\objects1.rsp @C:\users\maarten\Temp\nm5a27.tmp 0674:fixme:powrprof:PowerRegisterSuspendResumeNotification (0x00000002,00000000009AFD30,00000000009AFD50) stub! 0654:fixme:process:NtQueryInformationProcess (0xffffffffffffffff,info_class=49,0x1fdfdc8,0x00000008,(nil)) Unknown information class Visual Studio Non-Incremental Link LINK: Z:\tmp\msvc1400\VC\bin\link.exe /nologo @CMakeFiles\library_shared.dir\objects1.rsp /out:library_shared.dll /impl ib:library_shared.lib /pdb:Z:\home\maarten\projects\helloworld\build-msvc1400\library_shared.pdb /dll /version:0. 0 /machine:X86 /INCREMENTAL:NO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\library_shared.dir/intermediate.manifest 0638:fixme:msvcrt:__clean_type_info_names_internal (1032938C) stub Creating library library_shared.lib and object library_shared.exp MT: Z:\tmp\msvc1400\VC\bin\mt.exe /nologo /manifest CMakeFiles\library_shared.dir/intermediate.manifest /outputresour ce:library_shared.dll;#2 068c:fixme:ole:CoCreateInstanceEx no instance created for interface {31bcfce2-dafb-11d2-9f81-00c04f79a0a3} of class {e5cb7a31-7512-11d2-89ce-0080c792e5d8}, hr 0x80040111. wine: Unhandled page fault on read access to 00000908 at address 01094124 (thread 068c), starting debugger... ```
magnumdb.com tells me {e5cb7a31-7512-11d2-89ce-0080c792e5d8} is CLSID_CorMetaDataDispenser and {31bcfce2-dafb-11d2-9f81-00c04f79a0a3} is IID_IMetaDataDispenserEx.
I pinpointed the issue to `MT.EXE`, which parsed manifests. The following command reproduces the same error: ``` mt -nologo -manifest Z:\tmp\build-helloworld\extra\exe_gui_manifest.txt -outputresource:"Z:\tmp\build-helloworld\build\exe_gui.exe; #1" ``` (This assumes `exe_gui.exe` has been built correctly. It can be replaced with any other executable)