Bug 194 - still problems with libutil
Summary: still problems with libutil
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: ix86 Linux
: P1 critical
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-28 22:48 AEDT by rappel
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rappel 2002-03-28 22:48:48 AEDT
Sorry that I don't get it but I can't compile the portable OpenSSH since 3.0 up
to the SNAP of 27.03.2002 (about a year now, am really in trouble!). I always
stumble over libutil not being able to reference atexit.

You now offer the option:

--disable-libutil

but it does not help. At the end of the configure process the list shows up:

Libraries:   -lutil -lz -lnsl  -lcrypto -lcrypt 

This may be the reason for that:

checking for libutil.h... no
checking for library containing login... -lutil

I don't really get through that. This is ahead of my knowledge. But I am really
wondering why it happens because on my system atexit is defined in either
stdlib.h or stdio.h (this one, I think). I used atexit and it works fine for me.
Because both headers are standards they must be included in your product at all,
so why libutil can't find atexit? Is it a problem of autoconf?
Comment 1 Damien Miller 2002-04-23 23:29:08 AEST
This should be fixed in -current CVS, please test
Comment 2 rappel 2002-05-09 22:58:41 AEST
This problem still appears with the newest cvs:

openssh-SNAP-20020508.tar.gz

I condifured the system using these options:

./configure --prefix=/usr --with-4in6 --with-md5-passwords --disable-libutil

Though I chose to not use libutil, it appears in the list of dependencies
(configure output):

OpenSSH has been configured with the following options:
                 User binaries: /usr/bin
               System binaries: /usr/sbin
           Configuration files: /usr/etc
               Askpass program: /usr/libexec/ssh-askpass
                  Manual pages: /usr/man/catX
                      PID file: /var/run
        sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin
                Manpage format: cat
                   PAM support: no
            KerberosIV support: no
             KerberosV support: no
             Smartcard support: no
                   AFS support: no
                 S/KEY support: no
          TCP Wrappers support: no
          MD5 password support: yes
   IP address in $DISPLAY hack: no
      Use IPv4 by default hack: no
       Translate v4 in v6 hack: yes
              BSD Auth support: no
          Random number source: OpenSSL internal ONLY

              Host: i686-pc-linux-gnu
          Compiler: gcc
    Compiler flags: -g -O2 -Wall -Wpointer-arith -Wno-uninitialized
Preprocessor flags: 
      Linker flags: 
         Libraries:   -lutil -lz -lnsl  -lcrypto -lcrypt 

ere is the error message:

/bin/ld -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o
readconf.o clientloop.o -L. -Lopenbsd-compat/  -lssh -lopenbsd-compat -lutil -lz
-lnsl  -lcrypto -lcrypt  
/bin/ld: warning: cannot find entry symbol _start; defaulting to 0804b208
/usr/lib/libutil.so: undefined reference to `atexit'
make: *** [ssh] Fehler 1

Please, I am without OpenSSH for over a year now! I have to keep an old system
on a separate partition to log into my sourceforge account. I really need support.

thanks
Comment 3 Damien Miller 2002-05-10 09:16:57 AEST
Why is libutil a problem?
Comment 4 rappel 2002-05-11 01:02:58 AEST
Ahem, did you read the message body? Maybe the problem is not because of libutil
but OpenSSH stops because of reference problems with libutil. If you know the
reason and solution then please tell me. Your qeustion does not make sense to
me, I don't understand position. Please explain what you want to say or know!
Comment 5 Ben Lindstrom 2002-05-11 01:09:48 AEST
atexit no longer exists within the code base.  How can this be tripping up
compile?  Can you provide us with the compile time error?  Or more details
as to why you are saying.

"I always stumble over libutil not being able to reference atexit."

When..

20020406
[..]
 - (bal) We no longer use atexit()/xatexit()/on_exit()


Maybe what Linux.. Because I have not seen any problems compiling under Redhat 
nor Mandrake.


Comment 6 rappel 2002-05-11 03:03:05 AEST
Do you call this support!

I already gave the information. Maybe you should learn to read a message to its
bottom.

To tell you how it looks like for the user of your product:
===========================================================

I disabled the use of libutil (--disable-libutil) but got this configuration output:

  Libraries:   -lutil -lz -lnsl  -lcrypto -lcrypt 

So, at least your configuration option does not render very clearly what
actually happens. A user is a bit confused by that.

Then I get this compilation error:

  /bin/ld -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o
  readconf.o clientloop.o -L. -Lopenbsd-compat/  -lssh -lopenbsd-compat -lutil -lz
  -lnsl  -lcrypto -lcrypt  
  /bin/ld: warning: cannot find entry symbol _start; defaulting to 0804b208
  /usr/lib/libutil.so: undefined reference to `atexit'
  make: *** [ssh] Fehler 1

The second line shows the reference to -lutil. So, libutil is still enabled. The
forelast line expresses that the reference to atexit was not working. But you write:

  - (bal) We no longer use atexit()/xatexit()/on_exit()

So, if not you who else? How the user shall answer this? To him this is only
paradox. So, if not your product uses atexit then at least a product which you
refer to. Then, it is still your problem since that product works otherwise.

Then you write this:

  Maybe what Linux.. Because I have not seen any problems 
  compiling under Redhat nor Mandrake.

Why you ask me this. If I was telling you that I use SuSE would you then know
the solution. Or would you just complement me to my distributor. So, only RedHat
users can get your support? Is RedHat the measure for free source?

To tell you what I am using: Free Source as mother GNU has created it. Did I
loose support now?

I don't use any distribution and, though RedHat took over being the measure,
just the source still works fine. My system consists of thousands of products
like: GNOME, Mozilla, Gnumeric, Evolution, Apache 2.0, PHP4, PERL, Python,
MySQL, PostgreSQL, OpenSSL, the compilation environment (as I wrote earlier I
tested atexit and my little c prog worked out of the box). So, don't tell me
it's my system.

Some product that Open SSH refers to seems to need atexit. Since that product
works otherwise the culprit could be the autoconf system. Maybe your Makefile
does not set environment variables correctly when spitting out gcc commands. 

I did not append a complete make log but send it to the maintainer directly
because bugzilla did everything except sending the message when an attachment
was specified. I lost an hour waiting and trying and waiting and trying.
Comment 7 wendy palm 2002-05-11 03:22:50 AEST
you might want to remember that the developers are volunteers here.
they are providing support because they want to.
your belligerent attitude will not exactly encourage anyone to
look into your problem.

you should always provide what OS you are running with every bug report.
sometimes others may have come across the same problem.
ben's statement that it works on mandrake and redhat wasn't a shot at
you, but an attempt to better pigeonhole exactly where the problem is.
damien's response looks strange in the order it appears to have been
received, but remember that email can cross and he may have sent it
quite a while before you sent your response.

so, at risk of getting whapped by someone-
please chill out.  these are volunteers and shouldn't be
treated badly when they are trying to figure out a problem
you've waited a year on.
Comment 8 rappel 2002-05-11 03:50:56 AEST
You might remember that people now depend on your product because since you
offered it for free many sites just force a user like me to use your product.
Thus, you carry some responsibility. And, that your supporters are volunteers
does not mean that they can write what they want while I have to be quiet. As
you stated correctly I am now without OpenSSH since over a year (on my main
system, my old SuSE uses an older version which is insecure). And, my first
report was posted a month ago now. Since then I only got one creative message
stating that the problem was solved which is not true. Now your volunteers do so
as if the problem does not even exist.

I only got "belligerent" (what is not true, I just tried to get sense into the
communication) because your volunteers were, lets say, the opposite of wordy. I
am in need and would apprecheate some helpful contact. Maybe you consider this.
Or do I have to dance for your volunteers? When they are willing to help?
Comment 9 rappel 2002-05-11 04:13:56 AEST
Here is what ver_linux tells about my system:

Linux orgc 2.4.16 #3 Mit Mär 27 16:34:35 CET 2002 i686 unknown
 
Gnu C                  2.95.3
Gnu make               3.79.1
binutils               2.11.2
util-linux             2.11i
mount                  2.11i
modutils               2.4.12
e2fsprogs              1.25
PPP                    2.4.1
Linux C Library        2.2.4
Dynamic linker (ldd)   2.2.4
Procps                 2.0.7
Net-tools              1.60
Kbd                    1.06
Sh-utils               2.0
Comment 10 Tim Rice 2002-05-11 04:33:52 AEST
If you edit your Makefile and remove -lutil from the LIBS=
line, does it compile?
Comment 11 Ben Lindstrom 2002-05-11 05:03:49 AEST
ermm..  This looks like a glibc issue.  Because atexit() is part of glibc.

[mouring@newton ~]$nm /usr/lib/libc.a | grep atexit
[..]
atexit.o:
[..]
00000000 T atexit

So I'm not sure why libutil would be kicking out that error.

This is really not a valid test of atexit(), but can you try compiling this?  
It would at least show us if atexit() support even exists in glibc.

void test(void) { printf("Hello World\n"); }
int main(){ atexit(test); }


BTW, I don't care to get into distro wars.. I work on servers from Linux/Redhat 
to Solaris to NeXTStep.  To tell you the truth they all piss me off for all 
different reasons. =)  And I'm sorry if you feel we are not solving your 
problem, but just randomly disabling libraries is the wrong approach to solve 
this problem.

- Ben 
Comment 12 Gary E. Miller 2002-05-11 05:28:13 AEST
Yo !

I have seen this before.  It happens when some of your libraries a re
built with gcc before < 3.0 and some with gcc >= 3.0. It also is related
to the removal of atexit() from the libc.so file around 26 Feb 01.

It has nothing to do with openssh.  Take this up with the GCC and Glibc
folks that created this mess when they removed atexit from libc.  Your
best fix is to recompile all the libaries you think are being used with
the current compiler.  That is not always sufficient for some projects
like X11 that do strange and unnatural things with dynamic libs.

If you search on google you will see this is drving everyone crazy...
Comment 13 Gary E. Miller 2002-05-11 05:38:05 AEST
This from the glibc-2-2.5 FAQ

> 3.23.   I get "undefined reference to `atexit'"
>
> {UD} This means that your installation is somehow broken.  The situation is
> the same as for 'stat', 'fstat', etc (see question 2.7).  Investigate why the
> linker does not pick up libc_nonshared.a.

It was noted earlier that atexit is in libc.a, but by default the linker
uses libc.so and that does NOT contain atexit() in newer versions.

RGDS
GARY
Comment 14 rappel 2002-05-11 07:33:43 AEST
Some examples why I got angry:

First: There was a Gert who flamed me with an email directed to my private
address. I already answered.

Second: Ben writes (at this place) that I should try a small prog to see if
"atexit() support even exists in glibc". He tries to help but he did not read my
messages. I already wrote a test prog and atexit works fine on my system.
Nevertheless: thanks for being helpful.

Third: gem@rellim.com wrote about the problem with changing compilers. Again
somebody is creative, thanks. I did not mix compilers, still use the same for
all progs on my system (would not mix). He then writes about the newer glibc
releases and that they do not include atexit anymore (same problem like with
Ben): "It has nothing to do with openssh." This is not true because if the
maintainers of glibc change the rules then you have to follow since you, and
with you your users, depend on that. He then writes that I shall: "Take this up
with the GCC and Glibc folks that created this mess when they removed atexit
from libc." I think this was just a call for revolution but, please, your
product wants to find something though you already know it is gone. Why I shall
struggle with the maintainers of glibc then? And, again, atexit is there and
accessible.

Fourth: Gary writes: "It was noted earlier that atexit is in libc.a, but by
default the linker uses libc.so and that does NOT contain atexit() in newer
versions." That is a hint into the right direction but, as I wrote, my atexit
works fine by just including stdio.h. So, ok, its good information still.

And, in the end, I wonder what you are talking about because you now want me to
find atexit though Ben writes that: "We no longer use
atexit()/xatexit()/on_exit()". Better is finding the right library which still
wants to use atexit, and checking if it's yours or belonging to another project.
Then, I could actually bore them.

tim@multitalents.net actually helped me most. He wrote: "If you edit your
Makefile and remove -lutil from the LIBS= line, does it compile?". I tried out
and came a bit more far. Now the error is:

/bin/ld -o ssh ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o
readconf.o clientloop.o -L. -Lopenbsd-compat/  -lssh -lopenbsd-compat -lz -lnsl
 -lcrypto -lcrypt  
/bin/ld: warning: cannot find entry symbol _start; defaulting to 0804b1f8
/usr/lib/libnsl.so: undefined reference to `atexit'

As you can see, still a library of the glibc package wants atexit. And, I think
that is the real problem. The glibc library will always want to find atexit. I
tell again here, because you seem to forget this quickly, that I already checked
for atexit and it is existing and working. Thus, I still believe that there is a
problem with the setting of search paths through variables. I am shure you
included the stdio.h, otherwise more would not work.

One thing on your support really works good now: the frequency ;)
Comment 15 Ben Lindstrom 2002-05-11 08:19:34 AEST
I sent this in private email, but I'll restate this for the record.

Working off of Gary's comment..  Try adding /usr/lib/libc_nonshared.a to your
LIBC= and see if that resolves it.

If it does then I'm unsure what we (as the portable group) can do to find to 
correct this since that should be linked by default by the compiler.

- Ben
Comment 16 Gary E. Miller 2002-05-11 08:26:43 AEST
Yo All!

> Try adding /usr/lib/libc_nonshared.a to your
> LIBC= and see if that resolves it.

Or link statically.  Since you know atexit() is in your libc.a and
I bet it is NOT in your libc.so.

I'll also bet you updated your libc about the time you first had problems
compiling OpenSSH.  You said you had problems for about a year and
glibc had this bad change about 14 months ago.

RGDS
GARY
Comment 17 rappel 2002-05-11 23:29:32 AEST
Wow, much going on now :)

I already read Ben's message about finishing the flame war. I don't want to
flame further, just state what I state now since three messages. Gert, again,
wrote me about his "bigger dig", and appended some details about his good
relations to RMS, Linus, etc. (He enforced a useless flame war about the term
free source and its impact on the user in his previous email). I definately
don't agree with:

"Always remember: this is volunteer effort.  You don't pay for it.  The
ONLY right you have is "help yourself"." 

He always sticks to free as in free beer. He should proof his opinion with RMS
again. But, the most disturbing point is this "do or dare" opinion. I did not
criticize free source, was just angry about YOUR support. This is something
individual and not defined by the GPL, FSF, or the community. And, as a
dependent user *I have the right* to find out on whom I am dependent. But, ok,
have said this, lets skip now. I now see that over months nothing happened here
till I got more harsh. Now, everybody takes part with his comments. So, there is
never enough time for support but always for flame wars. This is a bad truth not
only for this project. I agree to ben:

"Gert, if anyone should be getting pissed by his messages it should be me
or maybe Damien."

There are actually some more helpful people. Ben, I want to excuse because you
seem to care. 

"If you take my original message or this one as being 'condensing' or
'elitest' non-sense then please stop reading into my writing because I'm
not. I'm honestly trying to find the right question or bit of
information that may help."

It wasn't clear at the beginning because the first messages were, say, not that
logical. 

Now, there still is the problem with atexit(). You, and others, asked if I could
try appending /usr/lib/libc_nonshared.a to LIBS=. This way of co-operation I
seekd for. I tried but still the same referencing error with libutil. 

As I wrote, the error does not happen to my own prog and thousands of other free
source products. Thus, I don't think that glibc messes up something. It still
seems to be a referencing problem of the configuration and installation
procedure. I did not have to link to any place to let my own prog run. GCC found
everything needed and atexit worked. This is my experience, what shall I say.

You say: "I've not had anyone bring up this issue and so it leads me to believe
there is some uniqueness of your system.  Not saying that it is broken, but
something unique enough to trigger it.  What that means is will be impossible
for anyone, but you to resolve it since no one else can reproduce it."

I think this is at least a bit incorrect because of my overall good experience.
My system is just non-manipulated source, as it should be. It works fine and
clean. I was never happier about a linux system. I love it (slime). So, even if
this is unique to you, still your product does something that others do not.
Means: my system is only unique and triggering to openssh. So, maybe, openssh
does something unique under thousands of products (we can now start the next
flame war). I still stick to autoconf or similar as the culprit. As a
consequence, it does not help to bore the glibc-people. They will send me back
to you. I am not a jo-jo and don't want to be pushed from here to there. Maybe
you can now start just giving some hints. Maybe I could send config.cache and
makefiles to you. Maybe there are other things I could try. 

Please, you are more experienced in such big projects. You may know better what
to do now. I would ask Gert because of his relations to the masters of free
source but this is not a good deal, I believe.
Comment 18 Damien Miller 2002-10-21 10:24:53 AEST
broken libc = notabug
Comment 19 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED