[Bug 1272] Unable to make OpenSSH with undefined refs in readconf.o

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Tue Feb 20 05:41:03 EST 2007


http://bugzilla.mindrot.org/show_bug.cgi?id=1272





------- Comment #10 from fbaird at yahoo.com  2007-02-20 05:41 -------
(In reply to comment #9)
> Another thought: do you have multiple instances of libgcc?  Perhaps one
> in /usr/local/lib and one elsewhere?
> 

Well, yes I do. I have a libgcc at 
/usr/local/lib/libgcc_s.so  (which is from gcc 3.4.6), 
/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.3/libgcc.a and
/usr/local/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/libgcc.a.

But while researching this, I was looking at the Makefile and found
this: 
# uncomment if you run a non bourne compatable shell. Ie. csh
#SHELL = /usr/bin/sh

I use tcsh as my default shell (being a long time Sun guy, where the
default shell has always been csh), so I ran under the bash shell and
the problem appeared to go away. However, now I have different problem
(though it might actually be the same one, keep reading). I often see
errors of the sort

/usr/local/bin/ld: warning: cannot find entry symbol _start; defaulting
to 0000000000013168

If I let the make continue it does compile, but the programs that are
built core dump.

I found that the warning means I need to tell ld I am using static
linking. After looking more at the Makefile I saw that libssh is built
for static linking (it's a .a file). So I tried adding -static to the
linker flags and then several libs were unfound. I found that this was
because I only have dynamic version of many of the libraries (for
example, libresolv and librt). I have since tried many variants of
trying to tell ld that some libs are static and some libs are dynamic,
but apparently it's not working. I keep getting messages such as
"Unable to find librt". 

I think that my original error was caused by the linker picking up
either the gcc 2.95.2 libgcc or the 3.4.3 libgcc since both of those
are statically linked libs. 

Anyway, do you know how I can tell ld (gnu ld 2.17) which libs to link
statically and which to link dynamically? Or could I change the
Makefile to make libssh dynamic? Is there some overriding reason why
libssh must be static and not dynamic? Thanks.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the openssh-bugs mailing list