Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building Carla on Mac OSX #150

Open
ajax98 opened this issue Jan 19, 2018 · 72 comments · May be fixed by #5086
Open

Building Carla on Mac OSX #150

ajax98 opened this issue Jan 19, 2018 · 72 comments · May be fixed by #5086
Assignees
Labels

Comments

@ajax98
Copy link

ajax98 commented Jan 19, 2018

Online I see that there only exist manual for installing and building Carla on Linux. Is it possible for installing and running it on Mac?

@nsubiron
Copy link
Collaborator

Hi @ajax98,

Yes, it is possible. However we don't have an automated build system for MacOS, so it would require some effort to make it work.

Please have a look at the progress at #103. Also it might be helpful to check out the documentation for How to build on Linux and the discussion for building on Windows at #21 as the process is basically the same.

Please share your progress here if you find any difficulties. It can be very helpful for other people trying to build on Mac, and eventually we might be able to make an automated system as for Linux.


There is a compilation error that is going to appear, you need to replace the block at "Source/Carla/SceneCaptureCamera.cpp" Line 27 by

static constexpr auto DEPTH_MAT_PATH =
#if PLATFORM_LINUX
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial_GLSL.DepthEffectMaterial_GLSL'");
#else
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial.DepthEffectMaterial'");
#endif

This is something we have to fix, but we'll have to test if the default depth material is working well on Mac. Help on this would be appreciated as we don't have here Mac machines to test it.

@nsubiron
Copy link
Collaborator

nsubiron commented Feb 6, 2018

Check out #176 (comment)

@nsubiron nsubiron added the build system Changes related to the build system label Mar 14, 2018
@nsubiron nsubiron assigned felipecode and unassigned nsubiron Mar 14, 2018
@thegleb
Copy link

thegleb commented Mar 31, 2018

I skimmed the couple threads I've seen here about running Carla on a Mac and I have modified all the files as mentioned, but I keep running into the same issue. The .ueproject seems to get generated but I'm missing a couple of .dylibs, e.g. UE4Editor-Carla.dylib and a second one. Any advice?

Output from xcode when trying to build the CarlaUE4 project:

Undefined symbols for architecture x86_64:
  "FRHICommandListBase::WaitForRHIThreadTasks()", referenced from:
      ASceneCaptureCamera::WritePixelsNonBlocking(float, FRHICommandListImmediate&) const in Module.Carla.cpp.o
  "_GRHICommandList", referenced from:
      ASceneCaptureCamera::WritePixelsNonBlocking(float, FRHICommandListImmediate&) const in Module.Carla.cpp.o
      ASceneCaptureCamera::WritePixels(float) const in Module.Carla.cpp.o
  "FRHICommandListBase::WaitForDispatch()", referenced from:
      ASceneCaptureCamera::WritePixelsNonBlocking(float, FRHICommandListImmediate&) const in Module.Carla.cpp.o
  "FRHICommandListExecutor::ExecuteList(FRHICommandListImmediate&)", referenced from:
      ASceneCaptureCamera::WritePixelsNonBlocking(float, FRHICommandListImmediate&) const in Module.Carla.cpp.o
  "FlushRenderingCommands()", referenced from:
      FServerGameController::Tick(float) in Module.Carla.cpp.o
  "_GIsRunningRHIInSeparateThread_InternalUseOnly", referenced from:
      ASceneCaptureCamera::WritePixelsNonBlocking(float, FRHICommandListImmediate&) const in Module.Carla.cpp.o
  "_GMainThreadBlockedOnRenderThread", referenced from:
      ASceneCaptureCamera::Tick(float) in Module.Carla.cpp.o
  "_GIsThreadedRendering", referenced from:
      ASceneCaptureCamera::Tick(float) in Module.Carla.cpp.o
      FRenderCommand::GetDesiredThread() in Module.Carla.cpp.o
  "_GMaxRHIShaderPlatform", referenced from:
      ASceneCaptureCamera::Tick(float) in Module.Carla.cpp.o
  "FRHICommandListBase::WaitForTasks(bool)", referenced from:
      ASceneCaptureCamera::WritePixelsNonBlocking(float, FRHICommandListImmediate&) const in Module.Carla.cpp.o
  "_GDynamicRHI", referenced from:
      ASceneCaptureCamera::WritePixelsNonBlocking(float, FRHICommandListImmediate&) const in Module.Carla.cpp.o
      ASceneCaptureCamera::WritePixels(float) const in Module.Carla.cpp.o
  "GetImmediateCommandList_ForRenderCommand()", referenced from:
      ASceneCaptureCamera::Tick(float) in Module.Carla.cpp.o
      TGraphTask<ASceneCaptureCamera::Tick(float)::EURCMacro_FWritePixelsNonBlocking>::ExecuteTask(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type) in Module.Carla.cpp.o
      TGraphTask<ASceneCaptureCamera::Tick(float)::EURCMacro_FWritePixels>::ExecuteTask(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type) in Module.Carla.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR: UBT ERROR: Failed to produce item: /Users/gleb/dev/deep-learning-learning/carla/Unreal/CarlaUE4 4.18/Plugins/Carla/Binaries/Mac/UE4Editor-Carla.dylib
Total build time: 26.00 seconds (Local executor: 0.00 seconds)
Command /Users/gleb/UnrealEngine_4.18/Engine/Build/BatchFiles/Mac/Build.sh failed with exit code 5

When I open the project through UE4Editor, it complains about the lack of the dylibs and tries to build them, but fails every time as well.

@thegleb
Copy link

thegleb commented Apr 5, 2018

Update: got it to complete the build by modifying the Carla.build.cs further:

    PublicDependencyModuleNames.AddRange(
      new string[]
      {
        "Core",
        // ... add other public dependencies that you statically link with here ...
        "RHI", // added this
        "RenderCore" // and this
      }
      );

@analog-cbarber
Copy link

analog-cbarber commented Jul 4, 2018

I got this working using Xcode 8.2.1, which is based on clang 3.9. I had to modify the scripts to use clang/ clang++ without the version suffix. I did run into one problem that I do not understand:
the Makefile generated by the GenerateProjectFiles script is targeted at Linux instead of Mac :

BUILD = bash "$(UNREALROOTPATH)/Engine/Build/BatchFiles/Linux/Build.sh"
PROJECTBUILD = mono "$(UNREALROOTPATH)/Engine/Binaries/DotNET/UnrealBuildTool.exe"
...
UE4Editor:
         $(BUILD) UE4Editor Linux Development  $(ARGS)

When I manually changed Linux to Mac and add mono to my PATH, I was able to complete the
build. I cannot figure out how to fix the Makefile generation. Invoking the GenerateProjectFiles.sh
script with -Platforms=Mac doesn't do any good. Not sure what I did wrong.

In any case, if I modify the generated Makefile by replacing all instances of Linux with Mac
and replacing modifying the PROJECTBUILD definition to be the following, then the build works:

MONO = "$(UNREALROOTPATH)/Engine/Binaries/ThirdParty/Mono/Mac/bin/mono"
PROJECTBUILD = $(MONO) "$(UNREALROOTPATH)/Engine/Binaries/DotNET/UnrealBuildTool.exe"

@analog-cbarber
Copy link

It appears that the -makefiles flag to the UnrealBuildTool does not properly support Mac targets. The -cmakefiles appears to do the right thing, but I have not actually tried doing a build yet. Since it is not clear what version of llvm/clang is used by later releases of Xcode, and the 0.9 release of CARLA is using clang 5.0, I suspect that using cmake will be preferable to Xcode.

@nsubiron
Copy link
Collaborator

@analog-cbarber Thanks for the report!

In Linux we use a very specific version of the compiler because we need to link against libc++ (instead of the usual libstdc++ for Linux). In Mac, I imagine we can go with the default compiler installed like we do on Windows.

And for the sh scripts, they have been written for Linux and only tested on Linux, we may need to adapt them.

@analog-cbarber
Copy link

That's good, so the Xcode build approach may still be ok? So the main risk would be if CARLA started to depend on C++ features in clang 5.0 that are not yet supported in the Xcode variant?

@nsubiron
Copy link
Collaborator

That's likely to happen, in the latest changes in networking code we use C++17 features, most of them already available in previous versions of clang with -std=c++1z but some may not.

@analog-cbarber
Copy link

OK. So either I need to figure out how to build properly using actual llvm/clang 5.0 or hope that Xcode supports the required features. It seems that Xcode 10 may be based on 5.0 (see Joky's comment on this thread: https://news.ycombinator.com/item?id=16545037)

@analog-cbarber
Copy link

According to https://clang.llvm.org/cxx_status.html, it appears that clang 4.0 should support most of the C++17 features. The only ones I see that are missing are constexpr lambda expressions (P0170R1)
and template argument deduction for class templates (P0091R3 and P0512R0). If you aren't using either of those features, then I would expect clang++ 4.0 and Xcode 9.2 to work. That would be nice if true, since the official 4.19 release appears to be built with Xcode 9.2.

@nsubiron
Copy link
Collaborator

I don't think we use any of those features, up until recently all our code base was compiling with clang-3.9 and -std=c++14, it's going to be starting at CARLA 0.9.0 that we move to clang-5.0 and C++17. The C++17 standard has some nice features that may help performance, and hopefully soon will be fully supported by most compilers.

So for now shouldn't be any problems compiling. However, we won't be maintaining compatibility as we simply don't have enough people to maintain it.

@nsubiron
Copy link
Collaborator

Hey @analog-cbarber, so after your comments I've been digging in the UE4 toolchains, and they seem to be forcing C++14 in all platforms (as for UE4.19). I think it would be wise for us to restrict our libraries to C++14 too since some of the code may need to compile inside UE4 environment too. So I'm going to keep CARLA 0.9.0 with C++14 standard (still clang-5.0 by default as it's the recommended for UE4.19 in Linux).

I'm a bit sad about it cause I wanted to start using C++17 😄 but at least it's good to keep compatibility since at this point almost every compiler supports C++14.

@analog-cbarber
Copy link

You could still probably get away with using C++17 features that are compatible with whatever runtime UE 4.19 is using. I am not sure which ones that would be...

FWIW, the changes I made to get the Mac build to work using Xcode 8.2.1 are here:

https://github.com/analog-garage/carla/commits/mac-build

I won't issue a pull request, because this is hackier than I would like and will require significant reworking for the 0.9 release in any case.

@edufford
Copy link

@analog-cbarber, I was able to get Mac command line setup/builds working using homebrew-installed llvm/clang 3.9 with some modifications to the Carla scripts and cmake setup file instead of installing another version of Xcode.

I think the main trick was to prevent the libc++ library conflict with Apple's built-in version by using the -nostdinc++ flag for using an alternate installation of libc++ based on the libcxx docs at:
https://libcxx.llvm.org/docs/UsingLibcxx.html#getting-started

Getting all the directory changes correct for the Unreal Engine command line project build and launch was also a little tricky, but seems to work. My Unreal Engine is installed from the Epic Games Launcher instead of from source.

You can check out my modifications for this from the current Carla master at:
edufford@78e9e19

My environment (for reference):

  • macOS High Sierra 10.13.5
  • Xcode 9.4.1
  • Clang 3.9.1 (installed by homebrew llvm-3.9)
  • UE Editor 4.18.3 (installed from Mac Epic Games Launcher)

@edufford
Copy link

edufford commented Jul 15, 2018

Also, for installing the Mac build dependencies, I used:

  • LLVM/Clang 3.9
    brew tap llvm-hs/homebrew-llvm
    brew install llvm-3.9

  • tac command by symbolic link
    brew install coreutils
    ln -s /usr/local/bin/gtac /usr/local/bin/tac

  • Others
    brew install cmake autoconf automake ninja libtool wget

  • Python 3.6 (installed by Conda) Requests package
    pip install requests

When building the plugins in Unreal Engine, I also had to downgrade errors for unused lambda capture following https://answers.unrealengine.com/questions/779733/xcode-build-errors-lambda-capturenot-used.html:

  1. Modify Engine/Source/Programs/UnrealBuildTool/Platform/MacToolChain.cs to add:
    Result += " -Wno-unused-lambda-capture";
    
    after the existing line:
    Result += " -Wno-unused-value";
    
  2. Run xbuild UnrealBuildTool.csproj (deprecated) or msbuild UnrealBuildTool.csproj from the Engine/Source/Programs/UnrealBuildTool/ directory

@raskolnikov-reborn
Copy link

I get the "UE4Editor-Carla.dylib missing" along with one more. Rebuilding fails and it says try from source manually. Any help with this?

@edufford
Copy link

edufford commented Aug 8, 2018

The missing dylib messages is normal, just needs the UE rebuild to work. Are you using the latest Carla 0.9.0? It was updated for Unreal Engine 4.19 instead of 4.18 so there may be new UE rebuild issues. I haven’t had a chance to try it with UE 4.19 yet.

@analog-cbarber
Copy link

I got a Mac build working based on the current master branch (i.e. 0.9.0) using
Xcode 9.2 and the standard UE 4.19 download, so there is no need to build libc++
or the Unreal Engine.

Some changes were required.

I have pushed what I have so far on the mac-build-0.9 branch of our fork.

See https://github.com/analog-garage/carla/blob/mac-build-0.9/Docs/how_to_build_on_mac.md

@edufford
Copy link

@analog-cbarber Nice work!

I was able to use your fork's mac-build-0.9 branch to build Carla 0.9 with Xcode 9.4.1 as well, after modifying the Xcode version check in the Util/BuildTools/Setup.command file.

Copying the GenerateProjectFiles.sh to the UE root folder didn't work for me though, so instead I was able to modify the Util/BuildTools/BuildCarlaUE4.command file to call the built in Mac GenerateProjectFiles.sh that comes with the UE engine install package in place:

Util/BuildTools/BuildCarlaUE4.command

log "Generate Unreal project files."

#if [[ ! -f ${UE4_ROOT}/GenerateProjectFiles.sh ]]; then
#  fatal_error "No GenerateProjectFiles.sh in ${UE4_ROOT}. You can copy this from UnrealEngine source tree."
#fi

#${UE4_ROOT}/GenerateProjectFiles.sh -project="${PWD}/CarlaUE4.uproject" -game -engine -makefiles

# HACK! This generates wrong targets on the Mac! Just replace Linux with Mac everywhere:
#sed -i .original -e "s/Linux/Mac/g" Makefile

# GenerateProjectFiles.sh requires to change directory to location of UE engine Mac batch files
pushd "${UE4_ROOT}/Engine/Build/BatchFiles/Mac/" >/dev/null
./GenerateProjectFiles.sh -project="${CARLAUE4_ROOT_FOLDER}/CarlaUE4.uproject" -game -engine -makefiles
popd >/dev/null

The Xcode project workspace Unreal/CarlaUE4/CarlaUE4.xcworkspace that this generates worked fine to Build & Run the project and launch the UE Editor. It would be great if your how_to_build_on_mac.md doc also included some info about using this file to build/run the project too.

For the command line UE project build though, instead of using make with the Linux->Mac swapped UE Makefile, I had to modify the Util/BuildTools/BuildCarlaUE4.command file to use UE's Mac Build.sh script directly and add -NoUBTMakefiles to prevent an error about invalid makefile contents from the UE Build Tool:

Util/BuildTools/BuildCarlaUE4.command

log "Build CarlaUE4 project."
#make CarlaUE4Editor

# Build.sh requires to change directory to location of UE engine root
pushd "${UE4_ROOT}" >/dev/null
./Engine/Build/BatchFiles/Mac/Build.sh UE4Editor Mac Development -NoUBTMakefiles
popd >/dev/null

For Mac, Xcode is probably the way to go anyways as long as the AppleClang version is still compatible. Thanks again for posting your work!

@analog-cbarber
Copy link

analog-cbarber commented Aug 20, 2018 via email

@analog-cbarber
Copy link

analog-cbarber commented Aug 20, 2018 via email

@edufford
Copy link

Ah, I was looking for the GenerateProjectFiles.sh file in the /UE_4.19/Engine/Source/ folder since I installed it from the Epic Games Launcher instead of from the full source package, so I could only find the file in the /UE_4.19/Engine/Build/BatchFiles/Mac/ folder and copying that one over didn't work.

It did work when I downloaded the GenerateProjectFiles.sh file from Epic's source repo as you linked, but it looks like this script is basically just running:

cd Engine/Build/BatchFiles/Mac
sh ./GenerateLLDBInit.sh
sh ./GenerateProjectFiles.sh $@

So it seems that if the BuildCarlaUE4.command file just manually ran these scripts directly, similar to my modification, then there would be no need for copying this file over from the main engine source.

@analog-cbarber
Copy link

manual_control.py fails because pygame doesn't seem to be able to find any fonts on my mac. I worked around this by manually adding a list of fonts to look for and am now able to run the manual control program.

Not sure what to do about the freezing problem in standalone mode. When this happens I have to powercycle my mac. Not sure how to debug this. Perhaps there is a log file somewhere that will give me a clue...

@analog-cbarber
Copy link

I merged 0.9.4 into my fork and built.

Haven't tested other than to drive the manual control a bit connected to the game running in PIE mode. I have no reason to believe that the freeze problem has gone away. (Speaking of which, I have tried running with a variety of different settings but have not found any that work. There are some GPU logs, but aren't especially informative to me.)

I should say that while it is very useful to be able to do development on my carla related code on my Macbook pro, it's GPU isn't powerful enough to make good use of CARLA. Unless someone figures out how to make use of external GPUs, I don't think that Mac will ever be a recommended platform for working with CARLA. If the network overhead is not too bad, it might be more generally useful to be able to remotely drive a CARLA simulation from a Mac, in which case it would make sense to support the client API.

@WolfgangFahl
Copy link

WolfgangFahl commented Jul 21, 2019

I get an "OpenGL Not Supported" dialog when trying to run Unreal Engine 4.22.3
grafik
https://answers.unrealengine.com/questions/530680/what-does-opengl-not-supported-mean.html explains this. So you might want to watch out that your hardware is fit for the current version of the Unreal Engine

@WolfgangFahl
Copy link

At http://wiki.bitplan.com/index.php/Car_simulation_software#Carla I have documented my attempts in compiling for a Mac with mixed results. On my 10.13.6 laptop I finally got it working after many hours of fiddling.

@WolfgangFahl
Copy link

make package fails with:

bash: /Users/Shared/EpicGames/UE_4.21/Engine/Build/BatchFiles/Linux/RunMono.sh: No such file or directory

while there is RunMono.sh is in Mac directory. Why is this not selected?

@analog-cbarber
Copy link

You shouldn't even bother with make package until you can launch the game in the editor and run it in standalone mode.

Since I was unable to do that (because my Mac froze), I probably never tried 'make package' and would not have noticed if it was not correct.

@rsatyan
Copy link

rsatyan commented Sep 19, 2019

Having an issue building PythonAPI.3 - Have followed the instructions in how to build for mac.

In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/source/carla/client/detail/Episode.cpp:7:
In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/cmake/../source/carla/client/detail/Episode.h:9:
In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/cmake/../source/carla/AtomicSharedPtr.h:9:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4448:28: error:
cannot cast 'element_type' (aka 'carla::client::detail::EpisodeState') to its private base class 'const
enable_shared_from_thiscarla::client::detail::EpisodeState'
__r.__enable_weak_this(__r._ptr, __r._ptr);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4810:29: note: in
instantiation of function template specialization
'std::__1::shared_ptrcarla::client::detail::EpisodeState::make_shared<const unsigned long long &>' requested here
return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
^
/Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/source/carla/client/detail/Episode.cpp:29:19: note: in instantiation of
function template specialization 'std::__1::make_shared<carla::client::detail::EpisodeState, const unsigned long long &>'
requested here
_state(std::make_shared(info.id)),
^
In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/source/carla/client/detail/Episode.cpp:7:
In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/cmake/../source/carla/client/detail/Episode.h:15:
/Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/cmake/../source/carla/client/detail/EpisodeState.h:25:7: note:
implicitly declared private here
: std::enable_shared_from_this,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/source/carla/client/detail/Episode.cpp:7:
In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/cmake/../source/carla/client/detail/Episode.h:9:
In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/cmake/../source/carla/AtomicSharedPtr.h:9:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4448:28: error:
cannot cast 'element_type' (aka 'const carla::client::detail::EpisodeState') to its private base class 'const
enable_shared_from_thiscarla::client::detail::EpisodeState'
__r.__enable_weak_this(__r._ptr, __r._ptr);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4810:29: note: in
instantiation of function template specialization 'std::__1::shared_ptr::make_shared<const carla::sensor::data::RawEpisodeState &>' requested here
return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
^
/Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/source/carla/client/detail/Episode.cpp:47:26: note: in instantiation of
function template specialization 'std::__1::make_shared<const carla::client::detail::EpisodeState, const
carla::sensor::data::RawEpisodeState &>' requested here
auto next = std::make_shared(CastData(*data));
^
In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/source/carla/client/detail/Episode.cpp:7:
In file included from /Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/cmake/../source/carla/client/detail/Episode.h:15:
/Users/savatara/Downloads/carla-mac-build-0.9/LibCarla/cmake/../source/carla/client/detail/EpisodeState.h:25:7: note:
implicitly declared private here
: std::enable_shared_from_this,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

@markcoletti
Copy link

Also, for installing the Mac build dependencies, I used:
[...]

  • tac command by symbolic link
    brew install coreutils
    ln -s /usr/local/bin/gtac /usr/local/bin/tac
    [...]

As a small aside, tac came over naturally when I did brew install coreutils, so I didn't need to do the symlink. Thank you for the helpful info, though!

@raeed17
Copy link

raeed17 commented Jan 23, 2020

If someone got CARLA to work on Mac using Xcode could they maybe put in on GitHub for people to use? I feel like it would help a lot of people! Unless this is already available somewhere?

@germanros1987
Copy link
Member

We could use some help with this...

@mainakchain
Copy link

Why am I getting this error when I run ./CarlaUE4.sh in terminal. I have a Mac system.

readlink: illegal option -- f usage: readlink [-n] [file ...] ./CarlaUE4.sh: line 5: ./CarlaUE4/Binaries/Linux/CarlaUE4: cannot execute binary file

@Hither1
Copy link

Hither1 commented Jun 22, 2022

Hi all,

I'm wondering is it possible to play the CARLA .log file on a Macbook Pro without GPU? Thanks!

@DrickCode
Copy link

Hi analog-cbarber,

First, thanks for your work.
Now I'm trying to build on x86 Big Sur(11.4)
But there are map error in run time
All setup libraries are built in 11.4, but when link to UE4Editor-Carla.dylib.
It shows

Plugins/Carla/CarlaDependencies/lib/librpc.a(this_server.o)) was built for newer macOS version (11.4) than being linked (10.12)

How do I change the config when build UE4Editor-Carla?

And run time shows map error

SEGV_MAPERR at 0x40

Unknown() Address = 0x16920d919 (filename not found) [in UE4Editor-Carla.dylib]
Unknown() Address = 0x10641220c (filename not found) [in UE4Editor-CoreUObject.dylib]
Unknown() Address = 0x10673fda7 (filename not found) [in UE4Editor-CoreUObject.dylib]
Unknown() Address = 0x106490917 (filename not found) [in UE4Editor-CoreUObject.dylib]
Unknown() Address = 0x105594d15 (filename not found) [in UE4Editor-Core.dylib]
Unknown() Address = 0x1058958af (filename not found) [in UE4Editor-Core.dylib]
Unknown() Address = 0x10c3e4ac2 (filename not found) [in UE4Editor-Projects.dylib]
Unknown() Address = 0x10c3fa4ad (filename not found) [in UE4Editor-Projects.dylib]
Unknown() Address = 0x10c3f9fab (filename not found) [in UE4Editor-Projects.dylib]
Unknown() Address = 0x1054473c1 (filename not found) [in UE4Editor]
Unknown() Address = 0x10542a885 (filename not found) [in UE4Editor]
Unknown() Address = 0x10543f15f (filename not found) [in UE4Editor]
Unknown() Address = 0x10544c880 (filename not found) [in UE4Editor]
Unknown() Address = 0x1056f4e67 (filename not found) [in UE4Editor-Core.dylib]
Unknown() Address = 0x7fff21332477 (filename not found) [in Foundation]
Unknown() Address = 0x7fff204b48fc (filename not found) [in libsystem_pthread.dylib]
Unknown() Address = 0x7fff204b0443 (filename not found) [in libsystem_pthread.dylib]

I merged 0.9.4 into my fork and built.

Haven't tested other than to drive the manual control a bit connected to the game running in PIE mode. I have no reason to believe that the freeze problem has gone away. (Speaking of which, I have tried running with a variety of different settings but have not found any that work. There are some GPU logs, but aren't especially informative to me.)

I should say that while it is very useful to be able to do development on my carla related code on my Macbook pro, it's GPU isn't powerful enough to make good use of CARLA. Unless someone figures out how to make use of external GPUs, I don't think that Mac will ever be a recommended platform for working with CARLA. If the network overhead is not too bad, it might be more generally useful to be able to remotely drive a CARLA simulation from a Mac, in which case it would make sense to support the client API.

@analog-cbarber
Copy link

Sorry, but I have not been working on CARLA or Unreal engine since when I wrote that, so I don't have any useful insight. You might have to spend some time understanding the cmake files.

It is also possible that if you are still trying to build an old version of CARLA on an old version of Unreal that there are things that may not work on the later Mac versions. I was able to just install the old Unreal engine directly and use that to save time, but it is possible you may have to build it from scratch.

@SevillaFe
Copy link

Hi,

are there any kind of Instructions to build CARLA on MAC? I have reading the thread but it's confusing. Do you have instructions or steeps to get CARLA on Mac?

Thank you for your previous work in this thread

@bisalgt
Copy link

bisalgt commented Aug 11, 2023

Hi @SevillaFe do you have any progress or update on using CARLA on mac ? If so kindly share. Thank you.

@psr-ai
Copy link

psr-ai commented Dec 23, 2023

Can someone share their running build for CARLA for Mac please? I have an M2 chip, but should be fine with any which is working on apple silicon.

@bisalgt
Copy link

bisalgt commented Dec 23, 2023

Hi @raiprabh , I was making it work with mac m1 but was not working properly for me. So at the end, I am now using a lenovo laptop with nvidia gpu for the task. It is not impossible but its really too much energy to waste configuring on mac i think.

@manishkc104
Copy link

Is their any solution for it ? Is their any proper documentation to install and run carla in mac os

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment