-
Notifications
You must be signed in to change notification settings - Fork 510
Errors While Building on Linux #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am experimenting with Unity on Linux. The build at https://github.com/KhronosGroup/UnityGLTF/releases/download/v1.0.1/UnityGLTF.unitypackage seems to work, at least for importing gltf. The first issue was a case sensitivity in UnityGLTF-dll.csproj: <Import Project="$(MSBuildToolsPath)\Microsoft.CSHARP.Targets" /> needs to read <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> as it is installed by the MS packages with this case. But secondly, then I get this error:
and I could not figure how to install the v.4.7.1 reference assemblies, after some googling. nuget does not seem to have them. Any hints appreciated. |
Ok, I found that the latest mono has the assemblies: https://www.mono-project.com/download/stable/ mono comes with its own msbuild which seems to know about the mono installed components. Since the UWP Tests and the Tests complained and did not seem critical I removed them with:
I had also added explicitly the path to the 4.7.1 assemblies in UnityGLTF-dll.csproj ...
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FrameworkPathOverride>/usr/lib/mono/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride>true</EnableFrameworkPathOverride> but this may not be necessary with the mono msbuild. Then
complained about requiring a nuget restore and not finding other assemblies. I used
which took a while. Then I tried mono msbuild:
and it successfully compiled (!). I did not test the artefacts, eg. the plugins yet. |
dotnet/sdk#335 seems to apply. |
I could build a unitypackage from the linux build, using the Unity invocation in the shell script. It worked fine. |
recipe:
$ dotnet sln GLTFSerialization.sln remove Tests/GLTFSerializationTests/GLTFSerializationTests.csproj
$ dotnet sln GLTFSerialization.sln remove Tests/GLTFSerializationUWPTests/GLTFSerializationUWPTests.csproj
$ dotnet restore GLTFSerialization.sln
$ sed -i.BAK 's/CSHARP.Targets/CSharp.targets/g' ../UnityGLTF/UnityGLTF-dll.csproj
$ dotnet msbuild GLTFSerialization.sln -t:GLTFSerialization -p:TargetFramework=net35
$ cd ../
$ ~/Unity/Hub/Editor/2019.1.0f2/Editor/Unity -batchmode -projectPath UnityGLTF -exportPackage Assets/UnityGLTF ../current-package/UnityGLTF.unitypackage -quit |
Linux build result: |
As an aside, on the Linux experimental Unity2017.4 version, I get script errors after loading the package, release or self-built. |
Here is a branch in a fork with these changes and a one-stop-shopping build-unity-package shell script in scripts: https://github.com/andreasplesch/UnityGLTF/tree/linux-build |
Please update to the latest version and open a new issue if the problem persists. Thanks! |
I know that #77 exists but I also want to add that I'm getting build errors on linux that is causing me not be able to build it at all, even with rider (as suggested in that thread).
The following are the errors that I get, compiling on a system with an updated version of mono (from their apt repo for 16.04).
The text was updated successfully, but these errors were encountered: