Problems with the SKIA graphics backend

Today I decided to update the iPlug2 framework from the repository on github and try to build one of my projects. Everything works with NanoVG graphics, but I decided to try the SKIA graphics backend, and a lot of errors were shown during compilation. Does SKIA really not work out of the box on macOS, or did the developers make this backend work exclusively on Windows?
Tested on macOS Tahoe 26.3.1, Xcode 26.4, M4 Max processor, 128 Gb RAM

I can’t answer for sure but perhaps you need a newer version of the SKIA dependencies/libraries?

I tried SKIA and ended up going back to NanoVG (which I think is actually no longer supported). Graphics looked “blurry” to me when compared to NanoVG so I stuck with NanoVG. But I also use a lot of bitmaps. If you are using mostly vector graphics SKIA may work better for you, IDK.

Again, linking libraries and compiler settings can be a challenge. Maybe this will help.

I see Undefined symbol errors. This tells me either the library does not exist, or the build configuration does not correctly point to the library.

Use download-prebuilt-libs.sh to download the library.

Then make sure IGRAPHICS_SKIA and IGRAPHICS_CPU are defined in your .xconfig file, replacing IGRAPHICS_NANOVG and IGRAPHICS_METAL.

Greetings! I use the Nano VG graphics backend in most plug-ins, but for the Retro Radio plug-in I needed to simulate the operation of the 6E5C cathodoluminescent indicator, which is known as the “magic eye”. However, when using Nano VG, I noticed that it incorrectly renders small elements, and Skia copes with this task much better. Take a look at the drawing and see the difference.

Greetings! Don’t you think I haven’t tried all this stuff that you recommended? This did not work, because the Skia library that is downloaded is not compiled successfully, since apparently the one who uploaded it probably did not check its work on client computers.

You can check if the prebuilt skia static library that you downloaded, located at iPlug2/Dependencies/Build/mac/lib, contains your undefined symbols using the nm tool:

nm Dependencies/Build/mac/lib/libskia.a | grep SkMemoryStream

If the symbols exist and are defined, then I would check the link step in your build logs to see if you are linking against the library.

It turned out that it was a file .xcconfig. If I write like this, then everything came together without a problem:

IGRAPHICS_LNK_FLAGS = $(SKIA_LNK_FLAGS)
EXTRA_LNK_FLAGS = -framework Metal -framework MetalKit -framework OpenGL -framework WebKit -framework Accelerate $(IGRAPHICS_LNK_FLAGS)
EXTRA_ALL_DEFS = OBJC_PREFIX=vRetroRadio SWELL_APP_PREFIX=Swell_vRetroRadio IGRAPHICS_SKIA IGRAPHICS_METAL

1 Like