Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 321469 - net-fs/samba-3.4.6: building with a hardened toolchain produces broken libsmbclient.so
Summary: net-fs/samba-3.4.6: building with a hardened toolchain produces broken libsmb...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 17:01 UTC by Zack Panitzke
Modified: 2010-10-28 15:26 UTC (History)
2 users (show)

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


Attachments
xbmc emerge log (build.log,1.91 MB, text/plain)
2010-05-25 17:04 UTC, Zack Panitzke
Details
emerge --info (emerge-info.txt,4.22 KB, text/plain)
2010-07-31 12:45 UTC, Michael Behrns-Miller
Details
emerge xbmc (emerge-xbmc.txt,1.89 MB, text/plain)
2010-07-31 14:49 UTC, Michael Behrns-Miller
Details
emerge --info (emerge.info,3.81 KB, text/plain)
2010-07-31 14:50 UTC, Zack Panitzke
Details
readelf -s /usr/lib/libsmbclient.so output (readelf-libsmbclient,88.37 KB, text/plain)
2010-07-31 14:53 UTC, Zack Panitzke
Details
readelf -s /usr/lib/libsmbclient.so (readelf-smbclient.txt,98.49 KB, text/plain)
2010-07-31 14:54 UTC, Michael Behrns-Miller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zack Panitzke 2010-05-25 17:01:13 UTC
Existing installations of media-tv/xbmc-9.11-r3 fail to launch after emerge of net-fs/samba-3.4.6 with the message:

/usr/share/xbmc/xbmc.bin: symbol lookup error: /usr/share/xbmc/xbmc.bin: undefined symbol: smbc_init

Remerging media-tv/xbmc-9.11-r3 and media-tv/xbmc-9.11-r4 fail, the latter with the attached log. Thus far I've tried remerging samba, confirming the correct use flags for samba (client and smbclient, unless there's something unexpected), remerging xbmc, confirming that the CIFS option is compiled into the kernel, and revdep-rebuilding, which found no broken packages.

Incidentally, I also tried masking >net-fs/samba-3.0.37, then backing down to that version, which solved the problem.

There are two things that should probably occur:
1. media-tv/xbmc-9.11-r4 (and -r3, too) should require a version of net-fs/samba less than 3.4.6.
2. Whatever the conflict is should be resolved. I haven't had time to check it out, but I imagine it will take me substantially more time to do so than someone who knows either or both of these packages well :).

I don't know of any workarounds for this.

Reproducible: Always

Steps to Reproduce:
1. update net-fs/samba to 3.4.6
2. emerge media-tv/xbmc-9.11-r4
3. emerge fails.
Comment 1 Zack Panitzke 2010-05-25 17:04:14 UTC
Created attachment 232897 [details]
xbmc emerge log
Comment 2 hal 2010-05-26 09:47:03 UTC
no problem over here using the svn version of xbmc. maybe an issue upstream?
Comment 3 SpanKY gentoo-dev 2010-07-31 06:30:27 UTC
run `readelf -s /usr/lib/libsmbclient.so` and post the output as an attachment
Comment 4 SpanKY gentoo-dev 2010-07-31 06:31:22 UTC
although most likely, your it's your hardened profile screwing things up.  you need to post `emerge --info` as well.
Comment 5 Michael Behrns-Miller 2010-07-31 12:45:35 UTC
Created attachment 240801 [details]
emerge --info
Comment 6 Michael Behrns-Miller 2010-07-31 12:47:10 UTC
(In reply to comment #5)
> Created an attachment (id=240801) [details]
> emerge --info
> 

I'm also getting this exact same error, without a hardened profile.  I removed mount-cifs recently to replace it with the newer samba, would that possibly be related?  I have the most recent stable samba now.  [3.4.6]

My [emerge xbmc] and [emerge --info] are attached. (or at least I'm trying to, sorry...)
Comment 7 Michael Behrns-Miller 2010-07-31 14:49:04 UTC
Created attachment 240817 [details]
emerge xbmc

Big fat huge emerge of xbmc.
Comment 8 Zack Panitzke 2010-07-31 14:50:36 UTC
Created attachment 240819 [details]
emerge --info

This is my emerge --info.
Comment 9 Zack Panitzke 2010-07-31 14:53:08 UTC
Created attachment 240821 [details]
readelf -s /usr/lib/libsmbclient.so output
Comment 10 Michael Behrns-Miller 2010-07-31 14:54:31 UTC
Created attachment 240823 [details]
readelf -s /usr/lib/libsmbclient.so
Comment 11 Zack Panitzke 2010-07-31 15:31:39 UTC
Incidentally, changing to the default profile (  [1]   default/linux/x86/10.0 *) did not help - the emerge still fails because of samba. I am about to try remerging samba with this profile. I'll post later or tomorrow about the success of this.
Comment 12 SpanKY gentoo-dev 2010-07-31 16:56:52 UTC
your libsmbclient.so is broken.  it lacks any smbc_* symbols.  look at the build log for examples of all the symbols it should have had.
Comment 13 Michael Behrns-Miller 2010-07-31 19:06:28 UTC
Thanks SpanKY.

Mine was built by emerge of samba 3.4.6.  Why would it be "broken" (and how to fix)?  Think it would help to re-emerge?

dune ~ # ls /usr/lib/libsmbclient.so*
lrwxrwxrwx 1 root root      17 May  8 23:43 /usr/lib/libsmbclient.so -> libsmbclient.so.0
-rwxr-xr-x 1 root root 4929720 May  8 23:42 /usr/lib/libsmbclient.so.0

dune ~ # genlop -l |grep samba
     Sun Nov  9 14:36:11 2008 >>> net-fs/samba-3.0.32
     Mon Nov 10 15:52:00 2008 >>> net-fs/samba-3.0.32
     Sat Nov 29 20:33:45 2008 >>> net-fs/samba-3.0.33
     Sun Aug 30 04:01:32 2009 >>> net-fs/samba-3.0.33
     Mon Sep 28 23:30:36 2009 >>> net-fs/samba-3.0.36
     Mon Nov 16 20:49:53 2009 >>> net-fs/samba-3.0.37
     Sat May  8 23:43:05 2010 >>> net-fs/samba-3.4.6
dune ~ # 
Comment 14 Zack Panitzke 2010-07-31 22:29:26 UTC
You appear to be correct. After rebuilding samba using the defaullt profile, xbmc compiles as expected. 
Comment 15 SpanKY gentoo-dev 2010-07-31 23:16:08 UTC
please post a full build log as an attachment with a hardened profile and with the default profile
Comment 16 Alain 2010-10-23 17:06:47 UTC
I guess this issue is related to the following:
http://forums.gentoo.org/viewtopic-t-829049-start-0.html

the smbc_* symbols are not exported for dynamic linking
one solution is to update gcc (to >=4.4.3), another one is a patch provided at the previous link

the patch solved the problem for me.
kind regards
Alain
Comment 17 Magnus Granberg gentoo-dev 2010-10-28 15:26:29 UTC
Reopen if it still fail with newer gcc-4.4.4-r2