evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
226 stars 95 forks source link

Segmentation fauls in build_libint on FreeBSD #101

Open yurivict opened 6 years ago

yurivict commented 6 years ago

I tried to update the libint FreeBSD port to 2.4.0 or 2.5.0-beta.1, but the program build_libint crashes:

cd src; /usr/ports/science/libint/work/libint-2.5.0-beta.1-6-g5df03e5/src/lib/libint/../../../src/bin/libint/build_libint
gmake[4]: *** [../../../src/lib/MakeRules:118: tmp/libint/libint2_params.h] Segmentation fault
evaleev commented 6 years ago

@yurivict please provide config.log ... if you could run the debugger and provide a backtrace that would be useful also. Thanks.

ndowens commented 6 years ago

Same here, Here is the whole build log of it. (https://pastebin.com/v0SqY92d)

yurivict commented 6 years ago

The crash occurs with gcc-7 and gcc-8. Here is how the stack looks in debugger:

Starting program: /usr/ports/science/libint2/work/libint-2.4.2/src/bin/libint/build_libint 

Program received signal SIGSEGV, Segmentation fault.
0x0000000801ffdd78 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
(gdb) bt
#0  0x0000000801ffdd78 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
#1  0x0000000801013fb6 in __dynamic_cast () from /usr/local/lib/gcc8/libstdc++.so.6
#2  0x00000008010936f0 in bool std::has_facet<std::ctype<char> >(std::locale const&) () from /usr/local/lib/gcc8/libstdc++.so.6
#3  0x00000008010869b4 in std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) () from /usr/local/lib/gcc8/libstdc++.so.6
#4  0x0000000801086e30 in std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) ()
   from /usr/local/lib/gcc8/libstdc++.so.6
#5  0x0000000801027a73 in std::ios_base::Init::Init() () from /usr/local/lib/gcc8/libstdc++.so.6
#6  0x0000000000410ca3 in _GLOBAL__sub_I__ZN7libint212GenerateCodeERKN5boost10shared_ptrINS_13DirectedGraphEEERKNS1_INS_11CodeContextEEERKNS1_INS_21CompilationParametersEEERKNS1_INS_8StrategyEEERKNS1_INS_6TacticEEERKNS1_INS_13MemoryManagerEEERSt5dequeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISW_EESZ_RKSW_S11_b ()
#7  0x00000008008e27ab in objlist_call_init (list=<optimized out>, lockstate=<optimized out>) at /usr/src/libexec/rtld-elf/rtld.c:2657
#8  0x00000008008e16ac in _rtld (sp=<optimized out>, exit_proc=0x7fffffffe770, objp=0x7fffffffe778) at /usr/src/libexec/rtld-elf/rtld.c:770
#9  0x00000008008df6f9 in .rtld_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#10 0x0000000000000000 in ?? ()

This looks like static constructor invocation sequence error. The sequence of static constructors is undefined, and shouldn't be relied on.