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

Bug 393071

Summary: net-fs/openafs-1.6.0 should export ka_GetAFSTicket symbol in the shared libafsauthent library as well
Product: Gentoo Linux Reporter: Andrew Savchenko <bircoph>
Component: [OLD] LibraryAssignee: Andrej Filipcic <andrej.filipcic>
Status: RESOLVED FIXED    
Severity: normal CC: bircoph, net-fs
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 374709    
Attachments: openafs-1.6.0-afsauthent-symbols.patch
emerge --info

Description Andrew Savchenko gentoo-dev 2011-12-04 00:13:24 UTC
Hello,

net-fs/openafs-1.6.0 handles self shared libs in a tricky way: some symbols are removed compared to static versions of the same libs, because they may be not a thread safe. But the very same functions are available in static versions of the libraries, thus forcing application to use static libraries instead of shared. This in turn leads to errors due to relocation issues: afs compiles static libs without -fPIC.

One of such forcefully hidden symbols is ka_GetAFSTicket, required for sci-physics/root[afs] to build (it fails to build with static version due to relocation issue). This function is used by net/auth/src/TAFS.cxx in the ROOT distribution.

Proposed patch add this symbol to the export table.
Comment 1 Andrew Savchenko gentoo-dev 2011-12-04 00:18:31 UTC
Created attachment 294657 [details, diff]
openafs-1.6.0-afsauthent-symbols.patch

Add ka_GetAFSTicket symbol to the libafsauthent.so library (it is already present in the libafsauthent.a).

Without this patch:
$ nm -C /usr/lib/libafsauthent.a | grep ka_GetAFSTicket
00000000 T ka_GetAFSTicket
$ nm -D /usr/lib/libafsauthent.so | grep ka_GetAFSTicket
$

After applying the patch:
$ nm -C /usr/lib/libafsauthent.a | grep ka_GetAFSTicket
00000000 T ka_GetAFSTicket
$ nm -D /usr/lib/libafsauthent.so | grep ka_GetAFSTicket
00016720 T ka_GetAFSTicket

And sci-physics/root-5.32.00[afs] build well.
See bug 374709 for additional details.
Comment 2 Andrew Savchenko gentoo-dev 2011-12-04 00:22:10 UTC
Created attachment 294659 [details]
emerge --info

It is not really needed here, but in order to avoid pointless complains...
Comment 3 Andrew Savchenko gentoo-dev 2011-12-04 00:27:14 UTC
And this is an error by ROOT's build without this patch:

g++ -shared -Wl,-soname,libAFSAuth.so.5.32 -m64 -march=core2 -m64 --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=
3072 -O2 -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize -ftree-loop-linear -ftree-loop-im -fweb -frename-register
s -fomit-frame-pointer -fexcess-precision=fast -pipe -march=core2 -O3 -fno-inline-functions -fno-ipa-cp-clone -pipe -Wl,-O1 -Wl,--as-needed -Wl
,--no-undefined -o lib/libAFSAuth.so.5.32 net/auth/src/AFSAuth.o net/auth/src/TAFS.o net/auth/src/G__AFSAuth.o /usr/lib64/libafsauthent.a /usr/
lib64/libafsrpc.a -lresolv -Llib -lCore -lCint -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libafsauthent.a(client.o): relocation R_X86_64_32 aga
inst `grmutex' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/libafsauthent.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [lib/libAFSAuth.so] Error 1
Comment 4 Andrew Savchenko gentoo-dev 2012-01-24 09:04:39 UTC
Looks like this patch is included in openafs gentoo patches as 015_all_afsauthent-symbols.patch. Thanks! Closing this bug then...