Build errors with dev branch
mathuin opened this issue ยท 2 comments
I attempted to build from the dev branch today, and I got a bunch of warnings and several errors about missing metadata files. I am using a Dockerfile for my build (if I get it to work, I'll submit a PR) so that's why the strange output:
script -c "docker build -t mechjeb . && docker run mechjeb"
Script started, file is typescript
Sending build context to Docker daemon 22.21 MB
Sending build context to Docker daemon
Step 0 : FROM ubuntu:14.04
---> fa81ed084842
Step 1 : MAINTAINER [email protected]
---> Using cache
---> f09a9a708a62
Step 2 : RUN apt-get update && apt-get install -y git make mono-devel
---> Using cache
---> 8edd660c479b
Step 3 : RUN mkdir -p /opt/app
---> Using cache
---> d08c3a29b406
Step 4 : COPY . /opt/app/
---> cbe73871050d
Removing intermediate container bc09f3f0c15e
Step 5 : WORKDIR /opt/app
---> Running in 1d66455dc42b
---> 1d453977214c
Removing intermediate container 1d66455dc42b
Step 6 : CMD make
---> Running in 07d388a22fc6
---> e16b3f2f6c28
Removing intermediate container 07d388a22fc6
Successfully built e16b3f2f6c28
mkdir -p build
resgen2 -usesourcepath MechJeb2/Properties/Resources.resx build/Resources.resources
Read in 3 resources from '/opt/app/MechJeb2/Properties/Resources.resx'
Writing resource file... Done.
gmcs -t:library -lib:"/root/.local/share/Steam/SteamApps/common/Kerbal Space Program/KSP_Data/Managed/" \
-r:Assembly-CSharp,Assembly-CSharp-firstpass,UnityEngine \
-out:build/MechJeb2.dll \
MechJeb2/AutopilotModule.cs MechJeb2/CelestialBodyExtensions.cs MechJeb2/CompatibilityChecker.cs MechJeb2/ComputerModule.cs MechJeb2/DisplayModule.cs MechJeb2/EngineWrapper.cs MechJeb2/FuelFlowSimulation.cs MechJeb2/GLUtils.cs MechJeb2/GuiUtils.cs MechJeb2/InstallChecker.cs MechJeb2/LambertSolver.cs MechJeb2/MathExtensions.cs MechJeb2/MechJebAR202.cs MechJeb2/MechJebCore.cs MechJeb2/MechJebModuleAscentAutopilot.cs MechJeb2/MechJebModuleAscentGuidance.cs MechJeb2/MechJebModuleAscentPathEditor.cs MechJeb2/MechJebModuleAttitudeAdjustment.cs MechJeb2/MechJebModuleAttitudeController.cs MechJeb2/MechJebModuleCustomInfoWindow.cs MechJeb2/MechJebModuleDebugArrows.cs MechJeb2/MechJebModuleDockingAutopilot.cs MechJeb2/MechJebModuleDockingGuidance.cs MechJeb2/MechJebModuleFlightRecorder.cs MechJeb2/MechJebModuleInfoItems.cs MechJeb2/MechJebModuleLandingAutopilot.cs MechJeb2/MechJebModuleLandingGuidance.cs MechJeb2/MechJebModuleLandingPredictions.cs MechJeb2/MechJebModuleManeuverPlanner.cs MechJeb2/MechJebModuleMenu.cs MechJeb2/MechJebModuleNodeEditor.cs MechJeb2/MechJebModuleNodeExecutor.cs MechJeb2/MechJebModuleRCSBalancer.cs MechJeb2/MechJebModuleRCSBalancerWindow.cs MechJeb2/MechJebModuleRCSController.cs MechJeb2/MechJebModuleRendezvousAutopilot.cs MechJeb2/MechJebModuleRendezvousAutopilotWindow.cs MechJeb2/MechJebModuleRendezvousGuidance.cs MechJeb2/MechJebModuleRoverController.cs MechJeb2/MechJebModuleRoverWindow.cs MechJeb2/MechJebModuleSettings.cs MechJeb2/MechJebModuleSmartASS.cs MechJeb2/MechJebModuleSmartRcs.cs MechJeb2/MechJebModuleSolarPanelController.cs MechJeb2/MechJebModuleSpaceplaneAutopilot.cs MechJeb2/MechJebModuleSpaceplaneGuidance.cs MechJeb2/MechJebModuleStageStats.cs MechJeb2/MechJebModuleStagingController.cs MechJeb2/MechJebModuleTargetController.cs MechJeb2/MechJebModuleThrustController.cs MechJeb2/MechJebModuleThrustWindow.cs MechJeb2/MechJebModuleTranslatron.cs MechJeb2/MechJebModuleWarpController.cs MechJeb2/MechJebModuleWarpHelper.cs MechJeb2/MechJebModuleWaypointWindow.cs MechJeb2/MechJebPod.cs MechJeb2/ModExtensionDemo.cs MechJeb2/MuUtils.cs MechJeb2/OrbitExtensions.cs MechJeb2/OrbitalManeuverCalculator.cs MechJeb2/PIDController.cs MechJeb2/PartExtensions.cs MechJeb2/PartModuleExtensions.cs MechJeb2/RCSSolver.cs MechJeb2/ReentrySimulation.cs MechJeb2/SpeechBubble.cs MechJeb2/ToolbarWrapper.cs MechJeb2/Vector6.cs MechJeb2/VesselExtensions.cs MechJeb2/VesselState.cs MechJeb2/Maneuver/Operation.cs MechJeb2/Maneuver/OperationAdvancedTransfer.cs MechJeb2/Maneuver/OperationApoapsis.cs MechJeb2/Maneuver/OperationCircularize.cs MechJeb2/Maneuver/OperationCourseCorrection.cs MechJeb2/Maneuver/OperationEllipticize.cs MechJeb2/Maneuver/OperationInclination.cs MechJeb2/Maneuver/OperationInterplanetaryTransfer.cs MechJeb2/Maneuver/OperationKillRelVel.cs MechJeb2/Maneuver/OperationLambert.cs MechJeb2/Maneuver/OperationLan.cs MechJeb2/Maneuver/OperationLongitude.cs MechJeb2/Maneuver/OperationMoonReturn.cs MechJeb2/Maneuver/OperationPeriapsis.cs MechJeb2/Maneuver/OperationPlane.cs MechJeb2/Maneuver/OperationResonantOrbit.cs MechJeb2/Maneuver/OperationSemiMajor.cs MechJeb2/Maneuver/OperationTransfer.cs MechJeb2/Maneuver/PlotArea.cs MechJeb2/Maneuver/Porkchop.cs MechJeb2/Maneuver/TimeSelector.cs MechJeb2/Maneuver/TransferCalculator.cs MechJeb2/Properties/AssemblyInfo.cs MechJeb2/Properties/Resources.Designer.cs MechJeb2/alglib/alglibinternal.cs MechJeb2/alglib/alglibmisc.cs MechJeb2/alglib/ap.cs MechJeb2/alglib/diffequations.cs MechJeb2/alglib/linalg.cs MechJeb2/alglib/optimization.cs MechJeb2/LandingAutopilot/CoastToDeceleration.cs MechJeb2/LandingAutopilot/CourseCorrection.cs MechJeb2/LandingAutopilot/DecelerationBurn.cs MechJeb2/LandingAutopilot/DeorbitBurn.cs MechJeb2/LandingAutopilot/FinalDescent.cs MechJeb2/LandingAutopilot/KillHorizontalVelocity.cs MechJeb2/LandingAutopilot/LowDeorbitBurn.cs MechJeb2/LandingAutopilot/PlaneChange.cs MechJeb2/LandingAutopilot/UntargetedDeorbit.cs MechJeb2/KerbalEngineer/LogMsg.cs MechJeb2/KerbalEngineer/Logger.cs MechJeb2/KerbalEngineer/Extensions/PartExtensions.cs MechJeb2/KerbalEngineer/Helpers/Averager.cs MechJeb2/KerbalEngineer/Helpers/ForceAccumulator.cs MechJeb2/KerbalEngineer/Helpers/Pool.cs MechJeb2/KerbalEngineer/Helpers/Units.cs MechJeb2/KerbalEngineer/VesselSimulator/AttachNodeSim.cs MechJeb2/KerbalEngineer/VesselSimulator/EngineSim.cs MechJeb2/KerbalEngineer/VesselSimulator/PartSim.cs MechJeb2/KerbalEngineer/VesselSimulator/ResourceContainer.cs MechJeb2/KerbalEngineer/VesselSimulator/SimManager.cs MechJeb2/KerbalEngineer/VesselSimulator/Simulation.cs MechJeb2/KerbalEngineer/VesselSimulator/Stage.cs MechJeb2/FlyingSim/SimulatedParachute.cs MechJeb2/FlyingSim/SimulatedPart.cs MechJeb2/FlyingSim/SimulatedVessel.cs \
-resource:build/Resources.resources,MuMech.Properties.Resources.resources
MechJeb2/EngineWrapper.cs(8,0): warning CS1030: #warning: `not really needed anymore. REMOVE'
MechJeb2/MechJebModuleInfoItems.cs(440,0): warning CS1030: #warning: `Check that ....'
MechJeb2/MechJebModuleLandingAutopilot.cs(466,0): warning CS1030: #warning: `Drag Length is quite large now without parachutes, check this better'
MechJeb2/MechJebModuleLandingAutopilot.cs(865,0): warning CS1030: #warning: `FIX THAT BEFORE 1.0 !!'
MechJeb2/MechJebModuleThrustController.cs(608,0): warning CS1030: #warning: `from here remove all the EngineWrapper stuff and move the useful stuff to VesselState.EngineInfo'
MechJeb2/FlyingSim/SimulatedPart.cs(84,0): warning CS1030: #warning: `do some of this math once per frame'
MechJeb2/FlyingSim/SimulatedPart.cs(144,0): warning CS1030: #warning: `obviously move out of here and evaluate once per mach value'
error CS0006: Metadata file `Assembly-CSharp' could not be found
error CS0006: Metadata file `Assembly-CSharp-firstpass' could not be found
error CS0006: Metadata file `UnityEngine' could not be found
Compilation failed: 3 error(s), 7 warnings
make: *** [build/MechJeb2.dll] Error 1
Script done, file is typescript
Are there additional packages I should be installing?
Looks like you need to set up the correct paths to the assembly and unity dlls for your system.
As indicated in the log they are found in your Kerbal Space Program/KSP_Data/Managed/ folder.
Ah! For some reason, my Steam directory is in ~/.local/share/Steam/steamapps/common -- note the capitalization difference! I tweaked my Dockerfile and used a docker-compose.yml to point to the right place, and all is working. Thanks!
If you think there's any value to a Docker build artifact, let me know and I'll make that PR. This is enough for me to do the tinkering I originally wanted to do, but it's not as extensible as the current Makefile.