I was cross-compiling an Autotools project using a tool called BuildRoot
when I received the following error:

 

aes-bench.cpp: In function 'int main(int, char**)':

aes-bench.cpp:346:14: error: deleting object of abstract class type
'CryptoLibrary' which has non-virtual destructor will cause undefined
behaviour [-Werror=delete-non-virtual-dtor]

 

I thought I might fix the issue by creating a pure virtual deconstructor for
my interface:

 

--- a/include/crypto-library.hpp

+++ b/include/crypto-library.hpp

@@ -90,6 +90,8 @@ class CryptoLibrary

          return BLOCK_SIZE_BYTES + length - remainder;

       };

+      virtual ~CryptoLibrary() = 0;

+

       virtual std::string libraryName() = 0;

       virtual bool modeSupported( CryptoLibrary::Mode mode ) = 0;

 

When I recompiled, I received an error related to ld:

 

/home/user/dir/dir/br_extern/output/dir/host/opt/ext-toolchain/bin/../lib/gc
c/i686-pc-linux-gnu/4.7.2/../../../../i686-pc-linux-gnu/bin/ld: BFD
(Sourcery CodeBench Lite 2012.09-62) 2.23.51.20120829 internal error,
aborting at
/scratch/jseymour/fall_releases/i686-pc-linux-gnu/obj/binutils-src-2012.09-6
2-i686-pc-linux-gnu-i386-linux/bfd/merge.c line 873 in
_bfd_merged_section_offset

 

/home/user/dir/dir/br_extern/output/dir/host/opt/ext-toolchain/bin/../lib/gc
c/i686-pc-linux-gnu/4.7.2/../../../../i686-pc-linux-gnu/bin/ld: Please
report this bug.

 

 

This is my first time reporting a bug to GNU.

If you need more information, I'll be happy to provide it, but I might need
some instruction.

 

Sincerely,

 

Ryan Lagasse

(978) 369-8848 Ext. 114

laga...@assurtech.com

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to