[tlbuild] icu build fails on FreeBSD-5/i386: problem with pthread lib?
Nikola Lečić
nikola.lecic at anthesphoria.net
Tue Mar 23 18:18:20 CET 2010
Hello,
libs/icu (r17501) fails to build on oldish FreeBSD-5, on i386 only,
development tree only. amd64 is ok, TL2009 sources are ok too.
It fails because binaries generated during build segfault (at various
occasions makeconv, gennames, genrb...), like this:
--------------------------------- >8 ---------------------------------
[root at 5stable32:/root/TL-Work-17501/libs/icu/icu-build/data]#
[...]
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -c -d ./out/build/icudt42l /root/TeXLive-Devel/trunk/Build/source/libs/icu/icu-4.2.1/data/mappings/ibm-852_P100-1995.ucm
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -c -d ./out/build/icudt42l /root/TeXLive-Devel/trunk/Build/source/libs/icu/icu-4.2.1/data/mappings/ibm-855_P100-1995.ucm
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -c -d ./out/build/icudt42l /root/TeXLive-Devel/trunk/Build/source/libs/icu/icu-4.2.1/data/mappings/ibm-856_P100-1995.ucm
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH ../bin/makeconv -c -d ./out/build/icudt42l /root/TeXLive-Devel/trunk/Build/source/libs/icu/icu-4.2.1/data/mappings/ibm-857_P100-1995.ucm
Segmentation fault (core dumped)
--------------------------------- >8 ---------------------------------
The problem seems to be related to libpthread and all icu binaries are
linked against it. Please find ldd info and gdb output against
makeconv.core, gennames.core and genrb.core below.
However, as far as I understand, icu components are not supposed to be
linked against any threading library, according to the comment in the
Build script. If that idea covers binaries as well, it does not happen
on FreeBSD.
(Anyway, any use of -lpthread is incorrect on FreeBSD; -pthread should
be use instead. The official port (devel/icu4) treats icu sources like
this:
1. patches config/mh-bsd-gcc to use PTHREAD_CFLAGS as THREADSCPPFLAGS,
which defaults to nothing, e.g. -D_REENTRANT is removed;
2. patches runConfigureICU like this:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/icu4/files/patch-cc-flags?rev=1.2;content-type=text%2Fx-cvsweb-markup
3. use '--enable-threads=no' or '--enable-weak-threads' depending on
user's settings.)
What can be done here? Is linking to pthread lib necessary or
intentional?
--------------------------------- >8 ---------------------------------
[root at 5stable32:/root/TL-Work-17501/libs/icu/icu-build/data]# ldd
../bin/makeconv
../bin/makeconv:
libpthread.so.1 => /usr/lib/libpthread.so.1 (0x281f8000)
libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x2821c000)
libm.so.3 => /lib/libm.so.3 (0x282ee000)
libc.so.5 => /lib/libc.so.5 (0x28309000)
--------------------------------- >8 ---------------------------------
--------------------------------- >8 ---------------------------------
[root at 5stable32:/root/TL-Work-17501/libs/icu/icu-build/data]# gdb ../../icu-build/bin/makeconv makeconv.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `makeconv'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/lib/libstdc++.so.4...done.
Loaded symbols for /usr/lib/libstdc++.so.4
Reading symbols from /lib/libm.so.3...done.
Loaded symbols for /lib/libm.so.3
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x28209a40 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
(gdb) bt
#0 0x28209a40 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
#1 0x282c66c5 in __deregister_frame_info_bases () from /usr/lib/libstdc++.so.4
#2 0x282c67a3 in __deregister_frame_info () from /usr/lib/libstdc++.so.4
#3 0x08049b46 in __do_global_dtors_aux ()
#4 0x08173b00 in _fini ()
#5 0x00000001 in ?? ()
#6 0xffffd914 in ?? ()
#7 0x281d3cb6 in rlock_release () from /libexec/ld-elf.so.1
#8 0x283bff9a in exit () from /lib/libc.so.5
#9 0x08049afe in _start ()
#10 0x00000005 in ?? ()
(gdb) bt full
#0 0x28209a40 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
No symbol table info available.
#1 0x282c66c5 in __deregister_frame_info_bases () from /usr/lib/libstdc++.so.4
No symbol table info available.
#2 0x282c67a3 in __deregister_frame_info () from /usr/lib/libstdc++.so.4
No symbol table info available.
#3 0x08049b46 in __do_global_dtors_aux ()
No symbol table info available.
#4 0x08173b00 in _fini ()
No symbol table info available.
#5 0x00000001 in ?? ()
No symbol table info available.
#6 0xffffd914 in ?? ()
No symbol table info available.
#7 0x281d3cb6 in rlock_release () from /libexec/ld-elf.so.1
No symbol table info available.
#8 0x283bff9a in exit () from /lib/libc.so.5
No symbol table info available.
#9 0x08049afe in _start ()
No symbol table info available.
#10 0x00000005 in ?? ()
No symbol table info available.
(gdb)
--------------------------------- >8 ---------------------------------
--------------------------------- >8 ---------------------------------
[root at 5stable32:/root/TL-Work-17501/libs/icu/icu-build/data]# ldd ../bin/gennames
../bin/gennames:
libpthread.so.1 => /usr/lib/libpthread.so.1 (0x28086000)
libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x280aa000)
libm.so.3 => /lib/libm.so.3 (0x2817c000)
libc.so.5 => /lib/libc.so.5 (0x28197000)
--------------------------------- >8 ---------------------------------
--------------------------------- >8 ---------------------------------
[root at 5stable32:/root/TL-Work-17501/libs/icu/icu-build/data]# gdb ../../icu-build/bin/gennames gennames.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `gennames'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/lib/libstdc++.so.4...done.
Loaded symbols for /usr/lib/libstdc++.so.4
Reading symbols from /lib/libm.so.3...done.
Loaded symbols for /lib/libm.so.3
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x28097a40 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
(gdb) bt
#0 0x28097a40 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
#1 0x0804de81 in u_cleanup_4_2 ()
at /root/TeXLive-Devel/trunk/Build/source/libs/icu/icu-4.2.1/common/uinit.c:41
#2 0x0804a9a9 in main (argc=7992, argv=0xffffd764)
at /root/TeXLive-Devel/trunk/Build/source/libs/icu/icu-4.2.1/tools/gennames/gennames.c:436
(gdb) bt full
#0 0x28097a40 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
No symbol table info available.
#1 0x0804de81 in u_cleanup_4_2 ()
at /root/TeXLive-Devel/trunk/Build/source/libs/icu/icu-4.2.1/common/uinit.c:41
No locals.
#2 0x0804a9a9 in main (argc=7992, argv=0xffffd764)
at /root/TeXLive-Devel/trunk/Build/source/libs/icu/icu-4.2.1/tools/gennames/gennames.c:436
version = "\005\001\000"
moreOptions = {storeNames = 1 '\001', store10Names = 1 '\001',
storeISOComments = 1 '\001'}
errorCode = U_FILE_ACCESS_ERROR
(gdb)
--------------------------------- >8 ---------------------------------
--------------------------------- >8 ---------------------------------
[root at 5stable32:/root/TL-Work-17501/libs/icu-build/data]# gdb ../bin/genrb genrb.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-marcel-freebsd"...
Core was generated by `genrb'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/lib/libstdc++.so.4...done.
Loaded symbols for /usr/lib/libstdc++.so.4
Reading symbols from /lib/libm.so.3...done.
Loaded symbols for /lib/libm.so.3
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x2823ba40 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
(gdb) bt
#0 0x2823ba40 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
#1 0x282f86c5 in __deregister_frame_info_bases () from /usr/lib/libstdc++.so.4
#2 0x282f87a3 in __deregister_frame_info () from /usr/lib/libstdc++.so.4
#3 0x08049b7a in __do_global_dtors_aux ()
#4 0x081a3a34 in _fini ()
#5 0x00000001 in ?? ()
#6 0xffffd804 in ?? ()
#7 0x28205cb6 in rlock_release () from /libexec/ld-elf.so.1
#8 0x283f1f9a in exit () from /lib/libc.so.5
#9 0x08049b32 in _start ()
#10 0x00000009 in ?? ()
(gdb) bt full
#0 0x2823ba40 in pthread_mutex_lock () from /usr/lib/libpthread.so.1
No symbol table info available.
#1 0x282f86c5 in __deregister_frame_info_bases () from
/usr/lib/libstdc++.so.4
No symbol table info available.
#2 0x282f87a3 in __deregister_frame_info () from
/usr/lib/libstdc++.so.4
No symbol table info available.
#3 0x08049b7a in __do_global_dtors_aux ()
No symbol table info available.
#4 0x081a3a34 in _fini ()
No symbol table info available.
#5 0x00000001 in ?? ()
No symbol table info available.
#6 0xffffd804 in ?? ()
No symbol table info available.
#7 0x28205cb6 in rlock_release () from /libexec/ld-elf.so.1
No symbol table info available.
#8 0x283f1f9a in exit () from /lib/libc.so.5
No symbol table info available.
#9 0x08049b32 in _start ()
No symbol table info available.
#10 0x00000009 in ?? ()
No symbol table info available.
(gdb)
--------------------------------- >8 ---------------------------------
Best wishes,
--
Nikola Lečić = Никола Лечић
fingerprint : FEF3 66AF C90E EDC3 D878 7CDC 956D F4AB A377 1C9B
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 314 bytes
Desc: not available
URL: <http://tug.org/pipermail/tlbuild/attachments/20100323/8cb70ede/attachment.bin>
More information about the tlbuild
mailing list