carla-simulator / carla

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

Supporting Ubuntu 20.04 on dist.carla.org #3441

Closed hofbi closed 3 years ago

hofbi commented 3 years ago

Are there any plans when the focal release will be added to dist.carla.org.

Today I tried a clean build of the Unreal Engine and Carla on 20.04 and it passed without any issues. I followed the steps in the docs for Ubuntu 18.04. Other than for 18.04. I did not install any python 2 dependencies and used g++9 instead of g++7. If there are more open question I am open to support here.

JWHennessey commented 3 years ago

I agree supporting 20.04 would be very helpful.

@hofbi - I haven't been as successful getting Carla 0.9.10 to install. Specifically, I can't install clang-8 as I run into a unmet dependency issue.

clang-8 : Depends: libllvm8 (>= 1:8~svn298832-1~) but it is not going to be installed Depends: libstdc++-5-dev but it is not installable Depends: libgcc-5-dev but it is not installable Depends: libobjc-5-dev but it is not installable Depends: libclang-common-8-dev (= 1:8.0.1+svn369350-1~exp1~20200112113617.82) but it is not going to be installed Depends: libclang1-8 (= 1:8.0.1+svn369350-1~exp1~20200112113617.82) but it is not going to be installed Recommends: llvm-8-dev but it is not going to be installed Recommends: libomp-8-dev but it is not going to be installed lld-8 : Depends: libllvm8 (= 1:8.0.1+svn369350-1~exp1~20200112113617.82) but it is not going to be installed

Did you have this issue and find a solution? It looks like the problem is with the package libffi6.

I've tried installing with clang-10 but also run into problems.

Thanks

hofbi commented 3 years ago

@JWHennessey No I did not have this issue. But sounds like a circular dependency. Maybe try to remove everything related to clang and run an apt autoremove.

jhermen-List commented 3 years ago

Having exactly the same issues on 20.04. I installed g++9 and clang-9 as clang8 was uninstallable:

The following packages have unmet dependencies: clang-8 : Depends: libllvm8 (>= 1:8~svn298832-1~) but it is not going to be installed Depends: libstdc++-5-dev but it is not installable Depends: libgcc-5-dev but it is not installable Depends: libobjc-5-dev but it is not installable Depends: libclang-common-8-dev (= 1:8.0.1+svn369350-1~exp1~20200112113617.82) but it is not going to be installed Depends: libclang1-8 (= 1:8.0.1+svn369350-1~exp1~20200112113617.82) but it is not going to be installed Recommends: llvm-8-dev but it is not going to be installed Recommends: libomp-8-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.

installing UnrealEngine and starting it worked fine, but when running the Carla make PythonAPI it complainsa bout the missing clang8

Did not had any clang packages installed before, so removing them did now help. Any hints there?

jhermen-List commented 3 years ago

OK, got it working. The problem was caused by the Xenial repo that was added using the old build instructions.

After removing "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" from /etc/apt/sources.list and running apt-get update i was able to install clang-8

make PythonAPI and make launch

Esquilli commented 3 years ago

OK, got it working. The problem was caused by the Xenial repo that was added using the old build instructions.

After removing "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" from /etc/apt/sources.list and running apt-get update i was able to install clang-8

make PythonAPI and make launch

I was having the same issue and this indeed fixed it. Thanks @jhermen-List

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hofbi commented 3 years ago

Are there any further plan with the new release?

CBalaji commented 3 years ago

I am currently running ubuntu 20.10 and i am unable to get either carla(18.04) or ros(noetic 20.04) natively if i add the repo by faking $ lsb release -sc as bionic or focal respectively i get unmet dependencies error , Ideally what should i do to get both running with the bridge , should i just run the latest package ? & build ros noetic from source? I have a new hardware and distros with kernel 5.8+ only boot well

germanros1987 commented 3 years ago

@joel-mb could you comment on this?

joel-mb commented 3 years ago

The latest CARLA release (0.9.11) for Ubuntu 20.04 has been added to the CARLA apt repository. Please see: https://github.com/carla-simulator/carla/issues/3374#issuecomment-785255690

fu1199 commented 2 years ago

I tried to build carla with Ubuntu 20.04 with following dependencies:

however i run into the following problems: ......... ......... /mnt/storage/carla/carla/Build/llvm-8.0-install/include/c++/v1/cstdlib:114:9: error: no member named 'strtold' in the global namespace using ::strtold; ~~^ /mnt/storage/carla/carla/Build/llvm-8.0-install/include/c++/v1/cstdlib:115:9: error: no member named 'strtol' in the global namespace using ::strtol; ~~^ /mnt/storage/carla/carla/Build/llvm-8.0-install/include/c++/v1/cstdlib:117:9: error: no member named 'strtoll' in the global namespace using ::strtoll; ~~^ /mnt/storage/carla/carla/Build/llvm-8.0-install/include/c++/v1/cstdlib:119:9: error: no member named 'strtoul' in the global namespace using ::strtoul; ~~^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. ninja: build stopped: subcommand failed. make: *** [Util/BuildTools/Linux.mk:137: setup] Error 1

has someone experienced the same problems? Can someone give and advice?

For me installing the carla package is not suitable because I want to adjust the Unreal Models which is then in my opinion not given.

Thanks a lot in advance.

sashajenner commented 2 years ago

I get the same error

marcusvinicius178 commented 2 years ago

For me the the @jhermen-List approach, commenting the line: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" from /etc/apt/sources.list

Later running these command lines below, worked:

sudo apt-get update sudo apt-get install clang-8

I have also added later this command line from CARLA tutorial, that this time runned without error: sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ 180 && sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-8/bin/clang 180

I also needed to install this compiler sudo apt-get install ninja-build

However after finish the command below compilation:

make PythonAPI

and:

make launch

I have respectively the following errors:

After Make Python API:

File "/home/.local/lib/python3.8/site-packages/setuptools/lib2to3_ex.py", line 34, in run_2to3 if self.distribution.use_2to3 is not True: AttributeError: 'Distribution' object has no attribute 'use_2to3' make: *** [Util/BuildTools/Linux.mk:87: PythonAPI] Erro 1

After issue make launch:

/home/carla/Util/BuildTools/BuildCarlaUE4.sh, line 172: 155657 Dead ${GDB} ${UE4_ROOT}/Engine/Binaries/Linux/UE4Editor "${PWD}/CarlaUE4.uproject" ${RHI} make: *** [Util/BuildTools/Linux.mk:7: launch] Error 137

Someone had these similar issues? How to fix

iscanGH commented 2 years ago

@marcusvinicius178, any hint for me? I removed that line and only entered sudo apt-get update && sudo apt-get install wget software-properties-common && sudo add-apt-repository ppa:ubuntu-toolchain-r/test && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -

then sudo apt-get update

But when I try to install clang 8 still the same error appear The following packages have unmet dependencies: clang-8 : Depends: libllvm8 (>= 1:8~svn298832-1~) but it is not going to be installed Depends: libclang-common-8-dev (= 1:8.0.1+svn369350-1~exp1~20200114191400.80) but it is not going to be installed Depends: libclang1-8 (= 1:8.0.1+svn369350-1~exp1~20200114191400.80) but it is not going to be installed Recommends: llvm-8-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.

I run it on Ubuntu 20.4

marcusvinicius178 commented 2 years ago

Hi, @iscanGH did you try the command:

sudo apt-get install aptitude sudo apt aptitude install clang-8

The aptitude is able to provide you with broken package solutions. Sometimes works sometimes not...it depends if your system is too bugged or not....libllvm8 is a dependency so you must install it to be able to install clang-8. If aptitude and the installation of the dependencies does not work, unfortunately, you need a fresh Linux system...

and please read my line above you must COMMENT OR REMOVEl the following line: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" It is contained in the file /etc/apt/sources.list

Then you can run the command and won't have these broken packages issue...for sure...it worked for me at least

iscanGH commented 2 years ago

@marcusvinicius178, I don't have any folder named 'etc'. Mt 'etc' folder is in anaconda3, but it doesn't contain 'apt' folder. I searched and couldn't find a file named 'sources.list'

I tried aptitude, but now I get

The following packages have unmet dependencies: clang-8 : Depends: libclang-common-8-dev (= 1:8.0.1+svn369350-1~exp1~20200114191400.80) but 1:8.0.1-9 is to be installed E: Unable to correct problems, you have held broken packages.

marcusvinicius178 commented 2 years ago

Hi @iscanGH every Linux has an etc folder.... Try deactivate conda. Maybe you are inside a virtual environment and cannot access this folder.

Just do:

conda deactivate

Then go to the root directory using:

cd ..

Then type:

cd /etc/apt

Then take a look in the files you have inside this folder:

ls

You will check that you have the sources_list file. Because the apt is from the command "sudo apt-get repo" this is the list containing the repositories which you can download packages from Ubuntu....if you didn't have this source_list file you wouldn't be able to download anything with sudo apt-get...therefore you have....just need to find where it is (should be under the /etc/apt/ folder)

Then you find the source_list, open and edit it:

sudo gedit sources_list

And then you need to locate and remove in this file or comment the following line:

deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main

After that save this file: Run:

sudo apt-get update

Open a new terminal and now try

sudo apt-get install clang-8

You will see that the broken packages issue does not happen anymore. Because those wrong repo (the line you must remove in sources_list) won't exist anymore and won't bring conflict issues.....

There is not other way to fix this issue...I remembered now that I used aptitude and also was not enough. Good luck.

chrninja commented 2 years ago

@marcusvinicius178 I was able install clang-8 with regular sudo apt-get install clang-8 and beforehand I removed the repository for the bionic clang deb with sudo add-apt-repository -r "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main".

However when rebuilding UE4 I am noticing it is using clang-10 and not clang-8.

MrLerry commented 2 years ago

Hi, I've installed Carla on a Ubuntu 20.04 machine before, but I'm getting a new error when building from source with "make PythonAPI". Its on a new set up PC. I was able to install clang8 with the solution @jhermen-List provided but im getting a CMake error now:

Resolving deltas: 100% (24/24), done.
Setup.sh: Compiling libc++.
-- The C compiler identification is Clang 8.0.1
-- The CXX compiler identification is Clang 8.0.1
-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/clang-8
-- Check for working C compiler: /usr/bin/clang-8
-- Check for working C compiler: /usr/bin/clang-8 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++-8
-- Check for working CXX compiler: /usr/bin/clang++-8 -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
  The C++ compiler

    "/usr/bin/clang++-8"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/XXX/CARLA/carla/Build/llvm-8.0-build/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/ninja cmTC_e32c5 && [1/2] Building CXX object CMakeFiles/cmTC_e32c5.dir/testCXXCompiler.cxx.o
    [2/2] Linking CXX executable cmTC_e32c5
    FAILED: cmTC_e32c5 
    : && /usr/bin/clang++-8     CMakeFiles/cmTC_e32c5.dir/testCXXCompiler.cxx.o  -o cmTC_e32c5   && :
    /usr/bin/ld: cannot find -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:39 (project)

-- Configuring incomplete, errors occurred!
make: *** [Util/BuildTools/Linux.mk:137: setup] Error 1

Did someone have a similar Issue before? Cant find anything for this Problem. Thx in advance.

-> figured it out: don't use libgcc-11 on your machine. highest seems to be 9

Alphabaijinde commented 2 years ago

OK, got it working. The problem was caused by the Xenial repo that was added using the old build instructions.

After removing "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" from /etc/apt/sources.list and running apt-get update i was able to install clang-8

make PythonAPI and make launch

@hofbi@jhermen-List url has invalid what "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" from "How to build CARLA on Linux"

shwetha-byte commented 1 year ago

Are there any plans when the focal release will be added to dist.carla.org.

Today I tried a clean build of the Unreal Engine and Carla on 20.04 and it passed without any issues. I followed the steps in the docs for Ubuntu 18.04. Other than for 18.04. I did not install any python 2 dependencies and used g++9 instead of g++7. If there are more open question I am open to support here.

Hi in my pc not installing clang -8

brilianputraa commented 1 year ago

Are there any plans when the focal release will be added to dist.carla.org. Today I tried a clean build of the Unreal Engine and Carla on 20.04 and it passed without any issues. I followed the steps in the docs for Ubuntu 18.04. Other than for 18.04. I did not install any python 2 dependencies and used g++9 instead of g++7. If there are more open question I am open to support here.

Hi in my pc not installing clang -8

Hi, I also encountered the same issues when I tried to build Carla on Ubuntu 20.04. I fixed it by installing the clang-8 using this command:

sudo apt-get install clang-8 lldb-8 lld-8

You can refer to this site for looking more about the llvm package installation (https://apt.llvm.org/)

roshambo919 commented 8 months ago

To solve the

  The C++ compiler

    "/usr/bin/clang++-8"

  is not able to compile a simple test program.

issue, I had to run sudo apt install libstdc++-12-dev