Message82303
Under Solaris, find_library can not give the correct path.
Solaris does not have /sbin/ldconfig, so _findLib_gcc is used.
def _findLib_gcc(name):
expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
fdout, ccout = tempfile.mkstemp()
os.close(fdout)
cmd = 'if type gcc >/dev/null 2>&1; then CC=gcc; else CC=cc; fi;' \
'$CC -Wl,-t -o ' + ccout + ' 2>&1 -l' + name
try:
f = os.popen(cmd)
trace = f.read()
f.close()
finally:
try:
os.unlink(ccout)
except OSError, e:
if e.errno != errno.ENOENT:
raise
res = re.search(expr, trace)
if not res:
return None
return res.group(0)
I executed these code manually, and after ‘trace = f.read()‘, I printed
the content of 'trace', which was just as following:
Undefined first referenced
symbol in file
main /usr/lib/crt1.o
ld: fatal: symbol referencing errors. No output written to /tmp/tmpYN85Fm
collect2: ld returned 1 exit status |
|
Date |
User |
Action |
Args |
2009-02-17 08:17:15 | kewang | set | recipients:
+ kewang, theller |
2009-02-17 08:17:15 | kewang | set | messageid: <1234858635.81.0.426092533899.issue5289@psf.upfronthosting.co.za> |
2009-02-17 08:17:14 | kewang | link | issue5289 messages |
2009-02-17 08:17:12 | kewang | create | |
|