Mailing List Archive

FreeBSD 7 libc_r detection
This patch fixes the problem with Configure -Duseithreads on FreeBSD 7
without the compatibility libraries installed.

See
http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/net/gethostnamadr.c
revisions 1.22 (removal of the bogus functions), and 1.25 (addition of
the new functions) for not disabling gethostbyaddr_r on 7.x.

I considered not checking for libc_r on 6.x as well, but all of my 6.x
VMs have libc_r.so installed.

Tony

(also attached)

--- hints/freebsd.sh 2008/10/20 04:59:30 1.1
+++ hints/freebsd.sh 2008/10/20 22:49:29
@@ -211,6 +211,14 @@
exit 1
;;

+ 7.*)
+ # 7.x doesn't install libc_r by default, and Configure
+ # would fail in the code following
+ #
+ # gethostbyaddr_r() appears to have been implemented in 6.x+
+ ldflags="-pthread $ldflags"
+ ;;
+
*)
if [ ! -r "$lc_r" ]; then
cat <<EOM >&4
Re: FreeBSD 7 libc_r detection [ In reply to ]
On Tue, Oct 21, 2008 at 10:26:30AM +1100, Tony Cook wrote:
> This patch fixes the problem with Configure -Duseithreads on FreeBSD 7
> without the compatibility libraries installed.
>
> See
> http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/net/gethostnamadr.c
> revisions 1.22 (removal of the bogus functions), and 1.25 (addition of
> the new functions) for not disabling gethostbyaddr_r on 7.x.
>
> I considered not checking for libc_r on 6.x as well, but all of my 6.x
> VMs have libc_r.so installed.

Thanks, applied as change 34542. A very timely patch. How did you know what
I was thinking about last night? :-)

(My understanding is that the hints file doesn't need to be changed for 6.x
The problem is that we're relying on something deprecated, that was removed
from the base install on 7.x, but is present with the compatibility libs.
Whilst this machine is 7.0, it's not mine, and it has the compatibility libs
installed, so I couldn't test what was needed to make it work on a clean 7.0
machine)

Nicholas Clark
Re: FreeBSD 7 libc_r detection [ In reply to ]
On Tue, Oct 21, 2008 at 10:26:30AM +1100, Tony Cook wrote:
> This patch fixes the problem with Configure -Duseithreads on FreeBSD 7
> without the compatibility libraries installed.
>
> See
> http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/net/gethostnamadr.c
> revisions 1.22 (removal of the bogus functions), and 1.25 (addition of
> the new functions) for not disabling gethostbyaddr_r on 7.x.
>
> I considered not checking for libc_r on 6.x as well, but all of my 6.x
> VMs have libc_r.so installed.
>
> Tony
>
> (also attached)
>
> --- hints/freebsd.sh 2008/10/20 04:59:30 1.1
> +++ hints/freebsd.sh 2008/10/20 22:49:29
> @@ -211,6 +211,14 @@
> exit 1
> ;;
>
> + 7.*)
> + # 7.x doesn't install libc_r by default, and Configure
> + # would fail in the code following
> + #
> + # gethostbyaddr_r() appears to have been implemented in 6.x+
> + ldflags="-pthread $ldflags"
> + ;;
> +
> *)
> if [ ! -r "$lc_r" ]; then
> cat <<EOM >&4

This resolves perl #57458 if I am not much mistaken.

Nice one.

Cheers,

--
Chris Williams
aka BinGOs
PGP ID 0x4658671F
http://www.gumbynet.org.uk
==========================
Re: FreeBSD 7 libc_r detection [ In reply to ]
On Tue, Oct 21, 2008 at 06:53:46AM +0100, Chris 'BinGOs' Williams wrote:
> On Tue, Oct 21, 2008 at 10:26:30AM +1100, Tony Cook wrote:
> > This patch fixes the problem with Configure -Duseithreads on FreeBSD 7
> > without the compatibility libraries installed.
> >
> > See
> > http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/net/gethostnamadr.c
> > revisions 1.22 (removal of the bogus functions), and 1.25 (addition of
> > the new functions) for not disabling gethostbyaddr_r on 7.x.
> >
> > I considered not checking for libc_r on 6.x as well, but all of my 6.x
> > VMs have libc_r.so installed.
> >
> > Tony
> >
> > (also attached)
> >
> > --- hints/freebsd.sh 2008/10/20 04:59:30 1.1
> > +++ hints/freebsd.sh 2008/10/20 22:49:29
> > @@ -211,6 +211,14 @@
> > exit 1
> > ;;
> >
> > + 7.*)
> > + # 7.x doesn't install libc_r by default, and Configure
> > + # would fail in the code following
> > + #
> > + # gethostbyaddr_r() appears to have been implemented in 6.x+
> > + ldflags="-pthread $ldflags"
> > + ;;
> > +
> > *)
> > if [ ! -r "$lc_r" ]; then
> > cat <<EOM >&4
>
> This resolves perl #57458 if I am not much mistaken.
>

Removed compat6x libraries on FreeBSD 7.0 and tested against blead 34545

Configure and build okay.

Applied updated patch from Nicholas <http://www.ccl4.org/~nick/P/7.diff>

Again Configure and build okay.

Happy for #57458 to be closed.

Thanks again to Tony and Nick.

--
Chris Williams
aka BinGOs
PGP ID 0x4658671F
http://www.gumbynet.org.uk
==========================