# RTTI failed compiling when enabled for 4.23 linux

**URL:** <https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083>\
**Category:** Platform & Builds\
**Tags:** Linux, UE4-23, unreal-engine, question\
**Created:** [September 9, 2019, 4:30pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083 "2019-09-09T16:30:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 9, 2019, 4:30pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/1 "2019-09-09T16:30:50Z")

</div>

got "undefined reference to ‘typeinfo for FTickerObjectBase’ error under linux.  
linux os 14.04.

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [September 9, 2019, 4:43pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/2 "2019-09-09T16:43:43Z")

</div>

How did you enable RTTI, for one module or for the whole engine?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 9, 2019, 4:50pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/3 "2019-09-09T16:50:14Z")

</div>

for the whole engine, enable it by setting bUseRTTI to true in ModuleRules.cs. it compiles fine under UE4.21 but failed for UE4.23.  
Both 4.21 and 4.23 are clean code I pulled from github.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 9, 2019, 6:26pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/4 "2019-09-09T18:26:50Z")

</div>

ok, it failed on ubuntu 18.04 too.

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [September 9, 2019, 6:42pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/5 "2019-09-09T18:42:57Z")

</div>

That class needs a ENGINE\_VTABLE export most likely. We’ll look into this.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 9, 2019, 7:06pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/6 "2019-09-09T19:06:09Z")

</div>

so, adding ENGINE\_VTABLE for this class will fix the compiling issue? comparing with 4.21, I didn’t see any changes of the definition of that file.

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [September 9, 2019, 7:16pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/7 "2019-09-09T19:16:52Z")

</div>

4.23 by default hides symbols that are not exported explicitly, while 4.22 and earlier made them all visible by default, so the change is in compiler settings, not the source itself.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 9, 2019, 7:23pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/8 "2019-09-09T19:23:11Z")

</div>

got it, I’ve add CORE\_VTABLE to the definition of the class, compiling it right now.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 9, 2019, 8:29pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/9 "2019-09-09T20:29:30Z")

</div>

is there a easy way that I could make them all visible by default as 4.22 ?

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [September 9, 2019, 8:34pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/10 "2019-09-09T20:34:41Z")

</div>

You can edit LinuxToolChain.cs and remove the if with CompileEnvironment.bHideSymbolsByDefault, then recompile the whole engine. However, having all symbols visible makes symbol resolution slower and also creates a potential for the symbol collision, which is why they are no longer visible by default.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 9, 2019, 8:47pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/11 "2019-09-09T20:47:30Z")

</div>

I can see that, but at least I can get it work before epic fix the rtti issue. thanks

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 10, 2019, 5:53pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/12 "2019-09-10T17:53:32Z")

</div>

still got undefined reference to `typeinfo for buzz::XmppTask’ error when set bHideSymbolsByDefault to false. where should I change to get rid of this compiling error? this is from 3rd party folder.

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [September 10, 2019, 5:59pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/13 "2019-09-10T17:59:36Z")

</div>

We also found that yesterday. Sorry, it seems that 4.23 is not possible to compile the whole engine with RTTI on (which is not supported anyway). If you need RTTI for a specific third party module only maybe you can enable it just for that one? You will need a shim module to communicate with that third party lib (similarly to OpenExrWrapper module)

EDIT: if you still want to compile the whole engine with RTTI you will need to either disable or rebuild WebRTC. You can disable it by editing XMPP.Build.cs and setting TargetPlatformSupportsJingle = false for Linux

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 10, 2019, 7:34pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/14 "2019-09-10T19:34:18Z")

</div>

thanks, btw, are you guys going to fix the compiling error when RTTI set to true?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 10, 2019, 7:50pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/15 "2019-09-10T19:50:49Z")

</div>

how to fix the link error of "undefined reference to ‘XML\_Parse’?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 11, 2019, 12:50am UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/16 "2019-09-11T00:50:13Z")

</div>

do you get this error when turn on RTTI? I check the code, seems expat didn’t add to build under linux.

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [September 11, 2019, 1:46am UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/17 "2019-09-11T01:46:14Z")

</div>

Not for 4.23.x at this point, since changes would go against bincompat rules (i.e. can break compatibility with the plugins) 😕

---

<div class="post-metadata">

**Author:** ![RCL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RCL](https://forums.unrealengine.com/u/RCL)\
**Post date:** [September 11, 2019, 1:51am UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/18 "2019-09-11T01:51:33Z")

</div>

Perhaps my idea to disable just Jingle didn’t work out of the box. You can try disabling XMPP module in general.

But a better route is to not compile the whole engine with RTTI, and instead set RTTI to true just for the module (in its Build.cs) that actually needs dynamic\_cast\<\> and see if you can get away with that (you may if you don’t subclass engine classes in that module). If your module has both dynamic\_cast\<\> and also subclasses engine classes, you’ll need split that into two modules and only have RTTI enabled for the one that uses dynamic\_cast\<\>s.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1b78546f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1b78546f](https://forums.unrealengine.com/u/anonymous_user_1b78546f)\
**Post date:** [September 11, 2019, 6:04pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/19 "2019-09-11T18:04:18Z")

</div>

I’ll give a try, thanks for the suggestion.

---

<div class="post-metadata">

**Author:** ![PhilBax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PhilBax](https://forums.unrealengine.com/u/PhilBax)\
**Post date:** [September 25, 2019, 3:35pm UTC](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083/20 "2019-09-25T15:35:24Z")

</div>

I was under the impression that RTTI could only be enabled at the Target level ("bFoceEnableRTTI = true). We used to do this for our Editor target, but I believe somewhere around 4.21 y’all made it so that wouldn’t work anymore. If it was turned on anywhere, it had to be turned on everywhere (or use a “unique” build environment, which appeared to require cooked content to run).

Has this changed? Will look into setting it at the Build.cs level.

Edit: sho’ 'nuff stuff! bUseRTTI = true is available at the Build.cs level. Updating our codebase now! Thanks!

[Next page](https://forums.unrealengine.com/t/rtti-failed-compiling-when-enabled-for-4-23-linux/455083.md?page=2)
