carla: Make launch error on ubuntu 16.04, recipe for target 'setup' failed
I stuck at the step “make launch” when I build my carla by this link: https://carla.readthedocs.io/en/latest/build_linux/
It seems something about the compiler installation went wrong so too many “no member named” errors occurred.
PS: OS: Linux Ubuntu 16.04 Carla: master on carla github UE4:4.24 cmake: 3.13.4 gcc/g++: 7.4.0
Here follows only part of the screen output in the “make launch” step.
Thanks!
Setup.sh: llvm-8.0 already installed.
Setup.sh: boost-1.72.0-c8 already installed.
Setup.sh: Retrieving rpclib.
Cloning into 'rpclib-v2.2.1_c2-c8-source'...
remote: Enumerating objects: 6992, done.
remote: Total 6992 (delta 0), reused 0 (delta 0), pack-reused 6992
Receiving objects: 100% (6992/6992), 3.29 MiB | 21.00 KiB/s, done.
Resolving deltas: 100% (4455/4455), done.
Checking connectivity... done.
Note: checking out '9bb73dae8f91c67b382b02f8b5b63a6cfcd865b2'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
Setup.sh: Building rpclib with libc++.
-- The C compiler identification is Clang 8.0.1
-- The CXX compiler identification is Clang 8.0.1
-- 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 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test UNUSED_LAMBDA_CAPTURE_WARN_SUPPORTED
-- Performing Test UNUSED_LAMBDA_CAPTURE_WARN_SUPPORTED - Failed
-- Performing Test ZERO_AS_NULL_POINTER_CONSTANT_WARN_SUPPORTED
-- Performing Test ZERO_AS_NULL_POINTER_CONSTANT_WARN_SUPPORTED - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-libcxx-build
[13/14] Building CXX object CMakeFiles/rpc.dir/lib/rpc/this_server.cc.o
clang: warning: -Wl,-L/media/junchuan/exdisk/carla/Build/llvm-8.0-install/lib: 'linker' input unused [-Wunused-command-line-argument]
[13/14] Building CXX object CMakeFiles/rpc.dir/lib/rpc/this_session.cc.o
FAILED: /usr/bin/clang++-8 -DASIO_STANDALONE -DRPCLIB_ASIO=clmdep_asio -DRPCLIB_FMT=clmdep_fmt -DRPCLIB_MSGPACK=clmdep_msgpack -I/media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/include -isystem /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/dependencies/include -fPIC -std=c++14 -stdlib=libc++ -I/media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1 -Wl,-L/media/junchuan/exdisk/carla/Build/llvm-8.0-install/lib -DBOOST_NO_EXCEPTIONS -DASIO_NO_EXCEPTIONS -Wall -pedantic -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded -Wno-missing-prototypes -Wno-undef -pthread -std=gnu++11 -MD -MT CMakeFiles/rpc.dir/lib/rpc/this_session.cc.o -MF CMakeFiles/rpc.dir/lib/rpc/this_session.cc.o.d -o CMakeFiles/rpc.dir/lib/rpc/this_session.cc.o -c /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/lib/rpc/this_session.cc
clang: warning: -Wl,-L/media/junchuan/exdisk/carla/Build/llvm-8.0-install/lib: 'linker' input unused [-Wunused-command-line-argument]
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/lib/rpc/this_session.cc:1:
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/include/rpc/this_session.h:6:
/media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/atomic:12:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _LIBCPP_ATOMIC
^
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/lib/rpc/this_session.cc:1:
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/include/rpc/this_session.h:6:
In file included from /media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/atomic:543:
/media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/__config:12:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _LIBCPP_CONFIG
^
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/lib/rpc/this_session.cc:1:
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/include/rpc/this_session.h:6:
In file included from /media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/atomic:544:
/media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/cstddef:12:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _LIBCPP_CSTDDEF
^
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/lib/rpc/this_session.cc:1:
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/include/rpc/this_session.h:6:
In file included from /media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/atomic:544:
In file included from /media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/cstddef:38:
/media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/version:12:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _LIBCPP_VERSIONH
^
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/lib/rpc/this_session.cc:1:
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/include/rpc/this_session.h:6:
In file included from /media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/atomic:545:
/media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/cstdint:12:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _LIBCPP_CSTDINT
^
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/lib/rpc/this_session.cc:1:
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/include/rpc/this_session.h:6:
In file included from /media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/atomic:545:
In file included from /media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/cstdint:145:
/media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/stdint.h:12:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _LIBCPP_STDINT_H
^
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/lib/rpc/this_session.cc:1:
In file included from /media/junchuan/exdisk/carla/Build/rpclib-v2.2.1_c2-c8-source/include/rpc/this_session.h:6:
In file included from /media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/atomic:545:
/media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/cstdint:153:8: error: no member named 'int8_t' in the global namespace
using::int8_t;
~~^
/media/junchuan/exdisk/carla/Build/llvm-8.0-install/include/c++/v1/cstdint:154:8: error: no member named 'int16_t' in the global namespace
using::int16_t;
~~^
......
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
......
fatal error: too many errors emitted, stopping now [-ferror-limit=]
5 warnings and 20 errors generated.
......
fatal error: too many errors emitted, stopping now [-ferror-limit=]
13 warnings and 20 errors generated.
ninja: build stopped: subcommand failed.
Util/BuildTools/Linux.mk:135: recipe for target 'setup' failed
make: *** [setup] Error 1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (3 by maintainers)
I was able to resolve this issue as following. As it is clear that error is in llvm headers, I added following CXX flag -nostdinc++ where LLVM headers are being included in Util/BuildTools/Setup.sh
I searched for -I${LLVM_INCLUDE}. There are two places and replaced -fPIC -std=c++14 -stdlib=libc++ with -fPIC -nostdinc++ -std=c++14 -stdlib=libc++
This solves the problem for me.
I solved this issue with the solution provided by @DSantosO.
you may need to remove your old llvm-8 first:
I had also the same issue on Ubuntu 18.04 and for me it seemed to be a problem with the version of clang. After removing all the installed versions of clang and llvm, I reinstall them following carefully the instructions on the carla documentation: https://carla.readthedocs.io/en/latest/build_linux/ at section ‘Dependencies’ and then it was working. I hope this is useful.