protocolbuffers / protocolbuffers/protobuf

Building MSI Package linked to protobuf with CMake WIX fails

Open
#15,511 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cmake help wanted
Dominant language
C++
Stars
72k
Forks
16.3k
Avg merge
1d 17h
Merged PRs (30d)
140

Description

What version of protobuf and what language are you using?
Version: 25.1
Language: C++

What operating system (Linux, Windows, ...) and version?
Windows 2022 (running GH Actions)

What runtime / compiler are you using (e.g., python version or gcc version)
MSVC 2019

What did you do?
Steps to reproduce the behavior:

  1. Have application that depends on/links to protobuf
  2. Build application exe
  3. Use CPack WIX (which calls candle.exe) to build MSI package
  4. See error

What did you expect to see
A working MSI package

What did you see instead?
Errors during the MSI build:

build\_CPack_Packages\win64\WIX\features.wxs(8) : error CNDL0014 : The Feature/@Id attribute's value, 'CM_C_libprotobuf-lite', is not a legal identifier.  Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.).  Every identifier must begin with either a letter or an underscore.

build\_CPack_Packages\win64\WIX\features.wxs(10) : error CNDL0014 : The Feature/@Id attribute's value, 'CM_C_protobuf-export', is not a legal identifier.  Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.).  Every identifier must begin with either a letter or an underscore.

build\_CPack_Packages\win64\WIX\features.wxs(11) : error CNDL0014 : The Feature/@Id attribute's value, 'CM_C_protobuf-headers', is not a legal identifier.  Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.).  Every identifier must begin with either a letter or an underscore.

build\_CPack_Packages\win64\WIX\features.wxs(20) : error CNDL0014 : The FeatureRef/@Id attribute's value, 'CM_C_libprotobuf-lite', is not a legal identifier.  Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.).  Every identifier must begin with either a letter or an underscore.

build\_CPack_Packages\win64\WIX\features.wxs(26) : error CNDL0014 : The FeatureRef/@Id attribute's value, 'CM_C_protobuf-export', is not a legal identifier.  Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.).  Every identifier must begin with either a letter or an underscore.

build\_CPack_Packages\win64\WIX\features.wxs(29) : error CNDL0014 : The FeatureRef/@Id attribute's value, 'CM_C_protobuf-headers', is not a legal identifier.  Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.).  Every identifier must begin with either a letter or an underscore.

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment
Running GitHub actions. Other CPack targets work as expected.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Windows 2022/MSVC 2019 build using CPack WIX and inspect the generated build/_CPack_Packages/win64/WIX/features.wxs file and the candle.exe errors. Trace how the CMake-linked protobuf targets produce the Feature and FeatureRef IDs; done means candle.exe accepts the generated identifiers and the MSI package builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, github-actions
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.