HEADS UP: MAJOR changes to the ports system

Vladimir Kushnir vkushnir at Alfacom.net
Sun Feb 8 16:26:27 PST 2004


Sorry I know I should have written PR but I'm not sure about correct fix.
So here it goes.
After these changes lang/perl5.8 is still linked to libc_r when compiled
with "WITH_THREADS=yes": it's hardcoded in perl-5.8.2/hints/freebsd.sh
Easily fixed with this patch:
*** hints/freebsd.sh.orig	Sun Feb  8 02:00:51 2004
--- hints/freebsd.sh	Sun Feb  8 02:03:20 2004
***************
*** 186,192 ****
  cat > UU/usethreads.cbu <<'EOCBU'
  case "$usethreads" in
  $define|true|[yY]*)
!         lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'`
          case "$osvers" in
  	0*|1*|2.0*|2.1*)   cat <<EOM >&4
  I did not know that FreeBSD $osvers supports POSIX threads.
--- 186,192 ----
  cat > UU/usethreads.cbu <<'EOCBU'
  case "$usethreads" in
  $define|true|[yY]*)
!         lc_r=`/sbin/ldconfig -r|grep ':-lpthread'|awk '{print $NF}'|sed -n
'$p'`
          case "$osvers" in
  	0*|1*|2.0*|2.1*)   cat <<EOM >&4
  I did not know that FreeBSD $osvers supports POSIX threads.
***************
*** 244,250 ****

  	esac

! 	set `echo X "$libswanted "| sed -e 's/ c / c_r /'`
  	shift
  	libswanted="$*"
  	# Configure will probably pick the wrong libc to use for nm scan.
--- 244,250 ----

  	esac

! 	set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
  	shift
  	libswanted="$*"
  	# Configure will probably pick the wrong libc to use for nm scan.

But i) It requires very recent -CURRENT (I just don't khow how to
distinguish in an elegant way in shell script); and ii) This way
libperl.so and the progs are linked with "-lpthread -lc" (in this order).
Is this correct?

On Wednesday 04 February 2004 09:49, Joe Marcus Clarke wrote:
> Sorry for the wide distribution, but it is critical that -CURRENT users
> hear this.  Two _MAJOR_ changes just went in to the ports tree that are
> bound to cause some pain to -CURRENT users.
>
> The first is the change in default threading libraries.  The ports
> system now uses -lpthread when linking ports instead of -lc_r.  Binaries
> that wind up with both libc_r and libpthread in them will cause
> problems.  In that case, it is imperative that you report this to the
> port's maintainer ASAP.  You can use pkg_info -W /path/to/binary to
> determine which port installed it.
>
> Second, Perl 5.8.2 is now the default version of Perl in -CURRENT since
> the 5.2 split.  This replaces Perl 5.6.1 as the default.  Note: Perl
> 5.00503 is still the default version of Perl in the 4.X base OS.
>
> If you experience problems with any of these changes (or with the other
> recent changes listed in /usr/ports/CHANGES), please report them on the
> ports@ list and to the appropriate maintainers as soon as possible.
> Thanks.
>
> Joe

Regards,
Vladimir


More information about the freebsd-ports mailing list