https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86469
--- Comment #11 from Jonny Grant <jg at jguk dot org> --- Hi Richard I have a smaller test case which. It shows only part of the error. "Dwarf Error: Invalid abstract instance DIE ref" Richard, would this be useful? g++-8 -std=c++11 -g -ggdb -pthread -O0 -Wnonnull -fstack-protector-strong -Wdiv-by-zero -Wsign-conversion -Wnull-dereference -flto -Wno-nonnull-compare -o proc whois_if.cpp test_whois.cpp stdio_cx.c cpputil.cpp /usr/bin/x86_64-linux-gnu-ld: Dwarf Error: Invalid abstract instance DIE ref. /tmp/cctwveUb.ltrans0.ltrans.o: In function `test_whois(bool)': <artificial>:(.text+0xae6): undefined reference to `get_err_whois(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' /tmp/cctwveUb.ltrans0.ltrans.o: In function `strerrno[abi:cxx11](int)': <artificial>:(.text+0x2c2a): undefined reference to `strerrno_s(char*, unsigned long, int)' collect2: error: ld returned 1 exit status makefile:3: recipe for target 'all' failed make: *** [all] Error 1