[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 07:30:53 EST 2007


------- Comment #11 from dtucker at zip.com.au  2007-02-20 07:30 -------
(In reply to comment #10)
> 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.

Are LIBRARY_PATH or LD_LIBRARY_PATH different with the different
shells?  Maybe their respective startup scripts set them differently. 
The other thing to check is if you the runtime library path has been
tweaked with crle(1).

> 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 don't think you need to build the whole thing static (as you saw,
there are no static variants of some libraries), but what you need to
do is link in the right static libgcc.

> Anyway, do you know how I can tell ld (gnu ld 2.17) which libs to link
> statically and which to link dynamically?

I think the normal algorithm is:

for each required library
    for each path in LIBRARY_PATH
        if there's a dynamic library then use it
        if there's a static library then use it

so I think that you need to put
-L/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.3 at the *start* of the
linker flags.  This should do it:

Depending on how critical the system is and what uses the dynamic
libgcc.so, you could temporarily rename the libgcc.so in /usr/local/lib
while you do the build.

> Or could I change the
> Makefile to make libssh dynamic? Is there some overriding reason why
> libssh must be static and not dynamic? Thanks.

No, I don't think libssh is contributing to the problem.

------- 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