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

i686-unknown-cloudabi-cc: fatal error: 'stdio.h' file not found #20

Closed
mcandre opened this issue Dec 24, 2018 · 3 comments
Closed

i686-unknown-cloudabi-cc: fatal error: 'stdio.h' file not found #20

mcandre opened this issue Dec 24, 2018 · 3 comments

Comments

@mcandre
Copy link

mcandre commented Dec 24, 2018

Hello, I am trying to figure out if I can build 32-bit binaries with the CloudABI toolchain on macOS. I can build and run 64-bit binaries with x86_64-unknown-cloudabi-cc, but when I use the i686 variant, I get an error about a missing header file, stdio.h. I get the same behavior in Docker as well.

Do I need to install some additional LLVM components, or pass some new flags to the compiler, to get this to work?

Same error for the aarch64 and armv6 eabihf compilers.

@EdSchouten
Copy link
Member

Hi there,

To build i686 binaries, make sure to install i686-unknown-cloudabi-cxx-runtime. It's likely the case you only have the x86_64-* flavour installed. Do note that due to lack of decent support for position independent code on 32-bit x86, support for running these executables is more limited (e.g., cloudabi-run -e doesn't support them).

@mcandre
Copy link
Author

mcandre commented Dec 26, 2018

@EdSchouten Thank you for explaining this! So i686 CloudABI binaries would require the runtime kernel to be patched? Does that mean i686 CloudABI binaries are unable to run on macOS?

@EdSchouten
Copy link
Member

EdSchouten commented Dec 26, 2018

Exactly. i686 CloudABI binaries can't run on macOS. They can currently only be run on FreeBSD (both FreeBSD/i386 and FreeBSD/amd64).

FreeBSD's CloudABI support is integrated into the kernel, so we can give those processes a dedicated virtual address space.

Edit: Marking this as closed, as the original question as answered. Feel free to reopen if needed.

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