[devel] Re: I: how does dlsym work

Alexey Tourbin =?iso-8859-1?q?at_=CE=C1_altlinux=2Eru?=
Сб Мар 19 00:31:42 MSK 2005


On Mon, Feb 14, 2005 at 03:43:35PM +0300, Dmitry V. Levin wrote:
> Познавательное чтение для тех, кто пишет разные обёртки:
> http://sources.redhat.com/ml/libc-alpha/2005-02/msg00054.html                                                
> и далее по треду.

Есть такая беда.

:r ~/RPM/SOURCES/perl-5.8.6-alt-rh-threads-lpthread.patch
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=101767

At least following libraries:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/auto/threads/threads.so
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/auto/threads/shared/shared.so
were not linked against -lpthread, even though they are using pthread_*
functions provided only by libpthread.
This results in the symbols being non-versioned, and thus
pthread_create на GLIBC_2.0 being called instead of the expected
pthread_create@@GLIBC_2.1

--- perl-5.8.6/ext/threads/Makefile.PL~	2003-04-03 06:08:54 +0000
+++ perl-5.8.6/ext/threads/Makefile.PL	2004-12-11 02:03:13 +0000
@@ -10,7 +10,7 @@ WriteMakefile(
       (ABSTRACT_FROM => 'threads.pm', # retrieve abstract from module
        AUTHOR     => 'Artur Bergman  <artur на contiller.se>') : ()),
     'MAN3PODS'		=> {},  # Pods will be built by installman
-    'LIBS'		=> [''], # e.g., '-lm'
+    'LIBS'		=> [ '-lpthread' ], # e.g., '-lm'
     'DEFINE'		=> '', # e.g., '-DHAVE_SOMETHING'
 	# Insert -I. if you add *.h files later:
 #    'INC'		=> '', # e.g., '-I/usr/include/other'
--- perl-5.8.6/ext/threads/shared/Makefile.PL~	2002-07-12 22:17:07 +0000
+++ perl-5.8.6/ext/threads/shared/Makefile.PL	2004-12-11 02:03:08 +0000
@@ -13,7 +13,7 @@ WriteMakefile(
       (ABSTRACT_FROM => 'shared.pm', # retrieve abstract from module
        AUTHOR     => 'Arthur Bergman <arthur на contiller.se>') : ()),
     'MAN3PODS'		=> {},  # Pods will be built by installman
-    'LIBS'		=> [''], # e.g., '-lm'
+    'LIBS'		=> [ '-lpthread' ], # e.g., '-lm'
     'DEFINE'		=> '', # e.g., '-DHAVE_SOMETHING'
 	# Insert -I. if you add *.h files later:
     'INC'		=> '', # e.g., '-I/usr/include/other'


> -- 
> ldv
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип     : application/pgp-signature
Размер  : 189 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20050319/7d3e7e33/attachment-0001.bin>


Подробная информация о списке рассылки Devel