Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2766

[C++] Compilation failure size_t

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.2
    • Fix Version/s: 1.10.0
    • Component/s: build, c++
    • Labels:
      None

      Description

      With the following system:

      $ uname -a
      Linux edf2927682ca 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
      $ gcc --version
      gcc (GCC) 10.0.1 20200220 (experimental)

       

      I received the compilation error:

      g++  -DAVRO_SOURCE -I/home/docker/development/opensource-pack-builder/components/avro/BUILD/avro-src-1.9.2/lang/c++/api -I/home/docker/development/opensource-pack-builder/components/avro/BUILD/avro-src-1.9.2/lang/c++/build -I/home/docker/development/opensource-pack-builder/components/avro/DEPS/osp/Boost/latest/osp/include  -DNDEBUG -O3 -std=gnu++2a -fno-working-directory -ggdb3 -flto -ffat-lto-objects -fuse-linker-plugin -Wall -O3 -DNDEBUG   -std=c++11 -fPIC -o CMakeFiles/avrocpp_s.dir/impl/Zigzag.cc.o -c /home/docker/development/opensource-pack-builder/components/avro/BUILD/avro-src-1.9.2/lang/c++/impl/Zigzag.cc
      
      In file included from /home/docker/development/opensource-pack-builder/components/avro/BUILD/avro-src-1.9.2/lang/c++/impl/Zigzag.cc:20:
      /home/docker/development/opensource-pack-builder/components/avro/BUILD/avro-src-1.9.2/lang/c++/api/Zigzag.hh:37:11: error: 'size_t' does not name a type
       37 | AVRO_DECL size_t encodeInt32(int32_t input, std::array<uint8_t, 5> &output);
       | ^~~~~~
      /home/docker/development/opensource-pack-builder/components/avro/BUILD/avro-src-1.9.2/lang/c++/api/Zigzag.hh:26:1: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
       25 | #include "Config.hh"
       +++ |+#include <cstddef>
       26 | /// \file
      /home/docker/development/opensource-pack-builder/components/avro/BUILD/avro-src-1.9.2/lang/c++/api/Zigzag.hh:38:11: error: 'size_t' does not name a type
       38 | AVRO_DECL size_t encodeInt64(int64_t input, std::array<uint8_t, 10> &output);
       | ^~~~~~
      /home/docker/development/opensource-pack-builder/components/avro/BUILD/avro-src-1.9.2/lang/c++/api/Zigzag.hh:38:11: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?

      Regards,

      Laurent

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stac47 Laurent Stacul
                Reporter:
                stac47 Laurent Stacul
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: