Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 393071 - net-fs/openafs-1.6.0 should export ka_GetAFSTicket symbol in the shared libafsauthent library as well
Summary: net-fs/openafs-1.6.0 should export ka_GetAFSTicket symbol in the shared libaf...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrej Filipcic
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 374709
  Show dependency tree
 
Reported: 2011-12-04 00:13 UTC by Andrew Savchenko
Modified: 2012-01-24 09:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
openafs-1.6.0-afsauthent-symbols.patch (openafs-1.6.0-afsauthent-symbols.patch,287 bytes, patch)
2011-12-04 00:18 UTC, Andrew Savchenko
Details | Diff
emerge --info (emerge.info,7.02 KB, text/plain)
2011-12-04 00:22 UTC, Andrew Savchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
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...