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

OSX: building calypso gives: error: unknown type name '_Unwind_Ptr' #76

Closed
timotheecour opened this issue Jan 16, 2018 · 4 comments
Closed

Comments

@timotheecour
Copy link
Collaborator

IIRC i didn't use to have this problem yesterday; It may be related to having run
xcode-select --install

In file included from /Users/timothee/git_clone/D/Calypso/build5/runtime/calypso-ldc-debug-cpp/calypso_cache.h:1:
/Users/timothee/git_clone/D/Calypso/runtime/calypso/cpp/eh/unwind-cxx.h:92:3: error: unknown type name '_Unwind_Ptr'
_Unwind_Ptr catchTemp;

@timotheecour timotheecour changed the title OSX: compiling calypso gives: error: unknown type name '_Unwind_Ptr' OSX: building calypso gives: error: unknown type name '_Unwind_Ptr' Jan 16, 2018
@Syniurge
Copy link
Owner

Until macOS support improves, in unwind.h it's defined as:

typedef uintptr_t _Unwind_Ptr;

@timotheecour
Copy link
Collaborator Author

timotheecour commented Jan 16, 2018

I saw that but there'll be a bunch of other errors besides that, that was just the 1st one.

the following WORKAROUND did the trick:

in Calypso/runtime/calypso/cpp/eh/unwind-cxx.h:
replace

#include "unwind.h"

with something like:

#include "/Users/timothee/temp/brew/Cellar/gcc/7.2.0/lib/gcc/7/gcc/x86_64-apple-darwin17.2.0/7.2.0/include/unwind.h"

a better workaround is needed but that should help others with this issue.

@timotheecour
Copy link
Collaborator Author

timotheecour commented Jan 16, 2018

here's a better fix:

update this as needed on your system

gcc_D=/Users/timothee/homebrew//Cellar/gcc/7.2.0/

ccmake -D LLVM_CONFIG=$homebrew_D/Cellar/llvm@3.9/3.9.1_1/bin/llvm-config -D D_FLAGS="-cpp-args=-I$gcc_D/include/c++/7.2.0;-cpp-args=-I$gcc_D/include/c++/7.2.0/x86_64-apple-darwin17.2.0;-cpp-args=-I$gcc_D/lib/gcc/7/gcc/x86_64-apple-darwin17.2.0/7.2.0/include" ..

that's the minimal set of flags that work for me on OSX

NOTE: this can be closed once build instructions for OSX are updated on readme.md

@timotheecour
Copy link
Collaborator Author

updated README in 9cb7187 so closing this

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

2 participants