Skip to content

Conversation

@RyanJarv
Copy link
Contributor

@RyanJarv RyanJarv commented Oct 27, 2020

If you follow the directions here on Mac OS you get the following error:

= note: clang: warning: argument unused during compilation: '-static-pie' [-Wunused-command-line-argument]
          ld: unknown option: --as-needed
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Following the steps here resolved the issue for me, which was basically just installing and using the linker from filosottile/musl-cross/musl-cross.

Issue #, if available:

Description of changes:

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

If you follow the directions here on Mac OS you get the following error:

```
= note: clang: warning: argument unused during compilation: '-static-pie' [-Wunused-command-line-argument]
          ld: unknown option: --as-needed
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

Following the steps [here](https://aws.amazon.com/blogs/opensource/rust-runtime-for-aws-lambda/) resolved the issue for me, which was basically just installing and using the linker from filosottile/musl-cross/musl-cross.
README.md Outdated
```


* **Note:** If you are running on Mac OS you'll need to install the linker for the target platform. You do this using the `musl-cross` tap from [Homebrew](https://brew.sh/) which provides a complete cross-compilation toolchain for Mac OS. Once `musl-cross` is installed we will also need to inform cargo of the newely installed linker when building for the `x86_64-unknown-linux-musl` platform.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: newely => newly

README.md Outdated
Comment on lines 70 to 72
$ brew install filosottile/musl-cross/musl-cross
$ mkdir .cargo
$ echo $'[target.x86_64-unknown-linux-musl]\nlinker = "x86_64-linux-musl-gcc"' > .cargo/config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency can we remove the additional whitespace in front of each command?

@coltonweaver
Copy link
Contributor

Perhaps linking to https://aws.amazon.com/blogs/opensource/rust-runtime-for-aws-lambda/ would be helpful as well, as it has even more information.

@coltonweaver
Copy link
Contributor

I decided to address the nit comments to unblock this, and I've decided that adding that link isn't worthwhile.

@coltonweaver coltonweaver merged commit feab8b7 into awslabs:master Jan 29, 2021
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

Successfully merging this pull request may close these issues.

2 participants