if you register a die hook in a phase which later triggers an implicit die (e.g. by `emake` failing), then that die hook does not get run properly. it has to be set at least one phase earlier. e.g. if you have: test_hook() { eerror "fooo"; } and you register it in src_compile: src_compile() { EBUILD_DEATH_HOOKS+=" test_hook" emake aslkdjfalksjdf } then that hook will not fire. however, if you move the registration to src_configure, it'll fire fine. guessing it's because the later die hook phase is run with the env as it existed before src_compile was executed instead of the env at the time of death.