Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jan 2001 21:24:24 -0800
From:      Manfred Antar <null@pozo.com>
To:        ports@FreeBSD.ORG
Cc:        John Polstra <jdp@polstra.com>
Subject:   Re: HEADS UP: libc/libc_r changes require rebuild of threaded apps 
Message-ID:  <5.0.2.1.2.20010124211610.00a7b678@pozo.com>
In-Reply-To: <200101250427.f0P4RiK29656@vashon.polstra.com>
References:  <Pine.SUN.3.91.1010124130841.12976A-100000@pcnet1.pcnet.com> <Pine.SUN.3.91.1010124130841.12976A-100000@pcnet1.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 08:27 PM 1/24/2001 -0800, you wrote:
>In article <Pine.SUN.3.91.1010124130841.12976A-100000@pcnet1.pcnet.com>,
>Daniel Eischen  <eischen@vigrid.com> wrote:
>> On Wed, 24 Jan 2001, Jordan Hubbard wrote:
>> > Hmmmm.  And does the -pthread argument do anything anymore?  If not,
>> > why not have it default to simply linking in libc_r for POLA's sake
>> > and ease of transition?  If it does do something different now,
>> > perhaps you could explain what that is for all of us who are also
>> > confused. :)
>[...]
>> John Polstra has a simple patch that will change the semantics
>> of -pthread.  This is obriens territory and I've steered clear
>> of touching anything in there.  I sent him an email a few days
>> ago about this, but he's away for a couple of weeks and won't
>> be able to do anything about it until he gets back.  I'll
>> test Johns patch, which should work just fine, and we'll let
>> _him_ commit it ;-)
>
>Which I will do with my usual cheer after the patch has been tested. ;-)
>I posted it to -current, but here it is again for anybody on this
>list who would like to test it.  Apply the patch and rebuild world,
>then try building some threaded apps.  Let me know what happens.
>
>John
>
>Index: freebsd.h
>===================================================================
>RCS file: /home/ncvs/src/contrib/gcc.295/config/freebsd.h,v
>retrieving revision 1.30
>diff -u -r1.30 freebsd.h
>--- freebsd.h   2000/11/07 21:49:08     1.30
>+++ freebsd.h   2001/01/24 17:05:35
>@@ -71,17 +71,14 @@
> #define CPP_SPEC FBSD_CPP_SPEC
> 
> /* Provide a LIB_SPEC appropriate for FreeBSD.  Just select the appropriate
>-   libc, depending on whether we're doing profiling. 
>+   libc, depending on whether we're doing profiling.  Add the appropriate
>+   libc_r if supporting threads.
>    (like the default, except no -lg, and no -p).  */
> #undef  LIB_SPEC
> #define LIB_SPEC "\
>   %{!shared: \
>-    %{!pg: \
>-      %{!pthread:-lc} \
>-      %{pthread:-lc_r}} \
>-    %{pg: \
>-      %{!pthread:-lc_p} \
>-      %{pthread:-lc_r_p}} \
>+    %{!pg: %{pthread:-lc_r} -lc} \
>+    %{pg:  %{pthread:-lc_r_p} -lc_p} \
>   }"
> 
> 
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-ports" in the body of the message 

I tried the patch and it worked for some of the threaded ports:
ImageMagick:
ldd display :
display:
        libMagick.so.5 => /usr/local/lib/libMagick.so.5 (0x2806a000)
        libjbig.so.1 => /usr/local/lib/libjbig.so.1 (0x281de000)
        libdf.so.1 => /usr/local/lib/libdf.so.1 (0x281ea000)
        libtiff.so.4 => /usr/local/lib/libtiff.so.4 (0x2827e000)
        libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x282bf000)
        libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x282f3000)
        libpng.so.4 => /usr/local/lib/libpng.so.4 (0x28311000)
        libwmf.so.1 => /usr/local/lib/libwmf.so.1 (0x2832f000)
        libdib.so.1 => /usr/local/lib/libdib.so.1 (0x2833b000)
        libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x2833f000)
        libdpstk.so.1 => /usr/X11R6/lib/libdpstk.so.1 (0x2834d000)
        libdps.so.1 => /usr/X11R6/lib/libdps.so.1 (0x28355000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x28396000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x283a4000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x283ef000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x283f8000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x2840e000)
        libbz2.so.1 => /usr/local/lib/libbz2.so.1 (0x284eb000)
        libz.so.2 => /usr/lib/libz.so.2 (0x284fb000)
        libm.so.2 => /usr/lib/libm.so.2 (0x28508000)
 >>       libc_r.so.5 => /usr/lib/libc_r.so.5 (0x28523000)
 >>       libc.so.5 => /usr/lib/libc.so.5 (0x28544000)
        libg2c.so.1 => /usr/lib/libg2c.so.1 (0x285e1000)
        libXThrStub.so.6 => /usr/X11R6/lib/libXThrStub.so.6 (0x285fd000)
ldd mahogany:
        libwx_gtk.so => /usr/X11R6/lib/libwx_gtk.so (0x2839c000)
        libgtk12.so.2 => /usr/X11R6/lib/libgtk12.so.2 (0x2878a000)
        libgdk12.so.2 => /usr/X11R6/lib/libgdk12.so.2 (0x288b0000)
        libgmodule12.so.3 => /usr/local/lib/libgmodule12.so.3 (0x288e1000)
        libgthread12.so.3 => /usr/local/lib/libgthread12.so.3 (0x288e4000)
        libglib12.so.3 => /usr/local/lib/libglib12.so.3 (0x288e7000) 
        libintl.so.1 => /usr/local/lib/libintl.so.1 (0x28909000)
        libxpg4.so.3 => /usr/lib/libxpg4.so.3 (0x2890e000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x28910000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x2891e000)
        libpng.so.4 => /usr/local/lib/libpng.so.4 (0x289fb000)
        libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x28a19000)
        libtiff.so.4 => /usr/local/lib/libtiff.so.4 (0x28a37000)
        libz.so.2 => /usr/lib/libz.so.2 (0x28a78000)
        libm.so.2 => /usr/lib/libm.so.2 (0x28a85000)
        libreadline.so.4 => /usr/lib/libreadline.so.4 (0x28aa0000)
        libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28ac5000)
        libssl.so.1 => /usr/lib/libssl.so.1 (0x28adc000)
        libcrypto.so.1 => /usr/lib/libcrypto.so.1 (0x28b08000)
        libutil.so.3 => /usr/lib/libutil.so.3 (0x28bc5000)
        libstdc++.so.3 => /usr/lib/libstdc++.so.3 (0x28bce000)
>>        libc_r.so.5 => /usr/lib/libc_r.so.5 (0x28c13000)
>>       libc.so.5 => /usr/lib/libc.so.5 (0x28c34000)
        libXThrStub.so.6 => /usr/X11R6/lib/libXThrStub.so.6 (0x28cd1000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x28cd3000)
ldd ntop:
/usr/local/sbin/ntop:
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x2808a000)
        libpcap.so.2 => /usr/lib/libpcap.so.2 (0x280cb000)
        libc_r.so.5 => /usr/lib/libc_r.so.5 (0x280e4000)
        libc.so.5 => /usr/lib/libc.so.5 (0x28105000)


The only thing I couldn't get to build is pgp6
Manfred
==================================
||      null@pozo.com           ||
||      Ph. (415) 681-6235      ||
==================================



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.0.2.1.2.20010124211610.00a7b678>