Rack API call added in 2.6.1, GitHub Action can't link with it

I recently checked in a call to rack::string::UTF32toUTF8, which appears to have been added in 2.6.1 of the Rack API.

The Mac builds find it, but the Windows build cannot see it, responding with the following error:

x86_64-w64-mingw32-g++ -Isrc/parser -Isrc/parser-venn -Itipsy-encoder/include -std=c++11 -Wsuggest-override  -fPIC -I/home/build/rack-plugin-toolchain/Rack-SDK-win-x64/include -I/home/build/rack-plugin-toolchain/Rack-SDK-win-x64/dep/include -MMD -MP -g -O3 -funsafe-math-optimizations -fno-omit-frame-pointer -Wall -Wextra -Wno-unused-parameter -march=nehalem -D_USE_MATH_DEFINES -municode  -c -o build/src/st_textfield.cpp.o src/st_textfield.cpp
src/st_textfield.cpp: In member function 'virtual void STTextField::onSelectText(const rack::widget::Widget::SelectTextEvent&)':
src/st_textfield.cpp:298:42: error: 'UTF32toUTF8' is not a member of 'rack::string'; did you mean 'UTF16toUTF8'?
  298 |           std::string s8 = rack::string::UTF32toUTF8(s32);
      |                                          ^~~~~~~~~~~
      |                                          UTF16toUTF8
make[1]: *** [/home/build/rack-plugin-toolchain/Rack-SDK-win-x64/compile.mk:79: build/src/st_textfield.cpp.o] Error 1

This build attempt is the most recent to fail this way.

Given that the Mac build works, I’m guessing that the includes and Make file are working (and it builds in Windows locally for me). So I’m suspecting the build-plugin.yaml, but don’t understand it well enough to see what might be wrong. Any ideas?

mahlen

The Github Actions workflow uses the plugin toolchain to compile for Windows and Linux, built as a Docker image, so it needs to be updated for the different versions.

The Mac build succeeds because the toolchain needs a Mac SDK (which is legally iffy and not allowed to be distributed), so the Actions workflow doesn’t use the toolchain for that, and instead compiles on a Mac runner directly by using the SDK. (I’ve actually had an issue before where the Actions compile would succeed for Mac, but fail on the actual toolchain library builds, so that’s something to keep in mind)

The rack-sdk-version environment variable defined near the top of the YAML file only controls the version of the SDK downloaded for Mac, so you need to use an updated Docker image. Bloodbat has been building some, which I’ve been using, and they seem to work well.

1 Like