Home>

I'm trying to run the automatic driving simulator CARLA in Ubuntu using Parallels Desktop Lite on MacBook Pro.

We are proceeding with reference to the following URL.

Move the autonomous driving simulator CARLA

And in the URL
An error occurs during Setup in the procedure "Install CARLA".

Error message
$./Setup.sh
./Setup.sh: line 16: ./Environment.sh: No such file or directory
mkdir: missing operand
Try 'mkdir --help' for more information.
./Setup.sh: line 19: pushd: no other directory
./Setup.sh: line 31: log: command not found
./Setup.sh: line 79: log: command not found
./Setup.sh: line 169: log: command not found
./Setup.sh: line 237: log: command not found
./Setup.sh: line 299: log: command not found
./Setup.sh: line 349: get_git_repository_version: command not found
./Setup.sh: line 351: log: command not found
./Setup.sh: line 356: /Version.h: Permission denied
./Setup.sh: line 358: move_if_changed: command not found
./Setup.sh: line 364: log: command not found
cp: '.gen' and '.gen' are the same file
./Setup.sh: line 453: move_if_changed: command not found
./Setup.sh: line 454: move_if_changed: command not found
./Setup.sh: line 455: move_if_changed: command not found
./Setup.sh: line 461: popd: directory stack empty
./Setup.sh: line 463: log: command not found
Corresponding source code (I will write only near the error)
#!/bin/bash
# ================================================= =============================
#-Set up environment -------------------------------------------- ------------
# ================================================= =============================
command -v/usr/bin/clang ++-7>/dev/null 2>&1 || {
  echo>&2 "clang 7 is required, but it's not installed.";
  exit 1;
}
CXX_TAG = c7
export CC =/usr/bin/clang-7
export CXX =/usr/bin/clang ++-7
source $(dirname "$0")/Environment.sh
mkdir -p ${CARLA_BUILD_FOLDER}
pushd ${CARLA_BUILD_FOLDER}>/dev/null // 19th line

if [[-d "${LLVM_BASENAME} -install"]];then
  log "${LLVM_BASENAME} already installed." // line 31
elserm -Rf ${LLVM_BASENAME} -source ${LLVM_BASENAME} -build
  log "Retrieving libc ++."
  git clone --depth = 1 -b release_70 https://github.com/llvm-mirror/llvm.git
unset LLVM_BASENAME
# ================================================= =============================
#-Get boost includes -------------------------------------------- ------------
# ================================================= =============================

if [[-d "${BOOST_BASENAME} -install"]];then
  log "${BOOST_BASENAME} already installed." // line 79
else
  rm -Rf ${BOOST_BASENAME} -source

# ================================================= =============================
#-Get rpclib and compile it with libc ++ and libstdc ++ -----------------------
# ================================================= =============================
RPCLIB_PATCH = v2.2.1_c2
RPCLIB_BASENAME = rpclib-${RPCLIB_PATCH}-${CXX_TAG}
RPCLIB_LIBCXX_INCLUDE = ${PWD}/${RPCLIB_BASENAME} -libcxx-install/include
RPCLIB_LIBCXX_LIBPATH = ${PWD}/${RPCLIB_BASENAME} -libcxx-install/lib
RPCLIB_LIBSTDCXX_INCLUDE = ${PWD}/${RPCLIB_BASENAME} -libstdcxx-install/include
RPCLIB_LIBSTDCXX_LIBPATH = ${PWD}/${RPCLIB_BASENAME} -libstdcxx-install/lib
if [[-d "${RPCLIB_BASENAME} -libcxx-install"&&-d "${RPCLIB_BASENAME} -libstdcxx-install"]];then
  log "${RPCLIB_BASENAME} already installed." // line 169
else
  rm -Rf \
      ${RPCLIB_BASENAME} -source \
      ${RPCLIB_BASENAME} -libcxx-build ${RPCLIB_BASENAME} -libstdcxx-build \
      ${RPCLIB_BASENAME} -libcxx-install ${RPCLIB_BASENAME} -libstdcxx-install
  log "Retrieving rpclib."
# ================================================= =============================
#-Get GTest and compile it with libc ++ --------------------------------------
# ================================================= =============================
GTEST_VERSION = 1.8.1
GTEST_BASENAME = gtest-${GTEST_VERSION}-${CXX_TAG}
GTEST_LIBCXX_INCLUDE = ${PWD}/${GTEST_BASENAME} -libcxx-install/include
GTEST_LIBCXX_LIBPATH = ${PWD}/${GTEST_BASENAME} -libcxx-install/lib
GTEST_LIBSTDCXX_INCLUDE = ${PWD}/${GTEST_BASENAME} -libstdcxx-install/include
GTEST_LIBSTDCXX_LIBPATH = ${PWD}/${GTEST_BASENAME} -libstdcxx-install/lib
if [[-d "${GTEST_BASENAME} -libcxx-install"&&-d "${GTEST_BASENAME} -libstdcxx-install"]];then
  log "${GTEST_BASENAME} already installed." // line 237
else
  rm -Rf \
      ${GTEST_BASENAME} -source \
      ${GTEST_BASENAME} -libcxx-build ${GTEST_BASENAME} -libstdcxx-build \
      ${GTEST_BASENAME} -libcxx-install ${GTEST_BASENAME} -libstdcxx-install
  log "Retrieving Google Test."# ================================================= =============================
#-Get Recast&Detour and compile it with libc ++ ------------------------------
# ================================================= =============================
RECAST_COMMIT = "c40188c796f089f89a42e0b939d934178dbcfc5c"
RECAST_BASENAME = recast-${CXX_TAG}
RECAST_INCLUDE = ${PWD}/${RECAST_BASENAME} -install/include
RECAST_LIBPATH = ${PWD}/${RECAST_BASENAME} -install/lib
if [[-d "${RECAST_BASENAME} -install"]];then
  log "${RECAST_BASENAME} already installed." // line 299
else
  rm -Rf \
      ${RECAST_BASENAME} -source \
      ${RECAST_BASENAME} -build \
      ${RECAST_BASENAME} -install
  log "Retrieving Recast&Detour"
# ================================================= =============================
#-Generate Version.h ------------------------------------------- -------------
# ================================================= =============================
CARLA_VERSION = $(get_git_repository_version) /// 349 line
log "CARLA version ${CARLA_VERSION}." // line 351
VERSION_H_FILE = ${LIBCARLA_ROOT_FOLDER} /source/carla/Version.h
VERSION_H_FILE_GEN = ${CARLA_BUILD_FOLDER} /Version.h
sed -e "s | \ ${CARLA_VERSION} | ${CARLA_VERSION} | g" ${VERSION_H_FILE} .in>// Line 356 ${VERSION_H_FILE_GEN}
move_if_changed "${VERSION_H_FILE_GEN}" "${VERSION_H_FILE}" /// 358
# ================================================= =============================
#-Generate CMake toolchains and config --------------------------------------
# ================================================= =============================
log "Generating CMake configuration files." // Line 364
#-LIBSTDCPP_TOOLCHAIN_FILE ---------------------------------------------- ----
cat>${LIBSTDCPP_TOOLCHAIN_FILE} .gen<<EOL
#Automatically generated by `basename" $​​0 "`

#-Move files --------------------------------------------- -------------------
move_if_changed "${LIBSTDCPP_TOOLCHAIN_FILE} .gen" "${LIBSTDCPP_TOOLCHAIN_FILE}" /// 453 line
move_if_changed "${LIBCPP_TOOLCHAIN_FILE} .gen" "${LIBCPP_TOOLCHAIN_FILE}" // line 454
move_if_changed "${CMAKE_CONFIG_FILE} .gen" "${CMAKE_CONFIG_FILE}" // line 455

# ================================================= =============================
#-... and we are done --------------------------------------
# ================================================= =============================
popd>/dev/null // line 461
log "Success!" `` // line 463
I don't know the solution ...

Generally, I thought I should install something that wasn't enough for the command not found solution, but I can't figure out how to deal with it because the command in Setup.sh is not found.

If there are any deficiencies in the display or information, add them each time.