Linux 4.9 Bad hlslcc header error
[2015.08.20-10.29.02:868][ 0]LogOpenGLShaderCompiler:Error: Bad hlslcc header found [2015.08.20-10.29.02:868][ 0]LogOpenGLShaderCompiler:Error: Bad hlslcc header found! Missing '#'!
Gets stuck at 35% and just spamms that error over and over again in red (launching via gdb or console)
I think I may have a fix for this issue.
There is very likely a bug inside Clang that is causing some of these builds to fail. I can build two copies of the same version of the game with the same compiler, on the same OS, with the same nvidia driver versions, same RAM count and CPU generation, and one build will consistently see the error while the other will consistently be fine. I can even transfer the compiled binaries between the machines and the one compiled on the good machine will run fine on the bad machine. The bad machine stared exhibiting the issue after a big system update (apt-get dist-upgrade).
I've added a workaround in this commit, in case anyone wanted to give it a shot: https://github.com/ExpiredPopsicle/UnrealEngine/commit/ec9c9ffb4e83ae15db9700f22bf2110bbfb99464
This commit is based of Dmitry Rekman's 4.9-rcl Linux branch ( https://github.com/RCL/UnrealEngine ), so if you're already running something from there, it should go in cleanly.
After cloning, cherry-picking, or applying it as a patch, you will need to rebuild the HLSLCC library. ( "BuildThirdParty.sh -b HLSLCC" in the Engine/Build/Batchfiles/Linux directory.) When that's done, you should be able to just build UE4Editor and ShaderCompileWorker.
I haven't yet made a pull request from it because I haven't tested it on anything but a Debian Testing machine, and the fact that it's a weird workaround to a compile bug may or may not sit well with the developers at Epic. But one way or another, I believe I have a reasonable understanding of the issue causing this now.
Let me know if this works for any of you.
answered Oct 04 '15 at 03:45 AM
Ubuntu 15 - I did get this error using the release branch (4.10 at the time of writing). However, after checking out the '4.10' branch, which now has 4.10.1 (not in release branch yet) and doing a rebuild with clang-3.6 the problem is gone. I noticed that Setup.sh did rebuild hlslcc for me as well.
answered Dec 02 '15 at 08:42 PM
I've rebuilt the entire project clean (even from fresh checkouts) many times and still end up with this hlslcc error in both the 4.9 and master/4.10 branches.
I've tried going into Engine/Source/ThirdParty/hlslcc/hlslcc/projects/Linux and running make (successfully), then going back to Engine and making ShaderCompileWorker and UE4Editor, but I still get the same hlslcc errors when running the editor afterwards.
I saw one of the other threads about copying a .a file around, but that just led to other errors the last time I tried it... and eventually to me doing a full clean checkout again to get rid of them and back to the original problem.
answered Aug 27 '15 at 10:47 AM
ok, ive tried - removing 4.8 - cleaning - using clang 3.6 only - recompile hlslcc (resulting in a segfault error instead) - tried various machines
Only thing I can think of is that im running ubuntu 15.10 beta
answered Sep 02 '15 at 12:28 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here