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

compiler-rt fails to build on NetBSD #29977

Closed
gandro opened this issue Nov 21, 2015 · 4 comments
Closed

compiler-rt fails to build on NetBSD #29977

gandro opened this issue Nov 21, 2015 · 4 comments
Labels
O-netbsd Operating system: NetBSD

Comments

@gandro
Copy link
Contributor

gandro commented Nov 21, 2015

With the compiler-rt update in PR #29478, gcc_personality_v0.c now includes the unwind.h header to deduplicate some type definitions (commit: rust-lang/compiler-rt@5f0c79f) .

The unwind.h header available in NetBSD however does not provide all required definitions. Specifically, _Unwind_Action is absent in this header, leading to the following build failure:

.../rust/src/compiler-rt/lib/builtins/gcc_personality_v0.c:151:35: error: unknown type name '_Unwind_Action'
__gcc_personality_v0(int version, _Unwind_Action actions,
                                  ^

Side note: As far as I understand, NetBSD provides the above header only if the platform uses libgcc_eh (e.g. on amd64 using gcc, which is supported by Rust currently). Otherwise, LLVM's libunwind header is installed, which contains the required definitions.

I'm not sure how to fix this. Should Rust's compiler-rt duplicate the type definitions again?

@alexcrichton
Copy link
Member

Ah this may have just been missed out in the compiler-rt update, it should be fine to basically pull in whatever the same fix was previously again.

@steveklabnik steveklabnik added A-bsd O-netbsd Operating system: NetBSD labels Mar 11, 2016
@jakllsch
Copy link
Contributor

jakllsch commented Jul 1, 2016

The correct unwind.h is also available via the libunwind package from pkgsrc. But that may or may not be a good solution.

@jakllsch
Copy link
Contributor

Looked at this more. https://nxr.netbsd.org/xref/src/lib/libc/compiler_rt/Makefile.inc?r=1.30#29 and https://nxr.netbsd.org/xref/src/share/mk/bsd.own.mk?r=1.938#127 shows that gcc_personality_v0.c is only used on EABI ARM machines, which rustc for NetBSD does not currently target. I'll probably have a patch to address that just forces HAVE_UNWIND_H=OFF on NetBSD/non-ARM.

@alexcrichton
Copy link
Member

I believe this is no longer being built, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-netbsd Operating system: NetBSD
Projects
None yet
Development

No branches or pull requests

5 participants