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

Sets -Wno-error=address-of-packed-member if available #11

Closed
wants to merge 3 commits into from

Conversation

shinnya
Copy link
Contributor

@shinnya shinnya commented Jul 7, 2019

This resolves #10. This PR doesn't become a solution to the root of the problem, so we should update openstack/liberasurecode to fix.

@shinnya shinnya force-pushed the fix-gcc9-build-error branch 3 times, most recently from 6787608 to cb3f0c7 Compare July 27, 2019 05:34

+# Check if a compiler supports "-Wno-error=address-of-packed-member"
+# If it supports the option, we add it to CFLAGS.
+AX_CHECK_COMPILE_FLAG([-Wno-error=address-of-packed-member],
Copy link
Contributor Author

@shinnya shinnya Jul 27, 2019

Choose a reason for hiding this comment

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

AX_CHECK_COMPILE_FLAG requires autoconf-archive package. See https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html.

AC_PROG_CC
AM_PROG_CC_C_O
+
+# Check if a compiler supports "-Wno-error=address-of-packed-member"
Copy link
Contributor Author

@shinnya shinnya Jul 27, 2019

Choose a reason for hiding this comment

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

This patch doesn't work on macOS as expected. For example, https://travis-ci.org/shinnya/liberasurecode/jobs/564306690 (removes all cache before this build).

@shinnya shinnya force-pushed the fix-gcc9-build-error branch from cb3f0c7 to c1cc1a2 Compare July 27, 2019 05:49
@shinnya shinnya changed the title Sets -Wno-error=address-of-packed-member built with GCC9 Sets -Wno-error=address-of-packed-member if available Jul 27, 2019
- autoconf
- autoconf-archive # for AX_CHECK_COMPILE_FLAG
- automake
- libtool
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems .travis.yml can't put these package declarations together, so repeats them multiple times.

- automake
- libtool
env:
- MATRIX_EVAL="CC=gcc-4.9 CXX=g++-4.9"
Copy link
Contributor

Choose a reason for hiding this comment

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

gcc 4.8 と gcc 4.9 は何か目的が異なるのでしょうか。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gcc 4.8 か 4.9 のどちらかが Scientific Linux 7.2 で使われているのではないかと思いますが、どちらか分からないため両方入れてました。
macOS も XCode のバージョンをどれをメインで使っているのか分からないので、色々入ってます。
あまりにもビルド時間がかかりすぎるので、絞った方がよい気はしています。

Copy link
Contributor

Choose a reason for hiding this comment

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

なるほど。
ちなみに Scientific Linux 7 および Cent OS 7 は gcc 4.8 です。

Copy link
Contributor

@yoffy yoffy left a comment

Choose a reason for hiding this comment

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

質問は書いてますが、内容的にはいいと思います。

@shinnya shinnya closed this Aug 2, 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

Successfully merging this pull request may close these issues.

Build failure caused by address-of-packed-member with GCC9
2 participants