The milter library of Sendmail needs to be fixed to detect the presence of
this (separately from getipnodeby*()) and conditionally compile around
this. The following commented assumption is WRONG:
/*
** Stub routine -- if they don't have getipnodeby*(),
** they probably don't have the free routine either.
*/
Conditionals: #endif /* NEEDSGETIPNODE && NETINET6 */
The conflict shows up in a failed compilation of milters, including
dkim-filter (where I saw the problem), and the older dk-filter, where the
linker complains about a redefintion of the size of the routine (5 bytes
vs. 271 on my system).
I have Sendmail version 8.14.4, compiled from the source. I have not
checked 8.14.5 alpha 0 for the problem. As noted by the conditionals, this
may only appear on IPv6 enabled systems.
Why are you using ISC's libbind ? Which OS ?
>
> The milter library of Sendmail needs to be fixed to detect the presence of
> this (separately from getipnodeby*()) and conditionally compile around
> this. The following commented assumption is WRONG:
>
> /*
> ** Stub routine -- if they don't have getipnodeby*(),
> ** they probably don't have the free routine either.
> */
>
> Conditionals: #endif /* NEEDSGETIPNODE && NETINET6 */
>
> The conflict shows up in a failed compilation of milters, including
> dkim-filter (where I saw the problem), and the older dk-filter, where the
> linker complains about a redefintion of the size of the routine (5 bytes
> vs. 271 on my system).
Which error messages ?
If you type "man getipnedebyname" or "man getipnodebyaddr", you'll see
that getipnodebyX allocates some memory to return results (thread safe
routine), so it needs some way to free the space allocated, it it will
surely need free...
But as long as you haven't posted error messages nor told which OS are
you using, it's hard to say something.
Why does the use of ISC's libbind matter? All that need be known is that
it is installed and provides the real routine which is being stubbed out in
libmilter because sendmail is NOT detecting that there's a conflict in its
configuration phase. The bug is for NOT DETECTING that the real routine is
available and thus skipping the stub.
The OS is Linux.
> > The milter library of Sendmail needs to be fixed to detect the presence
of
> > this (separately from getipnodeby*()) and conditionally compile around
> > this. The following commented assumption is WRONG:
> >
> > /*
> > ** Stub routine -- if they don't have getipnodeby*(),
> > ** they probably don't have the free routine either.
> > */
> >
> > Conditionals: #endif /* NEEDSGETIPNODE && NETINET6 */
> >
> > The conflict shows up in a failed compilation of milters, including
> > dkim-filter (where I saw the problem), and the older dk-filter, where
the
> > linker complains about a redefintion of the size of the routine (5
bytes
> > vs. 271 on my system).
>
> Which error messages ?
Multiply defined symbol, of course. Read what I said.
> If you type "man getipnedebyname" or "man getipnodebyaddr", you'll see
> that getipnodebyX allocates some memory to return results (thread safe
> routine), so it needs some way to free the space allocated, it it will
> surely need free...
So what is your point?
> But as long as you haven't posted error messages nor told which OS are
> you using, it's hard to say something.
I have laready told you what the error is: Sendmail is building its own
[dummy-stub] version of a library function that already exists in another
library due to a failure to detect the real routine.
> it is installed and provides the real routine which is being stubbed out in
> libmilter because sendmail is NOT detecting that there's a conflict in its
> configuration phase. The bug is for NOT DETECTING that the real routine is
Which "configuration phase" are you talking about?
PS: I'm looking forward to seeing your patch. Thanks.
Not as a diff, but simply the result of the change:
// void
// freehostent(h)
// struct hostent *h;
// {
// /*
// ** Stub routine -- if they don't have getipnodeby*(),
// ** they probably don't have the free routine either.
// */
//
// return;
// }
#endif /* NEEDSGETIPNODE && NETINET6 */
As noted, commenting out the defective stub routine was sufficient to fix
the problem.
Seems this question went unanswered.
> > PS: I'm looking forward to seeing your patch. Thanks.
> Not as a diff, but simply the result of the change:
> // void
> // freehostent(h)
That will work well with a real C compiler and on systems that
actually need freehostent(), which seems to be almost all.
That would be ./configure, or its moral equivalent, methinks (as I
hazily remember sendmail did not - at some point - use autoconf)
alf
> > Seems this question went unanswered.
> That would be ./configure, or its moral equivalent, methinks (as I
> hazily remember sendmail did not - at some point - use autoconf)
There is not configure command in the sendmail 8 distribution.
And there is no "moral equivalent" AFAICT. But maybe the OP can
explain what he meant? Maybe editing devtools/Site/*.m4?
Maybe adding
APPENDDEF(`confENVDEF', `-UNEEDSGETIPNODE')
would have solved the problem?
Well, you asked me what I did to fix the problem on my system, and I told
you: I effectively removed the stub from the milter library source, as the
real routine is provided by libbind 6.0 on my system.
I reported this so you can program in a solution for the generic case that
tests to see if the routine is available and thus using conditional
compilation skip the stub. Maybe sendmail should be converted to use
"autoconf" like most other packages do.
The strange thing is that there was no conflict detected or missing error
for "getipnodebyname()" to alert me there was a problem that would lead me
to that symbol.
The only documentation on this define is in "sendmail/README", which is not
the main readme file. It says:
"NEEDSGETIPNODE Set this if your system supports IPv6 but doesn't
include
the getipnodeby{name,addr}() functions. Set automatically
for Linux's glibc."
Excuse me, but I run Linux (2.6.34), and this says nothing about REMOVING
the symbol when libbind is present. I do have a system that does include
the function getipnodebyname(). The value appears to be set incorrectly
for my system. I have glibc version 2.3.5 installed (10 Sep 2005).
(Attempts to upgrade glibc to version 2.11.1 from source have not
successfully compiled.) If this were an issue for the milter interface
ONLY (which is what happened to me), I would expect to see something in
"libmilter/README". I note that the function does NOT appear in glibc but
in libbind only.
I have tested the UNDEFINE you suggested and that works (in lieu of my
solution). However, the documentation regarding the issue is clearly wrong
and needs to be revised.
Even if found, the assumption about "freehostent()" is going to be wrong
for glibc - from changelog:
2000-10-26 Ulrich Drepper <dre...@redhat.com>
...
* inet/freehostent.c: Removed.
2000-08-01 Andreas Jaeger <a...@suse.de>
...
* conform/data/netdb.h-data: Remove getipnodebyaddr and friends.
...
* inet/Makefile (routines): Don't build getipnodebyaddr and
friends.
2000-07-31 Andreas Jaeger <a...@suse.de>
* inet/Versions: Remove getipnodebyaddr and friends from GLIBC_2.2.
* resolv/netdb.h: Remove getipnodebyaddr and friends.
Therefore, even if getipnodebyname() wasn't a "friend function" that was
removed, freehostent() certainly was removed from glibc (starting with
version 2.1.96) a decade ago.