KhronosGroup / UnityGLTF

Runtime glTF 2.0 Loader for Unity3D
MIT License
1.8k stars 485 forks source link

Errors While Building on Linux #195

Closed cwfitzgerald closed 7 months ago

cwfitzgerald commented 6 years ago

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).

Build started 6/28/2018 4:42:54 PM.
__________________________________________________
Project "/<REDACTED1>/UnityGLTF/UnityGLTF/Assembly-CSharp.csproj" (build target(s)):

Target ResolveAssemblyReferences:
    /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2067,5): warning MSB3277: Found conflicts between different versions of "System.Core" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
    /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2067,5): warning MSB3277: Found conflicts between different versions of "System.Xml" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
    /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2067,5): warning MSB3277: Found conflicts between different versions of "mscorlib" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
    /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2067,5): warning MSB3277: Found conflicts between different versions of "System" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
Done building target "ResolveAssemblyReferences" in project "Assembly-CSharp.csproj".
Target GenerateTargetFrameworkMonikerAttribute:
  Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Target CoreCompile:
    /usr/lib/mono/4.5/csc.exe /noconfig /unsafe- /nowarn:0169,1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_1_5;UNITY_2018_1;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_LINUX;PLATFORM_STANDALONE;UNITY_STANDALONE_LINUX;UNITY_STANDALONE;UNITY_STANDALONE_LINUX_API;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_SPATIALTRACKING;ENABLE_MODULAR_UNITYENGINE_ASSEMBLIES;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_LINUX;ENABLE_UNITY_COLLECTIONS_CHECKS;UNITY_TEAM_LICENSE;CROSS_PLATFORM_INPUT /errorendlocation /preferreduilang:en-US /highentropyva+ /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/MonoBleedingEdge/lib/mono/unity/Boo.Lang.dll /reference:/<REDACTED1>/UnityGLTF/UnityGLTF/Assets/UnityGLTF/Plugins/GLTFSerialization.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/MonoBleedingEdge/lib/mono/unity/mscorlib.dll /reference:/<REDACTED1>/UnityGLTF/UnityGLTF/Assets/UnityGLTF/Plugins/Newtonsoft.Json.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.Core.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.Runtime.Serialization.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.Xml.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/MonoBleedingEdge/lib/mono/unity/System.Xml.Linq.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/Unity.Locator.dll /reference:/<REDACTED1>/UnityGLTF/UnityGLTF/Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEditor.dll /reference:/<REDACTED1>/UnityGLTF/UnityGLTF/Library/ScriptAssemblies/UnityEditor.StandardEvents.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll /reference:"/<REDACTED2>/.config/unity3d/cache/packages/packages.unity.com/com.unity.analytics@2.0.16/UnityEngine.Analytics.dll" /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.BaselibModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.CloudWebServicesModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.FacebookModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll /reference:"/<REDACTED2>/.config/unity3d/cache/packages/packages.unity.com/com.unity.purchasing@2.0.1/UnityEngine.Purchasing.dll" /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll /reference:"/<REDACTED2>/.config/unity3d/cache/packages/packages.unity.com/com.unity.standardevents@1.0.13/UnityEngine.StandardEvents.dll" /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.TimelineModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/UnityExtensions/Unity/UIAutomation/UnityEngine.UIAutomation.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.WebModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/MonoBleedingEdge/lib/mono/unity/UnityScript.dll /reference:/<REDACTED2>/Unity-2018.1.5f1/Editor/Data/MonoBleedingEdge/lib/mono/unity/UnityScript.Lang.dll /debug+ /debug:portable /filealign:512 /optimize- /out:obj/Debug/Assembly-CSharp.dll /subsystemversion:6.00 /target:library /utf8output /langversion:4 Assets/UnityGLTF/Examples/GLTFExporterTest.cs Assets/UnityGLTF/Examples/MultiSceneComponent.cs Assets/UnityGLTF/Examples/OrbitCameraController.cs Assets/UnityGLTF/Examples/RootMergeComponent.cs Assets/UnityGLTF/Examples/SimpleWebServer.cs Assets/UnityGLTF/Examples/VisualizeMeshAttributes.cs Assets/UnityGLTF/Examples/WebServerComponent.cs Assets/UnityGLTF/Scripts/Async/AsyncAction.cs Assets/UnityGLTF/Scripts/Async/TaskExtensions.cs Assets/UnityGLTF/Scripts/Cache/AnimationCacheData.cs Assets/UnityGLTF/Scripts/Cache/AssetCache.cs Assets/UnityGLTF/Scripts/Cache/BufferCacheData.cs Assets/UnityGLTF/Scripts/Cache/MaterialCacheData.cs Assets/UnityGLTF/Scripts/Cache/MeshCacheData.cs Assets/UnityGLTF/Scripts/Cache/RefCountedCacheData.cs Assets/UnityGLTF/Scripts/Cache/TextureCacheData.cs Assets/UnityGLTF/Scripts/Exceptions.cs Assets/UnityGLTF/Scripts/Extensions/SchemaExtensions.cs Assets/UnityGLTF/Scripts/GLTFComponent.cs Assets/UnityGLTF/Scripts/GLTFSceneExporter.cs Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs Assets/UnityGLTF/Scripts/InstantiatedGLTFObject.cs Assets/UnityGLTF/Scripts/Loader/FileLoader.cs Assets/UnityGLTF/Scripts/Loader/ILoader.cs Assets/UnityGLTF/Scripts/Loader/StorageFolderLoader.cs Assets/UnityGLTF/Scripts/Loader/WebRequestLoader.cs Assets/UnityGLTF/Scripts/Tests/Integration/GLTFExporterIntegrationTest.cs Assets/UnityGLTF/Scripts/Tests/Integration/GLTFTestComponent.cs Assets/UnityGLTF/Scripts/UniformMaps/MetalRough2StandardMap.cs Assets/UnityGLTF/Scripts/UniformMaps/MetalRoughMap.cs Assets/UnityGLTF/Scripts/UniformMaps/SpecGloss2StandardMap.cs Assets/UnityGLTF/Scripts/UniformMaps/SpecGlossMap.cs Assets/UnityGLTF/Scripts/UniformMaps/StandardMap.cs Assets/UnityGLTF/Scripts/UniformMaps/UniformMap.cs Assets/UnityGLTF/Scripts/URIHelper.cs Assets/UnityTestTools/Assertions/AssertionComponent.cs Assets/UnityTestTools/Assertions/AssertionException.cs Assets/UnityTestTools/Assertions/Assertions.cs Assets/UnityTestTools/Assertions/CheckMethod.cs Assets/UnityTestTools/Assertions/Comparers/ActionBase.cs Assets/UnityTestTools/Assertions/Comparers/BoolComparer.cs Assets/UnityTestTools/Assertions/Comparers/ColliderComparer.cs Assets/UnityTestTools/Assertions/Comparers/ComparerBase.cs Assets/UnityTestTools/Assertions/Comparers/FloatComparer.cs Assets/UnityTestTools/Assertions/Comparers/GeneralComparer.cs Assets/UnityTestTools/Assertions/Comparers/IntComparer.cs Assets/UnityTestTools/Assertions/Comparers/IsRenderedByCamera.cs Assets/UnityTestTools/Assertions/Comparers/StringComparer.cs Assets/UnityTestTools/Assertions/Comparers/TransformComparer.cs Assets/UnityTestTools/Assertions/Comparers/ValueDoesNotChange.cs Assets/UnityTestTools/Assertions/Comparers/Vector2Comparer.cs Assets/UnityTestTools/Assertions/Comparers/Vector3Comparer.cs Assets/UnityTestTools/Assertions/Comparers/Vector4Comparer.cs Assets/UnityTestTools/Assertions/Comparers/VectorComparerBase.cs Assets/UnityTestTools/Assertions/InvalidPathException.cs Assets/UnityTestTools/Assertions/MemberResolver.cs Assets/UnityTestTools/Common/ITestResult.cs Assets/UnityTestTools/Common/TestResultState.cs Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CallTesting.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTest.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestAttribute.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/IntegrationTestsProvider.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ITestRunnerCallback.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/NetworkResultSender.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/ResultDTO.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestComponent.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResult.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestResultRenderer.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerCallbackList.cs Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs "/tmp/.NETFramework,Version=v4.5.AssemblyAttributes.cs"
    /tmp/.NETFramework,Version=v4.5.AssemblyAttributes.cs(4,46,4,70): error CS0234: The type or namespace name 'TargetFrameworkAttributeAttribute' does not exist in the namespace 'System.Runtime.Versioning' (are you missing an assembly reference?)
    /tmp/.NETFramework,Version=v4.5.AssemblyAttributes.cs(4,46,4,70): error CS0234: The type or namespace name 'TargetFrameworkAttribute' does not exist in the namespace 'System.Runtime.Versioning' (are you missing an assembly reference?)
    /tmp/.NETFramework,Version=v4.5.AssemblyAttributes.cs(4,101,4,121): error CS0246: The type or namespace name 'FrameworkDisplayName' could not be found (are you missing a using directive or an assembly reference?)
Done building target "CoreCompile" in project "Assembly-CSharp.csproj" -- FAILED.

Done building project "Assembly-CSharp.csproj" -- FAILED.
andreasplesch commented 5 years ago

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. For building, I made minor progress by using the MS dotnet msbuild available here: https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install

The first issue was a case sensitivity in UnityGLTF-dll.csproj: https://github.com/KhronosGroup/UnityGLTF/blob/master/UnityGLTF/UnityGLTF-dll.csproj#L80

  <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:

Microsoft (R) Build Engine version 16.0.450+ga8dc7f1d34 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

/usr/share/dotnet/sdk/2.2.203/Microsoft.Common.CurrentVersion.targets(1183,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [~/Downloads/UnityGLTF-master/UnityGLTF/UnityGLTF-dll.csproj]

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.

andreasplesch commented 5 years ago

Ok, I found that the latest mono has the assemblies: https://www.mono-project.com/download/stable/ mono needs to be installed from the mono repo because the debian version is too old.

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:

$ dotnet sln GLTFSerialization.sln remove Tests/GLTFSerializationTests/GLTFSerializationTests.csproj
$ dotnet sln GLTFSerialization.sln remove Tests/GLTFSerializationTests/GLTFSerializationUWPTests.csproj

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

$ dotnet msbuild GLTFSerialization.sln

complained about requiring a nuget restore and not finding other assemblies.

I used

$ dotnet restore GLTFSerialization.sln

which took a while.

Then I tried mono msbuild:

$ msbuild GLTFSerialization.sln

and it successfully compiled (!).

I did not test the artefacts, eg. the plugins yet.

andreasplesch commented 5 years ago

https://github.com/dotnet/sdk/issues/335 seems to apply.

andreasplesch commented 5 years ago

I could build a unitypackage from the linux build, using the Unity invocation in the shell script. It worked fine.

andreasplesch commented 5 years ago

recipe:

  1. install both dotnet core from MS and latest mono from mono-project
  2. download or clone master branch
  3. cd into GLTFSerialization
  4. remove Tests:
    $ dotnet sln GLTFSerialization.sln remove Tests/GLTFSerializationTests/GLTFSerializationTests.csproj
    $ dotnet sln GLTFSerialization.sln remove Tests/GLTFSerializationUWPTests/GLTFSerializationUWPTests.csproj
  5. restore referenced files:
    $ dotnet restore GLTFSerialization.sln
  6. fix case in UnityGLTF-dll.csproj:
    $ sed -i.BAK 's/CSHARP.Targets/CSharp.targets/g' ../UnityGLTF/UnityGLTF-dll.csproj
  7. mono msbuild: but this fails now, weird. Hopefully to be continued since I should be able to reproduce.
  8. To prepare for dotnet msbuild explicitly add framework path: Edit GLTFSerialization.csproj
    $ kate GLTFSerialization/GLTFSerialization.csproj
    ...
    <TargetFrameworks>net35;netstandard1.3</TargetFrameworks>
    <TargetFrameworks Condition="'$(MSBuildRuntimeType)' != 'Mono'">$(TargetFrameworks);uap10.0.10586</TargetFrameworks>
    <!-- point to mono assemblies -->
    <FrameworkPathOverride>/usr/lib/mono/4.7.1-api</FrameworkPathOverride>
    <EnableFrameworkPathOverride>true</EnableFrameworkPathOverride>
  9. Use dotnet msbuild to build as in travis:
    $ dotnet msbuild GLTFSerialization.sln -t:GLTFSerialization -p:TargetFramework=net35
  10. should finish without errors
  11. build unitypackage with Unity commandline as in export-unity-package.sh script:
    $ cd ../
    $ ~/Unity/Hub/Editor/2019.1.0f2/Editor/Unity -batchmode -projectPath UnityGLTF -exportPackage Assets/UnityGLTF ../current-package/UnityGLTF.unitypackage -quit
andreasplesch commented 5 years ago

Linux build result: UnityGLTF.unitypackage.zip GLTFSerialization.sln without tests: GLTFSerialization.sln.zip GLTFSerialization.csproj with explicit Framework assembly path: GLTFSerialization.csproj.zip UnityGLTF-dll.csproj with fixed case in CSharp.targets path: UnityGLTF-dll.csproj.zip

andreasplesch commented 5 years ago

As an aside, on the Linux experimental Unity2017.4 version, I get script errors after loading the package, release or self-built.

andreasplesch commented 5 years ago

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

pfcDorn commented 7 months ago

Please update to the latest version and open a new issue if the problem persists. Thanks!