question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to compile on Ubuntu

See original GitHub issue

I followed the instructions to the letter on the readme, but I am getting the following error when trying to compile:

/home/colin/openviii/Core/ImGuiRenderer.cs(37,37): Error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. (CS0012) (Core)

I’ve tried adding the netstandard assembly as a reference to the project, but that doesn’t seem to work. Any help is much appreciated!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cmbasnettcommented, Mar 4, 2020

Making progress!

There were a few problems I encountered:

Memory.Init calls

I had to change a few lines to get the whole suite compiling: there are 4 or so calls to Memory.Init in some of the tool projects which are missing the fourth argument. They all used to be:

Memory.Init(null, null, null);

I had to change them to:

Memory.Init(null, null, null, null);

Missing FFmpeg libraries

After changing that, I was able to compile and get the program executing now, but ran into a missing DLL error:

System.DllNotFoundException has been thrown
Unable to load DLL 'avutil.56': The specified module could not be found

I had previous installed ffmpeg, so was confused as to why the libraries were not being picked up. I did a little searching, and apparently the LTS versions of Ubuntu haven’t updated their ffmpeg package references to use FFmpeg 4, so it was downloading an old version.

I followed this guide to reinstall the new version of ffmpeg. I was then able to load the game into the main menu, hurray! 🎊

Shaders

Regarding shader compilation: unless I’m mis-remembering, isn’t the output of shader compilation dependent on the GPU? So any compiled shaders put onto the repo would only be guaranteed to work on the GPU it was compiled on? I’d be happy to be wrong about this.

EDIT: Speak of the devil, attempting to go to the World Map shows this error:

Screenshot from 2020-03-04 12-53-26

It appears to be failing on this line:

worldShaderModel = Memory.content.Load<Effect>("testShader");

Note that turning bUseCustomShaderTest to false allows the game to run just fine.

1reaction
cmbasnettcommented, Feb 19, 2020

I’ve used NuGet to add the NETStandard.Library package, but the same error occurs.

I’m reading up on other people encountering this same error (https://github.com/dotnet/standard/issues/481). Is it possible that changing the projects to use the new PackageReference style of package management could fix this error? I’m using MonoDevelop, so I don’t have the option to easily convert the project to this new style, apparently this is something you can do with VS though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I Can't Compile C++ Program
Cpp to CCC.cpp first and then compile your application by G++ (C++ compiler). Reproducible way: sudo apt-get install g++ mv CCC.
Read more >
Unable to Compile from source on Ubuntu 18.04 . ...
Describe the bug I am just trying to compile from source. It compiles well for about 71% and then gives undefined reference errors....
Read more >
Flutter code is unable to compile and run in Linux (Ubuntu ...
My device : Ubuntu 22.04.3 LTS x86_64. Code : Default Code generated by Flutter. Project Location : /media/mrinmoy/External (where External ...
Read more >
Unable to compile kernel module on Ubuntu 22.04 fo...
Hi, Since upgrade to kernel 5.15.0.30 (Ubuntu 22.04 LTS), I'm unable to recompile kernel modules on VMWare Workstation 16.2.3-19376536, ...
Read more >
Unable to compile UE5.03 on Ubuntu 22.04
Hi there, I was able to compile UE5.03 around 8 months ago just fine, but now I'm running into issues if I try...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found