carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.33k stars 3.67k forks source link

No rule to make target 'package' during build UE and Carla in Docker #7305

Open xrkong opened 7 months ago

xrkong commented 7 months ago

CARLA version: 0.9.15 Platform/OS: Host OS Ubuntu 22.04, Docker OS Ubuntu 18.04 Problem you have experienced: $ docker build -t carla -f Carla.Dockerfile . image

I paste the logs for others to search.

  [650/659] Compile Module.Core.5_of_14.cpp
  [651/659] Compile Module.Core.13_of_14.cpp
  13 warnings generated.
  [652/659] Compile Module.ImageWrapper.gen.cpp
  [653/659] Compile Module.InstallBundleManager.cpp
  [654/659] Compile Module.CoreUObject.5_of_8.cpp
  [655/659] Compile Module.Core.8_of_14.cpp
  [656/659] Compile BuildSettings.cpp
  [657/659] Compile Module.CoreUObject.2_of_8.cpp
  31 warnings generated.
  [658/659] Link (lld) CarlaUE4-Linux-Shipping
  [659/659] UnrealBuildTool.exe CarlaUE4-Linux-Shipping.target
  Total time in Local executor: 349.53 seconds
  Total execution time: 358.12 seconds
Took 358.305206s to run mono, ExitCode=0
********** BUILD COMMAND COMPLETED **********
********** COOK COMMAND STARTED **********
Running UE4Editor Cook for project /home/carla/carla/Unreal/CarlaUE4/CarlaUE4.uproject
Commandlet log file is /home/carla/UE4.26/Engine/Programs/AutomationTool/Saved/Cook-2024.03.28-14.27.32.txt
Running: /home/carla/UE4.26/Engine/Binaries/Linux/UE4Editor /home/carla/carla/Unreal/CarlaUE4/CarlaUE4.uproject -run=Cook  -TargetPlatform=LinuxNoEditor -fileopenlog -unversioned -iterate -iterateshash -abslog=/home/carla/UE4.26/Engine/Programs/AutomationTool/Saved/Cook-2024.03.28-14.27.32.txt -stdout -CrashForUAT -unattended -NoLogTimes  -UTF8Output
  Refusing to run with the root privileges.
Took 0.230947s to run UE4Editor, ExitCode=1
ERROR: Cook failed.
       (see /root/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt for full exception trace)
AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
RunUAT ERROR: AutomationTool was unable to run successfully.
Util/BuildTools/Linux.mk:17: recipe for target 'package' failed
make: *** [package] Error 25
The command '/bin/sh -c cd /home/carla/carla &&   make package &&   rm -r /home/carla/carla/Dist' returned a non-zero code: 2

What you expected to happen: Keep building the image.

Steps to reproduce: $ docker build -t carla -f Carla.Dockerfile .

Other information (documentation you consulted, workarounds you tried): Build Unreal Engine and CARLA in Docker

PatrickPromitzer commented 6 months ago

The command "make package" is calling other make commands to build the image. For that reason, I would look up the sub commands in the make file

https://github.com/carla-simulator/carla/blob/dev/Util/BuildTools/Linux.mk package: CarlaUE4Editor PythonAPI You can try if the sub commands work and go from there.

The real error message in between the "[655/659]" lines, because Carla is building with multiple Threads. If one Thread has an error, the other Threads finish the run, and the error message will get lost in between.

I only made a image for 0.9.13 and 0.9.14, and still have to bug-fix the Dockerfile for 0.9.15 I may can help more if I have an 0.9.15 image.

xrkong commented 6 months ago

Hi,

could you provide the full log along with the file "/root/Library/Logs/Unreal Engine/LocalBuildLogs/Log.txt"?

Marcel

Hi Marcel,

I didn't find that folder in that path. But I find another Log.txt in here,

/home/carla/UE4.26/Engine/Programs/UnrealBuildTool/Log.txt

Log.txt

Thanks for your comment!

Ray

xrkong commented 6 months ago

Hi Marcel,

Thank you for your attention. I went into the container, ran make package manually and found the file you mentioned.

UBT-UnrealPak-Linux-Development.txt UBT-CarlaUE4-Linux-Shipping.txt Log.txt

Regards, Ray

xrkong commented 6 months ago

Hi, The build part seems need root, but the cook part says Refusing to run with the root privileges. which is confused me. Regards, Ray