octomagon / davegrohl

A Password Cracker for macOS
http://www.davegrohl.org
GNU General Public License v2.0
235 stars 39 forks source link

gcc++ error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification #24

Closed roycewilliams closed 7 years ago

roycewilliams commented 7 years ago

Potential cause may be here, which suggests one of:

clang++ -std=c++11 foo.cpp
clang++ -std=c++11 -stdlib=libstdc++ foo.cpp

Steps to reproduce:

$ uname -m
x86_64

$ grep DESCR /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"

$ make
clang++ -std=c++14 -stdlib=libc++ -I include -I mbedtls/include -c -o build/etc_shadow.o src/etc_shadow.cpp
In file included from src/etc_shadow.cpp:1:
In file included from include/etc_shadow.h:5:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/ios:216:
In file included from /usr/include/c++/v1/__locale:15:
/usr/include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception
      specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)'
basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
                                           ^
/usr/include/c++/v1/string:1326:40: note: previous declaration is here
    _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
                                       ^
1 error generated.
makefile:36: recipe for target 'build/etc_shadow.o' failed
make: *** [build/etc_shadow.o] Error 1
octomagon commented 7 years ago

-stdlib=libstdc++ seems to fix that issue. I've updated the Vagrantfile to use the newest version hotness and I've also fixed the compile errors that followed after fixing the libstdc++ thing.

This hotfix has been merged into master. Let me know if you see any compile issues, otherwise I'll close this later.