Skip to main content
New Participant
June 23, 2026
Solved

Meta XR Core SDK Ubuntu Package Error

  • June 23, 2026
  • 2 replies
  • 176 views

Will preface this with the fact I am aware Linux isn't supported or tested by Meta.

I am using Unity 6000.3.9f1 and Meta XR SDK 203.0.0. I recently tried using an Ubuntu GitHub Actions runner in a CI pipeline to deploy a Unity app to a Meta Quest 3. I encountered a strange pair of errors, which then persisted as I tried opening an empty project with just the Core XR SDK locally on a Ubuntu Linux computer.

Here are the errors in question:

Library/PackageCache/com.meta.xr.sdk.core@f4a2a776f923/Scripts/RuntimeOptimizer/Core/RuntimeOptimizerPlugin.cs(29,2): error CS1032: Cannot define/undefine preprocessor symbols after first token in file
Library/PackageCache/com.meta.xr.sdk.core@f4a2a776f923/Scripts/RuntimeOptimizer/Core/RuntimeOptimizerPlugin.cs(33,2): error CS1032: Cannot define/undefine preprocessor symbols after first token in file

Doing some more investigation, I found this in /Packages/Meta XR Core SDK/Scripts/RuntimeOptimizer/Core/RuntimeOptimizerPlugin.cs.

It would seem that being on Linux deliberately causes a pair of #define lines to be run, which triggers an error in the C# compiler (preprocessor symbols must be defined before any code, including 'using' directives).

Has anyone found a fix or workaround to this? Is it possible this script could be changed in future versions that wouldn't break or interfere with any other functionality?

Best answer by Traczo

Updating sdk to newest version (205 for when I'm typing this) helped me

2 replies

TraczoAnswer
New Participant
August 13, 2026

Updating sdk to newest version (205 for when I'm typing this) helped me

MrMoose16Author
New Participant
August 13, 2026

Thanks for the update! Have been looking into workarounds since I posted this, but have to admit I didn't bother checking the latest update since then 😅
Took a look at the RuntimeOptimizerPlugin.cs file and they did indeed change it, it seems the error doesn't occur anymore.
I'm impressed (and thankful) that was addressed at all.