# Recompiling AMD's FSR2 plugin for linux

**URL:** <https://forums.unrealengine.com/t/recompiling-amds-fsr2-plugin-for-linux/1172608>\
**Category:** UE Marketplace\
**Tags:** unreal-engine, question, fab\
**Created:** [May 20, 2023, 4:08pm UTC](https://forums.unrealengine.com/t/recompiling-amds-fsr2-plugin-for-linux/1172608 "2023-05-20T16:08:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Psycadelicrash](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Psycadelicrash](https://forums.unrealengine.com/u/Psycadelicrash)\
**Post date:** [May 20, 2023, 4:08pm UTC](https://forums.unrealengine.com/t/recompiling-amds-fsr2-plugin-for-linux/1172608/1 "2023-05-20T16:08:19Z")

</div>

Has anyone had any success recompiling this for Linux? On UE 4.27, the built in Clang 11 compiler only throws up 18 errors on /ffx-fsr2-api/ffx\_fsr2.cpp and 2 errors on /ffx-fsr2-api/vk/ffx\_fsr2\_vk.cpp.  
I reduced ffx\_fsr2.cpp’s 18 errors down to 4 by replacing every wscpy\_s with a wscpy.

Here’s the problem code in ffx\_fsr2.cpp. No matter how I rearrange it, it keeps saying the {} brackets are in the wrong place.

```auto
    const float matrix_elem_c[2][2] = {
        {{fQ,}} // non reversed, non infinite
        -1.0f - FLT_EPSILON, // non reversed, infinite
        {{fQ,}} // reversed, non infinite
        0.0f + FLT_EPSILON // reversed, infinite
    };

    const float matrix_elem_e[2][2] = {
        {{fQ * fMin,}} // non reversed, non infinite
        -fMin - FLT_EPSILON, // non reversed, infinite
        {{fQ * fMin,}} // reversed, non infinite
        fMax, // reversed, infinite
    };

```

The other problem is "Source/ffx-fsr2-api/vk/ffx\_fsr2\_vk.cpp:1329:5: error: no template named ‘wstring\_convert’ in namespace ‘std’; did you mean ‘TStringConvert’?

```auto
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;

```

So I tried TStringConvert instead of std::wstring\_convert and clang had no idea what I was talking about. (Hell, I had no idea what I was trying to tell it either!)  
“error: too few template arguments for class template ‘TStringConvert’  
TStringConvert\<std::codecvt\_utf8\_utf16\<wchar\_t\>\> converter;”

Not knowing a lot about C++ doesn’t help. Being on vsCode without intellisense doesn’t help either. From what I understand, the clang and gcc compilers handle certain commands differently from windows compilers. If someone could help me fix these 2 errors, I can build FSR 2 for Linux! Thanks in advance!

---

<div class="post-metadata">

**Author:** ![iHad169](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iHad169](https://forums.unrealengine.com/u/iHad169)\
**Post date:** [May 31, 2023, 8:57am UTC](https://forums.unrealengine.com/t/recompiling-amds-fsr2-plugin-for-linux/1172608/2 "2023-05-31T08:57:54Z")

</div>

me too

I try change to this can solve this issue:

```auto
    const float matrix_elem_c[2][2] = {
        {fQ, // non reversed, non infinite
        -1.0f - FLT_EPSILON}, // non reversed, infinite
        {fQ, // reversed, non infinite
        0.0f + FLT_EPSILON} // reversed, infinite
    };
    const float matrix_elem_e[2][2] = {
        {fQ * fMin, // non reversed, non infinite
        -fMin - FLT_EPSILON}, // non reversed, infinite
        {fQ * fMin, // reversed, non infinite
        fMax} // reversed, infinite
    };

```

but I have other issue

---

<div class="post-metadata">

**Author:** ![darkhemic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkhemic](https://forums.unrealengine.com/u/darkhemic)\
**Post date:** [August 31, 2023, 11:53am UTC](https://forums.unrealengine.com/t/recompiling-amds-fsr2-plugin-for-linux/1172608/3 "2023-08-31T11:53:16Z")

</div>

Has anyone been able to compile this plugin on the Linux Side. I’m on 5.1.1 trying fsr 2.2.1b and got most of the errors cleaned up to a point. This is my current error type that keeps it from completing the build of the plugin.

```auto
ld.lld: error: undefined symbol: ffxFsr2GetUpscaleRatioFromQualityMode
>>> referenced by FSR2TemporalUpscaler.cpp:704 (./../Plugins/Marketplace/FSR2/Source/FSR2TemporalUpscaling/Private/FSR2TemporalUpscaler.cpp:704)
>>> /home/darkhemic/Documents/Apps/UnrealEngine-5.1.1-fsr/Engine/Plugins/Marketplace/FSR2/Intermediate/Build/Linux/B4D820EA/UnrealEditor/Development/FSR2TemporalUpscaling/Module.FSR2TemporalUpscaling.cpp.o:(FFSR2TemporalUpscaler::UpdateScreenPercentage())

```

Any help would be great.

---

<div class="post-metadata">

**Author:** ![Voultapher](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Voultapher](https://forums.unrealengine.com/u/Voultapher)\
**Post date:** [September 4, 2025, 2:30pm UTC](https://forums.unrealengine.com/t/recompiling-amds-fsr2-plugin-for-linux/1172608/4 "2025-09-04T14:30:33Z")

</div>

What is needed the right attributes for linker visibility:

```auto
diff --git a/Engine/Plugins/FSR2/Source/ffx-fsr2-api/ffx_types.h b/Engine/Plugins/FSR2/Source/ffx-fsr2-api/ffx_types.h
index 133a5319d23..e968c911856 100644
--- a/Engine/Plugins/FSR2/Source/ffx-fsr2-api/ffx_types.h
+++ b/Engine/Plugins/FSR2/Source/ffx-fsr2-api/ffx_types.h
@@ -25,7 +25,7 @@
 
 #if defined (FFX_GCC)
 /// FidelityFX exported functions
-#define FFX_API
+#define FFX_API __attribute__ ((visibility("default")))
 #else
 /// FidelityFX exported functions
 #define FFX_API __declspec(dllexport)

```
