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

Unable to build for ladder using wsl2 #143

Open
nanogeo opened this issue May 5, 2024 · 0 comments
Open

Unable to build for ladder using wsl2 #143

nanogeo opened this issue May 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nanogeo
Copy link

nanogeo commented May 5, 2024

Describe the bug
Build fails with errors saying "This file was generated by an older version of protoc which is incompatible with your Protocol Buffer headers. Please regenerate this file with a newer version of protoc."

To Reproduce
Steps to reproduce the behavior, for example:

  1. Download fresh install of Ubuntu with wsl2
  2. Run the following commands:
    1. apt-get update
    2. sudo apt-get install cmake
    3. sudo apt install build-essential
    4. sudo apt install mingw-w64-x86-64-dev g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 win-iconv-mingw-w64-dev
    5. sudo update-alternatives --config x86_64-w64-mingw32-gcc
      • Choose option 1
    6. sudo update-alternatives --config x86_64-w64-mingw32-g++
      • Choose option 1
  3. Clone blank_bot repo (https://github.com/cpp-sc2/blank-bot)
  4. Navigate to said repo
  5. Generate CMake configuration with "cmake -B build -DWSL2_CROSS_COMPILE=ON"
  6. Compile project with "cmake --build build -j"
  7. Observe numerous errors similar to:
/mnt/c/Users/hocke/OneDrive/Documents/blank_bot/build/_deps/cpp_sc2-build/generated/s2clientprotocol/debug.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
   17 | #error This file was generated by an older version of protoc which is
      |  ^~~~~
/mnt/c/Users/hocke/OneDrive/Documents/blank_bot/build/_deps/cpp_sc2-build/generated/s2clientprotocol/debug.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
   18 | #error incompatible with your Protocol Buffer headers. Please
      |  ^~~~~
/mnt/c/Users/hocke/OneDrive/Documents/blank_bot/build/_deps/cpp_sc2-build/generated/s2clientprotocol/debug.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
   19 | #error regenerate this file with a newer version of protoc.
      |  ^~~~~

Expected behavior
The build should finish without errors.

Desktop (multiple version means multiple attempts with different version):

  • OS / Distros: Ubuntu 20.04.6/22.04.3
  • cpp-sc2 Version: 1.4.1
  • StarCraft II version 5.0.12
  • GNU Make versions: 4.2.1/4.3
  • CMake version: 3.16.3/3.22.1
  • gcc/g++ version: 9.4.0/11.4.0
  • protoc versions: None/3.12.4/3.23.4/3.23.1

Additional context
Tried with different combinations of the flags -DBUILD_FOR_LADDER=ON -DSC2_VERSION=5.0.12 -DSC2_VERSION=4.10.0 but no difference.
Also tried with Ubuntu 24.04 but the package "mingw-w64-x86-64-dev" does not exist for that version of Ubuntu so I could not progress past step 2.4
Also tried building this repo instead of the blank_bot repo with the same steps but encountered the same issue.

@alkurbatov alkurbatov added the bug Something isn't working label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants