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

Test suite does not compile on Mac with clang #1

Closed
mjdemilliano opened this issue Jun 10, 2020 · 2 comments
Closed

Test suite does not compile on Mac with clang #1

mjdemilliano opened this issue Jun 10, 2020 · 2 comments

Comments

@mjdemilliano
Copy link

The test suite does not compile on Mac 10.14.6 with clang.

Steps to reproduce:

git clone --recursive https://github.com/Embedded-AMS/EmbeddedProto
cd EmbeddedProto
python3.7 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
./build_test.sh

Enviroment:

  • Mac OSX 10.14.6
  • Shell: zsh or bash
  • Compiler:
$ c++ -v
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

First errors (there are many more):

[ 86%] Building CXX object CMakeFiles/test_EmbeddedProto.dir/test/test_string_bytes.o
[ 91%] Building CXX object CMakeFiles/test_EmbeddedProto.dir/test/test_oneof_fields.o
In file included from /var/folders/vd/wr3sq1gn4vl6z129hcs5_kz00000gn/T/tmp.p8ASoSEH/EmbeddedProto/src/Fields.cpp:31:
In file included from /var/folders/vd/wr3sq1gn4vl6z129hcs5_kz00000gn/T/tmp.p8ASoSEH/EmbeddedProto/src/Fields.h:35:
/var/folders/vd/wr3sq1gn4vl6z129hcs5_kz00000gn/T/tmp.p8ASoSEH/EmbeddedProto/src/WireFormatter.h:259:19: error: function 'ZigZagDecode<unsigned long long>' with deduced return type cannot be used before it
      is defined
          value = ZigZagDecode(uint_value);
                  ^
/var/folders/vd/wr3sq1gn4vl6z129hcs5_kz00000gn/T/tmp.p8ASoSEH/EmbeddedProto/src/WireFormatter.h:482:29: note: 'ZigZagDecode<unsigned long long>' declared here
      static constexpr auto ZigZagDecode(const UINT_TYPE n) 
                            ^
/var/folders/vd/wr3sq1gn4vl6z129hcs5_kz00000gn/T/tmp.p8ASoSEH/EmbeddedProto/src/WireFormatter.h:416:75: error: no member named 'ceil' in namespace 'std'; did you mean simply 'ceil'?
        static constexpr uint8_t N_BYTES_IN_VARINT = static_cast<uint8_t>(std::ceil(
                                                                          ^~~~~~~~~
                                                                          ceil
/Library/Developer/CommandLineTools/usr/include/c++/v1/math.h:841:1: note: 'ceil' declared here
ceil(_A1 __lcpp_x) _NOEXCEPT {return ::ceil((double)__lcpp_x);}
^

Full log attached.
EmbeddedProto-mac-compilation-error-log.txt

@BartHertog
Copy link
Contributor

Hi mjdemilliano,

Thank you for reporting this. We will address the problem.

@BartHertog
Copy link
Contributor

The issues you mentioned could be reproduced suing clang-9 and clang++-9. Those have been resolved and merged into develop.

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