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

ARM builds: FTBFS on armhf - error: cast from 'const char*' to 'const #118

Closed
OdyX opened this issue Mar 4, 2018 · 4 comments
Closed

ARM builds: FTBFS on armhf - error: cast from 'const char*' to 'const #118

OdyX opened this issue Mar 4, 2018 · 4 comments

Comments

@OdyX
Copy link

OdyX commented Mar 4, 2018

Description

Debian's reproducibility test builds indicate that the armhf build FTBFS:

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/armhf/doctest.html

/build/1st/doctest-1.2.7+repack0/examples/exe_with_static_libs/../../doctest/doctest.h:1885:74: error: cast from 'const char*' to 'const doctest::detail::ContextBuilder::ICapture*' increases required alignment of target type [-Werror=cast-align]
                 reinterpret_cast<const ICapture*>(stackChunks[curr++].buf)->toStream(stream);
                                                                          ^
In file included from /build/1st/doctest-1.2.7+repack0/examples/exe_with_static_libs/lib_2_src.cpp:1:0:
/build/1st/doctest-1.2.7+repack0/examples/exe_with_static_libs/../../doctest/doctest.h: In member function 'void doctest::detail::ContextBuilder::build(std::ostream*) const':
/build/1st/doctest-1.2.7+repack0/examples/exe_with_static_libs/../../doctest/doctest.h:1885:74: error: cast from 'const char*' to 'const doctest::detail::ContextBuilder::ICapture*' increases required alignment of target type [-Werror=cast-align]
                 reinterpret_cast<const ICapture*>(stackChunks[curr++].buf)->toStream(stream);
                                                                          ^
/build/1st/doctest-1.2.7+repack0/examples/exe_with_static_libs/../../doctest/doctest.h:1889:71: error: cast from 'char*' to 'const doctest::detail::ContextBuilder::ICapture*' increases required alignment of target type [-Werror=cast-align]
                 reinterpret_cast<const ICapture*>(curr_elem->chunk.buf)->toStream(stream);
                                                                       ^
/build/1st/doctest-1.2.7+repack0/examples/exe_with_static_libs/../../doctest/doctest.h:1889:71: error: cast from 'char*' to 'const doctest::detail::ContextBuilder::ICapture*' increases required alignment of target type [-Werror=cast-align]
                 reinterpret_cast<const ICapture*>(curr_elem->chunk.buf)->toStream(stream);
  • doctest version: v1.2.7
  • Operating System: Debian sid
  • Compiler+version: GNU 7.3.0
@onqtam
Copy link
Member

onqtam commented Mar 5, 2018

I'll either suppress -Wcast-align or add the appropriate attribute to the char buffer. Will do in a few days though - when I get back home.

onqtam added a commit that referenced this issue Mar 10, 2018
@onqtam
Copy link
Member

onqtam commented Mar 10, 2018

should be fixed in version 1.2.8

@onqtam onqtam closed this as completed Mar 10, 2018
@OdyX
Copy link
Author

OdyX commented Mar 12, 2018

Thanks for your proposed fix, but it seems it wasn't sufficient, see: https://tests.reproducible-builds.org/debian/rbuild/unstable/armhf/doctest_1.2.8+repack0-1.rbuild.log

@onqtam onqtam reopened this Mar 12, 2018
onqtam added a commit that referenced this issue Apr 30, 2018
… is already annotated to have the proper alignment - this is probably a misdiagnostic by the compiler and should be safe to silence
@onqtam
Copy link
Member

onqtam commented Apr 30, 2018

silencing the problematic warning. the char buffer is already annotated to have the proper alignment - this is probably a misdiagnostic by the compiler and should be safe to silence

try it out from the dev branch and let me know if it works! And sorry for the delay

onqtam added a commit that referenced this issue May 7, 2018
onqtam added a commit that referenced this issue May 10, 2018
… is already annotated to have the proper alignment - this is probably a misdiagnostic by the compiler and should be safe to silence
onqtam added a commit that referenced this issue May 10, 2018
@onqtam onqtam closed this as completed May 10, 2018
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