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

Bug 152828

Summary: ldconfig with ROOT across archs breaks cache
Product: Portage Development Reporter: James Le Cuirot <chewi>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: 2.1   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=532100
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 181949, 187293    
Attachments: run \${CHOST}-ldconfig when \${CBUILD} != \${CHOST}

Description James Le Cuirot gentoo-dev 2006-10-25 17:16:50 UTC
I'm using ROOT and PORTAGE_CONFIGROOT with a PPC system mounted on a PC over NFS. Everytime Portage runs ldconfig, it breaks the PPC's ld.so.cache. To cut a long story short, it seems that ld.so.cache differs between architectures. You probably knew that already! Can we add a check to stop ldconfig from running if CHOST != CBUILD and ROOT != / ? It would also indirectly fix another problem with my cross compile scripts. (-:
Comment 1 SpanKY gentoo-dev 2006-10-25 17:34:42 UTC
it isnt really architecture dependent ... it does have endian issues though which is probably what you're seeing (i imagine your host is little endian x86/amd64 while the target is big endian ppc)
Comment 2 James Le Cuirot gentoo-dev 2006-10-25 17:55:30 UTC
Yeah I thought it might be that. I can't think of any simple way to check the endianness of both / and ROOT though. Hmmm...
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2007-06-06 23:22:29 UTC
Mike, Ned: any suggestion how to fix this?
Comment 4 James Le Cuirot gentoo-dev 2007-06-06 23:39:55 UTC
I have retired that PPC machine now but I still have my big endian m68k Amiga 1200 sitting right here. (-; A solution would be appreciated.
Comment 5 SpanKY gentoo-dev 2007-06-07 16:24:31 UTC
we should test the env to see if it's a cross-compiler ...

LDCONFIG="ldconfig"
if [[ ${CBUILD} != ${CHOST} ]] ; then
    LDCONFIG="${CHOST}-ldconfig"
fi
if type -P ${LDCONFIG} > /dev/null ; then
    <actually run ldconfig>
fi
Comment 6 Zac Medico gentoo-dev 2007-06-09 00:21:45 UTC
Created attachment 121536 [details, diff]
run \${CHOST}-ldconfig when \${CBUILD} != \${CHOST}

This should do it.
Comment 7 Zac Medico gentoo-dev 2007-06-09 05:28:02 UTC
This has been released in 2.1.2.10.