randombit / botan

Cryptography Toolkit
https://botan.randombit.net
BSD 2-Clause "Simplified" License
2.48k stars 553 forks source link

Build error from ec_point.h #3524

Closed falko-strenzke closed 1 year ago

falko-strenzke commented 1 year ago

I receive the following build error with g++ (Debian 10.2.1-6) 10.2.1 20210110 on the main branch

In file included from build/include/botan/ec_group.h:13,
                 from build/include/botan/ecc_key.h:13,
                 from src/lib/ffi/ffi_pkey_algs.cpp:23:
build/include/botan/ec_point.h:36:13: error: expected nested-name-specifier before ‘enum’
   36 |       using enum EC_Point_Format;
      |             ^~~~

This is the patch that fixes it:

diff --git a/src/lib/pubkey/ec_group/ec_point.h b/src/lib/pubkey/ec_group/ec_point.h
index 7033cb20a..e51da9832 100644
--- a/src/lib/pubkey/ec_group/ec_point.h
+++ b/src/lib/pubkey/ec_group/ec_point.h
@@ -33,7 +33,6 @@ class BOTAN_PUBLIC_API(2,0) EC_Point final
    {
    public:
       typedef EC_Point_Format Compression_Type;
-      using enum EC_Point_Format;

       enum { WORKSPACE_SIZE = 8 };
reneme commented 1 year ago

You're using GCC 10. Botan 3.0 requires at least GCC 11: https://github.com/randombit/botan/blob/master/doc/support.rst#supported-platforms

falko-strenzke commented 1 year ago

Thanks, I expected that.