-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add support for building on Mac OS X #2433
base: master
Are you sure you want to change the base?
Conversation
This uses a standard UE 4.19 download with one minor addition: copy the GenerateProjectFiles.sh script from a UnrealEngine source tree into the root 4.19 directory. Requires Xcode 9.2, which is the latest version that is compatiable with OSX 10.12.6 (Sierra). Was able to build everything using python2 API. You may need to define a ~/user-config.jam file to describe your Python installations to be able to build boost-python. Still need to figure out how to build more than one version of libboost-python.
Someone was able to make 9.4.1 work (see comment for issue carla-simulator#150), so I will assume anything with version 9.2 or later is ok.
You can run Setup.command with --no-xcode command to use the Linux build tools (Ninja and make).
Had been failing on test for Message exceeding max size.
This fixes the broken python tests, which were failing because the path to the egg was incorrect for the Mac.
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes. |
@@ -105,7 +105,7 @@ namespace adaptor { | |||
|
|||
private: | |||
|
|||
template <uint64_t I> | |||
template <unsigned long I> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Make this OS dependent?
@@ -22,8 +22,7 @@ namespace client { | |||
/// @todo Works as a list but its actually a map. We should assess the use | |||
/// cases and reconsider this implementation. | |||
class BlueprintLibrary | |||
: public EnableSharedFromThis<BlueprintLibrary>, | |||
private NonCopyable { | |||
: public EnableSharedFromThis<BlueprintLibrary> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this due to a complaint about the move constructor, can look more into it.
@@ -37,7 +37,7 @@ namespace std { | |||
|
|||
using argument_type = carla::road::element::Waypoint; | |||
|
|||
using result_type = uint64_t; | |||
using result_type = unsigned long; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gate based on OS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any problem using uint64_t
in Mac?
mono = default_font if default_font in fonts else fonts[0] | ||
mono = pygame.font.match_font(mono) | ||
self._font_mono = pygame.font.Font(mono, 14) | ||
if sys.platform == 'darwin': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be removed, pygame works fine on my Mac.
@@ -30,13 +30,13 @@ static void TestSequence(carla::ListView<Iterator> view) { | |||
TEST(listview, sequence) { | |||
int array[] = {0, 1, 2, 3, 4, 5}; | |||
TestSequence(MakeListView(array)); | |||
std::array<int, 6u> std_array = {0, 1, 2, 3, 4, 5}; | |||
std::array<int, 6u> std_array = {{0, 1, 2, 3, 4, 5}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be changed?
# How to build CARLA on Mac OSX | ||
|
||
Note that unlike the Linux build, this one uses the standard Mac compiler tools and | ||
the standard Unreal Engine 4.21 distribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Change to 4.22
Hi @geohot hope things are going well at comma. Thanks for taking care of this PR. We need to make sure that the existing CIs don't break. Also, if we want to take MacOS seriously, we need to put together new infrastructure for MacOS, so that this effort doesn't die with the next release. @marcgpuig I know you are busy, but could you please become the champion for this PR? Please, don't let it die. |
oh, is this thread dead? anybody still working on it? |
@wuxiaohua1011, This thread is just complicated, because we don't have a good way to put together a CI for MacOS with GPU support, making the automatic building and testing of a new build system for MacOS a big pain. @geohot made an effort to build support, but without a proper CI it will be very hard for the CARLA team to maintain it. Help is more than welcome. |
I have tried building Carla on Mac OS 10.15 Catalina with XCode 10 and ended up with a bunch of E.g., Tried compiling with the latest version of XCode (11.6) and it breaks in the very beginning. |
This is all the work of analog-cbarber, I just rebased it on master and submitted the pull request. Would close issue #150
It would be great to have OS X binaries. Should be possible to refactor this to duplicate the build scripts less as well.
What would it take to get this merged?
This change is