Skip to content

llvm-rc.exe failing when regular rc.exe does not #77

Closed
@Tagglink

Description

@Tagglink

I'm on Windows 10 compiling FreeGLUT version 3.2.1 (latest as of here: http://freeglut.sourceforge.net) from source using my own compiled version of Clang 10.0.0 (latest commit as of yesterday) with CMake and Ninja.

Reproduction:
First I configured and built the FreeGLUT project like so:

C:\Playspace\freeglut-3.2.1> cmake -G Ninja -B ninja-build
C:\Playspace\freeglut-3.2.1> cd ninja-build
C:\Playspace\freeglut-3.2.1\ninja-build> ninja

This crashes llvm-rc with the error "expected yet unread fixed VERSIONINFO statement type, got FILEFLAGS":

C:\Playspace\freeglut-3.2.1\ninja-build> ninja
[31/132] Building RC object CMakeFiles/freeglut.dir/freeglut.rc.res
FAILED: CMakeFiles/freeglut.dir/freeglut.rc.res
C:\PROGRA~1\LLVM\bin\llvm-rc.exe -DFREEGLUT_EXPORTS -DHAVE_CONFIG_H -DWINVER=0x0601 -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x0601 -Dfreeglut_EXPORTS -IC:/Playspace/freeglut-3.2.1/src -IC:/Playspace/freeglut-3.2.1/include -IC:/Playspace/freeglut-3.2.1/ninja-build  /fo CMakeFiles/freeglut.dir/freeglut.rc.res C:/Playspace/freeglut-3.2.1/ninja-build/freeglut.rc
llvm-rc: Error parsing file: expected yet unread fixed VERSIONINFO statement type, got FILEFLAGS

Configuring the project like this results in a successful build:

C:\Playspace\freeglut-3.2.1> cmake -G Ninja -B ninja-test-build -DCMAKE_RC_COMPILER:FILEPATH="C:/Program Files (x86)/Windows Kits/10/bin/10.0.18362.0/x64/rc.exe" -DCMAKE_BUILD_TYPE:STRING=Release
C:\Playspace\freeglut-3.2.1> cd ninja-test-build
C:\Playspace\freeglut-3.2.1\ninja-test-build> ninja

i.e. using the windows binary for the rc compiler works right away. This is ok, but it seems something is wrong with llvm-rc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    llvm-toolsAll llvm tools that do not have corresponding tag

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions