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 on MAC with M1-chip #125

Open
ThorvaldAagaard opened this issue Aug 27, 2023 · 8 comments
Open

Building on MAC with M1-chip #125

ThorvaldAagaard opened this issue Aug 27, 2023 · 8 comments

Comments

@ThorvaldAagaard
Copy link

When executing

brew reinstall gcc --without-multilib

I got this response: Error: invalid option: --without-multilib

 gcc -v
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix

Well this is probably only a performance problem

I went on and copied the makefile for Mac clang, and now hit the next problem as sprint is deprecated.

After replacing sprint with snprintf (second parameter is now a length of first parameter) the compile error went away, and I hit the next problem.

In file included from System.cpp:19:
./parallel.h:21:12: fatal error: 'boost/thread.hpp' file not found
  #include <boost/thread.hpp>
           ^~~~~~~~~~~~~~~~~~

Anyone got a compiled version for the M1-processor?

@ZiggerZZ
Copy link

Check #126

@timanderson
Copy link

I just used Xcode

@ThorvaldAagaard
Copy link
Author

I just used Xcode

How?
I have solved the problem following ZiggerZZ, but interested in using Xcode if there comes an update

@timanderson
Copy link

timanderson commented Mar 16, 2024

This is what I did as I recall:

Run Xcode, choose Library template, give it a name dds, Framework None, Type Dynamic, click Create.
Click Add files, check copy files if needed, add the include and src directories from the dds source, leave Add to targets checked. Remove the makefiles.
Build then worked, even without fixing up sprintf

@ThorvaldAagaard
Copy link
Author

Thx, I will try that, I assume Xcode 15?

@timanderson
Copy link

Yes Xcode 15.2 currently. Need to look at the multi-threading.

@timanderson
Copy link

I found that defining the DDS_THREADS_GCD preprocessor macro is enough to get threading working

@fanyf22
Copy link

fanyf22 commented Jun 3, 2024

I used brew install boost, and replaced the CC_BOOST location in Makefiles/Makefile_Mac_clang_shared with the installed path. In addition, I remove the warning flags.
Everything worked after I did these steps. Hope it can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants