On PaX-enabled systems (hardened-sources), all Javascript-related functions (views, for example) in CouchDB don't work if you don't disable MPROTECT for /usr/bin/couchjs. Could you please add a 'pax-mark m "${D}/usr/bin/couchjs" to the ebuild (provided by pax-utils.eclass)?
Sorry for the extra mail, category change has reset "assigned to". :(
The PaX feature RANDMMAP also has to be disabled, otherwise couchjs will get stuck in an infinite loop inside libmozjs. So it's 'pax-mark mr "${D}/usr/bin/couchjs"' what you have to add to the ebuild.
Does that need to be guarded by a use hardened condition or something similar? I don't have much experience with hardened systems, so an actual patch would be welcome.
Created attachment 340680 [details, diff] Patch for dev-db/couchdb-1.2.1.ebuild
Aww, my comment somehow didn't get through, so here it is again: No, pax-mark can be called unconditionally. In this particular case, it has to be called from src_compile, otherwise the tests won't pass.
The patch looks okay for mee.
Committed couchdb-1.3.0 with this fix.