Project

General

Profile

Bug #415

pkg:/service/network/samba@3.5.4-0.147 broken

Added by Predrag Zečević almost 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
OI-Userland
Target version:
Start date:
2010-11-15
Due date:
2011-09-14
% Done:

100%

Estimated time:
40.00 h
Difficulty:
Medium
Tags:
needs-triage

Description

pfexec pkg refresh --full

pkg search -l /usr/lib/libreadline.so.5
INDEX ACTION VALUE PACKAGE
path file usr/lib/libreadline.so.5 pkg:
pfexec pkg fix pkg:/library/readline

pkg search -l /usr/bin/smbclient
INDEX ACTION VALUE PACKAGE
path file usr/bin/smbclient pkg:

pfexec pkg fix pkg:/service/network/samba

smbclient --user predrag '\\backup\systems'
Enter predrag's password:
Domain=[**] OS=[Unix] Server=[Samba 3.2.15-0.36**]
ld.so.1: smbclient: fatal: relocation error: file /usr/lib/libreadline.so.5: symbol tgetent: referenced symbol not found
Killed


Files

export-415.txt (799 Bytes) export-415.txt Gordon Ross, 2011-06-29 12:14 AM
readline.tar.bz2 (218 KB) readline.tar.bz2 Gordon Ross, 2011-06-29 12:22 AM
fix-samba-termcap.patch (439 Bytes) fix-samba-termcap.patch Gordon Ross, 2011-07-12 10:47 PM
configure.in.diff (1.75 KB) configure.in.diff Gordon Ross, 2011-07-13 05:20 PM

History

#1

Updated by Julian Wiesener over 8 years ago

  • Status changed from New to In Progress
  • Assignee set to OI SFW
  • Priority changed from Normal to High
  • Target version set to oi_151

$ ldd -r /usr/bin/smbclient
libkrb5.so.1 => /usr/lib/libkrb5.so.1
libgss.so.1 => /usr/lib/libgss.so.1
librt.so.1 => /usr/lib/librt.so.1
libsendfile.so.1 => /usr/lib/libsendfile.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libthread.so.1 => /usr/lib/libthread.so.1
libreadline.so.5 => /usr/lib/libreadline.so.5
libresolv.so.2 => /usr/lib/libresolv.so.2
libpopt.so.0 => /usr/lib/libpopt.so.0
libldap60.so => /usr/lib/libldap60.so
libwbclient.so.0 => /usr/lib/samba/libwbclient.so.0
libz.so.1 => /usr/lib/libz.so.1
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
mech_krb5.so.1 => /usr/lib/gss/mech_krb5.so.1
libpkcs11.so.1 => /usr/lib/libpkcs11.so.1
libkstat.so.1 => /lib/libkstat.so.1
libcryptoutil.so.1 => /lib/libcryptoutil.so.1
symbol not found: tputs (/usr/lib/libreadline.so.5)
symbol not found: tgoto (/usr/lib/libreadline.so.5)
symbol not found: tgetnum (/usr/lib/libreadline.so.5)
symbol not found: tgetstr (/usr/lib/libreadline.so.5)
symbol not found: tgetent (/usr/lib/libreadline.so.5)
symbol not found: tgetflag (/usr/lib/libreadline.so.5)
libm.so.2 => /lib/libm.so.2

$ ldd -r /usr/lib/libreadline.so.5
libc.so.1 => /lib/libc.so.1
symbol not found: tputs (/usr/lib/libreadline.so.5)
symbol not found: tgoto (/usr/lib/libreadline.so.5)
symbol not found: tgetnum (/usr/lib/libreadline.so.5)
symbol not found: tgetstr (/usr/lib/libreadline.so.5)
symbol not found: tgetent (/usr/lib/libreadline.so.5)
symbol not found: tgetflag (/usr/lib/libreadline.so.5)
libm.so.2 => /lib/libm.so.2

seems readline lacks -lcurses:

LD_PRELOAD=/usr/lib/libcurses.so.1 ldd -r /usr/lib/libreadline.so.5  
/usr/lib/libcurses.so.1
libc.so.1 => /lib/libc.so.1
libm.so.2 => /lib/libm.so.2

Workarround:
alias smbclient="LD_PRELOAD=/usr/lib/libcurses.so.1 smbclient"

#2

Updated by Julian Wiesener over 8 years ago

alan pointed me to: https://defect.opensolaris.org/bz/show_bug.cgi?id=13621

obviously the intension was to make readline usable with different curses implemantations. thus we'll need to link smbclient (and any other binaries/libs using realdine) to one curses library instead of readline.

#3

Updated by Ken Mays about 8 years ago

  • Difficulty set to Medium
  • Tags set to needs-triage

Julian - something being resolved by someone for the oi_151 respin?

#4

Updated by Julian Wiesener about 8 years ago

seems more that nothing is resolved by nooen

$ ldd -r /usr/bin/smbclient
libkrb5.so.1 => /usr/lib/libkrb5.so.1
libgss.so.1 => /usr/lib/libgss.so.1
librt.so.1 => /usr/lib/librt.so.1
libsendfile.so.1 => /usr/lib/libsendfile.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libthread.so.1 => /usr/lib/libthread.so.1
libreadline.so.5 => /usr/lib/libreadline.so.5
libresolv.so.2 => /usr/lib/libresolv.so.2
libpopt.so.0 => /usr/lib/libpopt.so.0
libldap60.so => /usr/lib/libldap60.so
libwbclient.so.0 => /usr/lib/samba/libwbclient.so.0
libz.so.1 => /usr/lib/libz.so.1
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
mech_krb5.so.1 => /usr/lib/gss/mech_krb5.so.1
libpkcs11.so.1 => /usr/lib/libpkcs11.so.1
libkstat.so.1 => /lib/libkstat.so.1
libcryptoutil.so.1 => /lib/libcryptoutil.so.1
symbol not found: tputs (/usr/lib/libreadline.so.5)
symbol not found: tgoto (/usr/lib/libreadline.so.5)
symbol not found: tgetnum (/usr/lib/libreadline.so.5)
symbol not found: tgetstr (/usr/lib/libreadline.so.5)
symbol not found: tgetent (/usr/lib/libreadline.so.5)
symbol not found: tgetflag (/usr/lib/libreadline.so.5)
libm.so.2 => /lib/libm.so.2

#5

Updated by Julian Wiesener about 8 years ago

  • Target version changed from oi_151 to oi_151_stable
#6

Updated by Gordon Ross about 8 years ago

Yes, this is still broken, even in the userland build of samba 3.5.8
that I did for OI. The real problem is in libreadline (which really
should link with -lcurses) but it might be possible to work-around
this in the samba build. I'll look...

#7

Updated by Gordon Ross about 8 years ago

Actually, it's -ltermcap that libreadline normally links with.
The attached patch (export-415.txt) fixes it in userland-gate.
Where can I push this? Or can someone import it for me?

#8

Updated by Gordon Ross about 8 years ago

Attached updated libreadline binaries for fix verification.
i.e. cd / ; bzip2 -dc /tmp/readline.tar.bz2 |tar xvf -

#9

Updated by Gordon Ross about 8 years ago

Interesting. Apparently, there was a previous "fix" to remove -lcurses
from readline because that was introducing conflicts when an application
linked with some other curses library (i.e. ncurses or xcurses) as well as
libreadline. Here's a example failure due to mixing curses libraries:

https://defect.opensolaris.org/bz/show_bug.cgi?id=15550

I've proposed a better way to fix this, described here:
http://lists.illumos.org/pipermail/developer/2011-June/002547.html

#10

Updated by Gordon Ross about 8 years ago

Attached a short-term fix, just for OI-151.

A much better long-term fix is to use a libreadline built to
depend on the libtermcap filter library as proposed in: 1206
https://www.illumos.org/issues/1206

#11

Updated by Gordon Ross about 8 years ago

Uh, actually, that previous did not work. Upon further investigation:

The real root cause of this problem is that Samba links smbclient
with the "-z ignore" option, so even though the link line for smbclient
included -lreadline -lcurses, the "-z ignore" flags caused it to discard
the dependency on -lcurses due to lack of references from smbclient.

A safer approach here is to not use the "-z ignore" flags.

There is actually an autoconf test to dissable "-z ignore" when a
test program linked with -lreadline -lcurses does not resolve all
its symbols, but that autoconf test does not work on illumos
because you have to try actually running the program (not just
linking it) to find out if all the symbols can be resolved.

Attached is an updated version of this SFW gate file:
usr/src/cmd/samba/Patches/configure.in.diff

If you drop that into an SFW tree and rebuild, that will
fix this bug.

The fix can be verified by either running smbclient, or
"ldd smbclient" and make sure libcurses is listed.

#13

Updated by Ken Mays almost 8 years ago

  • Due date set to 2011-09-14
  • Assignee changed from OI SFW to OI Userland
  • Estimated time set to 40.00 h
#14

Updated by Jon Tibble over 7 years ago

I thought fixes went into both SFW and illumos for this. (And we seem to be on 3.5.5 in /dev.)

Can someone confirm if this is indeed resolved in oi_151a please?

#15

Updated by Predrag Zečević over 7 years ago

Yes,

this problem is gone:
$ uname -a
SunOS solarix 5.11 oi_151a i86pc i386 i86pc Solaris
$ pkg search -l /usr/bin/smbclient
INDEX ACTION VALUE PACKAGE
path file usr/bin/smbclient pkg:

Regards.

#16

Updated by Ken Mays over 7 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Closed per user's review.

Also available in: Atom PDF