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

Fails to build liberasurecode when CC=gcc #7

Open
koba-e964 opened this issue Apr 18, 2019 · 1 comment
Open

Fails to build liberasurecode when CC=gcc #7

koba-e964 opened this issue Apr 18, 2019 · 1 comment
Assignees

Comments

@koba-e964
Copy link
Member

On MacOS, if gcc is installed, CC=gcc cargo build or simply cargo build fails with the error log like below:
https://gist.github.com/koba-e964/c9ff5ab39b0ef510d0a893af54f4c0a4

Probably this is because of adding an option -Wno-error=address-of-packed-member here, which is valid in clang but not in gcc.

if [ "$(uname)" == "Darwin" ]; then
CFLAGS="$CFLAGS -Wno-error=address-of-packed-member"
fi

Fixing this should be easy. Should I do this?

@yuezato
Copy link
Member

yuezato commented Apr 19, 2019

Thank you for your detailed report! Instead of you, I'm working on this problem.

I can reproduce this problem on my Mac 10.13.6 as follows:

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G5019

$ /usr/local/bin/gcc-8 --version # I installed gcc by `brew install gcc`
gcc-8 (Homebrew GCC 8.3.0) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ CC=/usr/local/bin/gcc-8 cargo build
   Compiling libc v0.2.51
   Compiling liberasurecode v1.0.2 (/Users/uezato/frugalos/liberasurecode)
error: failed to run custom build command for `liberasurecode v1.0.2 (/Users/uezato/frugalos/liberasurecode)`
process didn't exit successfully: `/Users/uezato/frugalos/liberasurecode/target/debug/build/liberasurecode-03e82565d13e637a/build-script-build` (exit code: 101)
...

$ grep "address-of-packed-member" ./target/debug/build/liberasurecode-8278567ad8c5b89e/out/build/liberasurecode/config.log
cc1: error: -Werror=address-of-packed-member: no option -Waddress-of-packed-member

@yuezato yuezato self-assigned this Apr 19, 2019
@yuezato yuezato mentioned this issue Apr 19, 2019
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