multiple definition of `optind'

Phil Howard phil-openssh-unix-dev at ipal.net
Mon Jun 17 10:16:40 EST 2002


On Sun, Jun 16, 2002 at 12:17:15PM -0500, Ben Lindstrom wrote:

| On Sun, 16 Jun 2002, Phil Howard wrote:
| 
| > Any ideas of the best way around this problem?  Should I just hack the
| > source code, or is there a magic switch somewhere I'm missing?  I'm
| > assuming I can't just dismiss that function as OpenSSH is probably
| > based on the OpenBSD semantics.
| >
| 
| No the issue is that your platform lacks a usable getopts with a optreset.

I can believe that.  It's got GNU libc ... very buggy.  Got another
libc for Linux that works better?


| Plus you are trying to compile staticly.

Yes.  That's to get around problems with OpenSSL clobbering its own
libraries every time it is installed because of the fact that the
libraries it builds don't have distinguishing version numbers on them
for the various "lettered versions" they release.  So when installing
"0.9.6d" it clobbers the library for "0.9.6c" because the actual
built library was just "0.9.6".

The fact that the installation program it uses opens, truncates, and
writes the library ... as opposed to create a new file and rename it
into place ... just makes it worse.

Even with the strategy of having extra sshd processes listening on
alternate ports so I still have a way into the machine when I kill off
one to restart that port with the new version, it still does no good if
the executeables (I can get around this by making copies) or libraries
(no easy to maintain way around this that I can see) get clobbered.

I've gotten around the executeables getting clobbered by manually
making copies named distinct for each port (useful for using the
killall command now).  But the libraries getting clobbered is still
an issue, and statically linking I believe will solve this and a few
minor issues as well.


| Try the attach patch.  Let me know if it fixes it.  It was presented as
| part of the Mint platform patches.

What is a "Mint platform"?

The patch applies, compilation and linking work, and the "ssh" executeable
now runs.  Of course these are now fat executeables, but I now see the
sweet words "not a dynamic executable" from ldd.  Normally I would want
that, but this is one of the cases where I don't.  Having to run to the
system console is very costly thing (miles away).

-- 
-----------------------------------------------------------------
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| phil-nospam at ipal.net | Texas, USA | http://phil.ipal.org/     |
-----------------------------------------------------------------



More information about the openssh-unix-dev mailing list