id summary reporter owner description type status milestone component version severity resolution keywords cc 6903 Including program options header breaks using g++ -static -flto -std=c++11 boostBugs@… Vladimir Prus "A minimal example is simply {{{ #include ""boost/program_options.hpp"" int main ( int argC, char* argV[] ) { return 0; } }}} Compiling this using either[[BR]] g++ main.cpp -static -flto -std=c++11 -fwhole-program[[BR]] or[[BR]] g++ main.cpp -static -flto -std=c++11 -fno-use-linker-plugin[[BR]] gives a lot of errors: `_ZTIN9__gnu_cxx24__concurrence_lock_errorE' referenced in section `.text._ZN9__gnu_cxx30__throw_concurrence_lock_errorEv[_ZN9__gnu_cxx30__throw_concurrence_lock_errorEv]' of /usr/lib/gcc/x86_64-linux-gnu/4.7/libstdc++.a(eh_alloc.o): defined in discarded section `.gnu.linkonce.t._ZTIN9__gnu_cxx24__concurrence_lock_errorE' of /tmp/ccEoPVoT.o (symbol from plugin)[[BR]] ...[[BR]] collect2: error: ld returned 1 exit status I tried g++4.6 and 4.7. I am not sure if it is a bug within the g++ or within boost. If either -static, -flto or -std=c++11 is omited the program compiles fine. Only if all three are present the error occours. I am using Debian Wheezy. " Bugs new To Be Determined program_options Boost 1.49.0 Problem g++ lto