<div><br></div>Could my python "readline" issues have something to do with the uclibc "dynamic linker" (ld-uClibc.so.0)<div><br></div><div>When I run python, it opens and reads all the correct files in what appears to be the correct order:</div>
<div><br></div><div><div>open("/usr/lib/python2.7/lib-dynload/readline.so", O_RDONLY|O_LARGEFILE) = 3</div><div>open("/usr/lib/python2.7/lib-dynload/readline.so", O_RDONLY) = 4</div><div>open("/usr/lib/libreadline.so.6", O_RDONLY) = 4</div>
<div>open("/usr/lib/libncurses.so.5", O_RDONLY) = 4</div><div>open("/lib/libc.so.0", O_RDONLY)        = 4</div><div>open("/lib/libc.so.0", O_RDONLY)        = 4</div><div>open("/lib/libc.so.0", O_RDONLY)        = 4</div>
<div>open("/lib/ld-uClibc.so.0", O_RDONLY)   = 4</div><div><br></div><div><br></div><div>But immediately after opening "/lib/ld-uClibc.so.0" ... it complains that it can't resolve  symbols....which is should know about because it's just read them from /usr/lib/libreadline.so.6. I'm not sure what the "uclibc dynamic linker" actually does but could it be that it's not linking the libraries that have just been read?</div>
<div><br></div><div><br></div><div>Bruce</div><div> </div><div><br></div><div><br></div><br><div class="gmail_quote">On Wed, Mar 23, 2011 at 1:17 AM, bruce bushby <span dir="ltr"><<a href="mailto:bruce.bushby@gmail.com">bruce.bushby@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi<div><br></div><div>UPDATE: Python "readline" issue:</div><div><br></div><div>I've determined the errors are related to "ncurses" & "readline".....readline will compile against ncurses when it finds them. The definitions at the top of this man page are exactly the ones I'm having a problem with:</div>
<div class="im">
<div><a href="http://linux.die.net/man/3/tgetflag" target="_blank">http://linux.die.net/man/3/tgetflag</a></div><div><br></div><div><br></div><div><br></div></div><div>I've confirmed that when I compile "readline" it locates "ncurses" </div>

<div><br></div><div>I then checked on my embedded system and "libreadline.so" is present AND it contains the missing symbols:</div><div><div>[root@vx-200 ~]# find / -name "*libreadline*"</div><div class="im">
<div>/usr/lib/libreadline.so.6.1</div>
</div><div>/usr/lib/libreadline.so</div><div class="im"><div>/usr/lib/libreadline.so.6</div></div><div>[root@vx-200 ~]# strings /usr/lib/libreadline.so.6.1 | grep "tgetflag"</div><div>tgetflag</div><div>[root@vx-200 ~]# strings /usr/lib/libreadline.so.6.1 | grep "tgetent"</div>

<div>tgetent</div><div>[root@vx-200 ~]#</div><div><br></div><div><br></div><div>However, the resulting "readline" python module does NOT contain the symbols:</div><div>/usr/lib/python2.7/lib-dynload/readline.so</div>

<div><div>[root@vx-200 ~]# strings /usr/lib/python2.7/lib-dynload/readline.so | grep "tgetent"</div><div>[root@vx-200 ~]#</div></div><div><br></div><div>My linux desktop also DOES NOT contain the symbols  (However python readline works on my linux desktop)</div>

<div><div>[bruce@core ~]$ strings /usr/lib64/python2.6/lib-dynload/readline.so | grep tgetent</div><div>[bruce@core ~]$</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div>I then ran an strace to compare between my pc (Fedora 12) and my embedded OS that has the python readline issues. The results are similar</div>

<div>and I can see that Python opens the "libncurses" and "libreadline" libraries....which have been shown to contain the symbols.....however the embedded</div><div>OS still throws errors and can't "import readline"</div>

<div><br></div><div><br></div><div>Linux PC</div><div><div>[bruce@core ~]$ cat X | grep -v "No such file"</div><div>open("/usr/lib64/python2.6/lib-dynload/readline.so", O_RDONLY) = 3</div><div>open("/usr/lib64/python2.6/lib-dynload/readline.so", O_RDONLY) = 4</div>

<div>open("/etc/ld.so.cache", O_RDONLY)      = 4</div><div>open("/lib64/libreadline.so.6", O_RDONLY) = 4</div><div>open("/lib64/libtinfo.so.5", O_RDONLY)  = 4</div><div>open("/usr/share/terminfo/r/rxvt", O_RDONLY) = 4</div>

<div>open("/etc/inputrc", O_RDONLY)          = 4</div><div>open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3</div><div><br></div></div><div><br></div><div>Embedded:</div><div><div>[root@vx-200 ~]# cat Y | grep -v "No such file"</div>

<div>open("/usr/lib/python2.7/lib-dynload/readline.so", O_RDONLY|O_LARGEFILE) = 3</div><div>open("/usr/lib/python2.7/lib-dynload/readline.so", O_RDONLY) = 4</div><div>open("/usr/lib/libreadline.so.6", O_RDONLY) = 4</div>

<div>open("/usr/lib/libncurses.so.5", O_RDONLY) = 4</div><div>open("/lib/libc.so.0", O_RDONLY)        = 4</div><div>open("/lib/libc.so.0", O_RDONLY)        = 4</div><div>open("/lib/libc.so.0", O_RDONLY)        = 4</div>

<div>open("/lib/ld-uClibc.so.0", O_RDONLY)   = 4</div><div class="im"><div><br></div><div>python: symbol 'BC': can't resolve symbol</div><div><br></div><div>python: symbol 'PC': can't resolve symbol</div>

<div><br></div><div>python: symbol 'UP': can't resolve symbol</div><div><br></div><div>python: symbol 'tgetnum': can't resolve symbol</div><div><br></div><div>python: symbol 'tgoto': can't resolve symbol</div>

<div><br></div><div>python: symbol 'tgetflag': can't resolve symbol</div><div><br></div><div>python: symbol 'tputs': can't resolve symbol</div><div><br></div><div>python: symbol 'tgetent': can't resolve symbol</div>

<div><br></div><div>python: symbol 'tgetstr': can't resolve symbol</div><div>>>></div></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><div>>>> import readline</div>
<div class="im"><div>
<br></div><div>python: symbol 'BC': can't resolve symbol</div><div><br></div><div>python: symbol 'PC': can't resolve symbol</div><div><br></div><div>python: symbol 'UP': can't resolve symbol</div>

<div><br></div><div>python: symbol 'tgetnum': can't resolve symbol</div><div><br></div><div>python: symbol 'tgoto': can't resolve symbol</div><div><br></div><div>python: symbol 'tgetflag': can't resolve symbol</div>

<div><br></div><div>python: symbol 'tputs': can't resolve symbol</div><div><br></div><div>python: symbol 'tgetent': can't resolve symbol</div><div><br></div><div>python: symbol 'tgetstr': can't resolve symbol</div>

</div><div class="im"><div>Traceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div><div>ImportError: unknown dlopen() error</div><div>>>></div></div></div><div>
<br></div><div><br></div><div>
I've been stuck on this since 9th March so any pointers or hints would be greatly appreciated!!! I'm wondering could it be:</div><div>1. That I'm using the buildroot-snapshot?</div><div>2. or I'm uClibc-0.9.32-rc2?</div>

<div>3. or that I'm using gcc 4.5.x?</div><div>4 or something wrong with Fedora 14?</div><div><br></div><div>I'm trying uClibc-0.9.31 now so will know in 40min....but I'm starting to run out of ideas :(</div>
<div>
<br></div><font color="#888888"><div><br></div><div><br></div><div><div><br></div></div><div>Bruce</div><div><br></div><div><br></div><div><br></div><br></font><div class="gmail_quote"><div class="im">On Tue, Mar 8, 2011 at 8:20 AM, bruce bushby <span dir="ltr"><<a href="mailto:bruce.bushby@gmail.com" target="_blank">bruce.bushby@gmail.com</a>></span> wrote:<br>

</div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<div><br></div><div>I'm not sure if this is the right list to post this issue to?</div>
<div><br></div><div>From what I can tell, these "can't resolve" messages are caused when selecting "readline"<br>

<div><br></div><div><br></div><div><div># python</div><div>Python 2.7.1 (r271:86832, Mar  7 2011, 22:37:34)</div><div>[GCC 4.5.2] on linux2</div><div>Type "help", "copyright", "credits" or "license" for more information.</div>


<div><br></div><div>python: symbol 'BC': can't resolve symbol</div><div><br></div><div>python: symbol 'PC': can't resolve symbol</div><div><br></div><div>python: symbol 'UP': can't resolve symbol</div>


<div><br></div><div>python: symbol 'tgetnum': can't resolve symbol</div><div><br></div><div>python: symbol 'tgoto': can't resolve symbol</div><div><br></div><div>python: symbol 'tgetflag': can't resolve symbol</div>


<div><br></div><div>python: symbol 'tputs': can't resolve symbol</div><div><br></div><div>python: symbol 'tgetent': can't resolve symbol</div><div><br></div><div>python: symbol 'tgetstr': can't resolve symbol</div>


</div><div>>>></div></div>
</blockquote></div></div></div><br></div>
</blockquote></div><br></div>