Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 441834

Summary: dev-libs/jemalloc cannot be used with LD_PRELOAD because of --with-jemalloc-prefix=j
Product: Gentoo Linux Reporter: octoploid <octoploid>
Component: [OLD] LibraryAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: enhancement CC: betelgeuse, kfm, uwelk
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 444796    

Description octoploid 2012-11-05 08:25:25 UTC
The jemalloc ebuild configures jemalloc with:
 --with-jemalloc-prefix=j

This makes it impossible to use LD_PRELOAD=/usr/lib/libjemalloc.so.1
on existing applications (as a glibc malloc replacement).

Please add an option to IUSE.

Reproducible: Always
Comment 1 Jory A. Pratt gentoo-dev 2012-11-25 12:48:02 UTC
Thanks for reporting jemalloc-3.2.0 is in tree with modificiations.
Comment 2 Johan Bergström 2012-11-26 22:01:08 UTC
This broke ebuilds that rely on building against a prefixed jemalloc (for instance, dev-db/redis). USE=prefix or the other way around? Going from prefixed to non-prefixe is a pretty major step for a library since it will break stuff relying on it.
Comment 3 kfm 2012-11-27 00:04:56 UTC
Here are some other potentially affected packages:

app-office/libreoffice
dev-db/mariadb
dev-db/mysql
net-fs/cvmfs

The trouble with having a USE flag is that affected packages would need to block in situations where the user has enabled the jemalloc flag but also chosen not to use a prefix.

In Linux, the jemalloc build system doesn't define a prefix by default. I think it would be simpler if all of these packages didn't build in such a way that they required a prefix. I wonder if that approach is feasible though?
Comment 4 Johan Bergström 2012-11-29 22:33:40 UTC
I'm going to re-open this issue since we're introducing gentoo tree breakage here.

I've been involved in dev-db/{mysql,mariadb} and dev-db/redis ebuilds, and I wouldn't have a big problem moving to this general approach. I just want others to chip in before hand.
Comment 5 Johan Bergström 2012-12-01 02:21:28 UTC
I've now updated redis ebuilds in bug 444796 and bug 439354.
Comment 6 Johan Bergström 2013-01-03 03:14:24 UTC
No more breakage as far as I can see. Closing (and sorry for somewhat abusing this ticket).
Comment 7 kfm 2013-01-03 11:18:14 UTC
Thanks, Johan. Good job.