Problems with libz since libz.so.5 is gone...

Pierre-Luc Drouin pldrouin at pldrouin.net
Mon Jan 30 15:20:55 UTC 2012


On Fri, Jan 27, 2012 at 6:19 PM, Pierre-Luc Drouin <pldrouin at pldrouin.net>wrote:

>
>
> On Fri, Jan 27, 2012 at 11:44 AM, Pierre-Luc Drouin <pldrouin at pldrouin.net
> > wrote:
>
>>
>>
>> On Fri, Jan 27, 2012 at 10:41 AM, Pierre-Luc Drouin <
>> pldrouin at pldrouin.net> wrote:
>>
>>>
>>>
>>> On Fri, Jan 27, 2012 at 9:58 AM, Pierre-Luc Drouin <
>>> pldrouin at pldrouin.net> wrote:
>>>
>>>>
>>>>
>>>> On Fri, Jan 27, 2012 at 9:55 AM, Pierre-Luc Drouin <
>>>> pldrouin at pldrouin.net> wrote:
>>>>
>>>>> On Thu, Jan 26, 2012 at 5:40 PM, Dan Nelson <dnelson at allantgroup.com>wrote:
>>>>>
>>>>>> In the last episode (Jan 26), Pierre-Luc Drouin said:
>>>>>> > so various ports, in particular the java ports, are giving me
>>>>>> headaches
>>>>>> > since /lib/libz.so.5 was replaced by /lib/libz.so.6.  I managed to
>>>>>> update
>>>>>> > most of my ports, but the binary java ports, such as diablo-jdk16,
>>>>>> are now
>>>>>> > installing broken binary files.  Even if I put an entry such as
>>>>>> >
>>>>>> > libz.so.4 libz.so.6
>>>>>> >
>>>>>> > in /etc/libmap.conf
>>>>>>
>>>>>> libmap (or symlinking) only works for libraries that have a
>>>>>> compatible ABI.
>>>>>> The version number of libz was bumped precisely because the ABI
>>>>>> changed :)
>>>>>>
>>>>>> Install the misc/compat8x port to get libz.so.5 back until you can
>>>>>> replace
>>>>>> diablo-jdk16 with openjdk6.
>>>>>>
>>>>>> --
>>>>>>        Dan Nelson
>>>>>>        dnelson at allantgroup.com
>>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> sorry I tried to install compat8x but it did not solve the problem, as
>>>>> that package does not install libz.so.5
>>>>>
>>>>> Thanks
>>>>>
>>>>
>>>> Sorry it did install libz.so.5, but diablo-jdk16 is still crashing for
>>>> some reason...
>>>>
>>>
>>> Ok, so I installed linux-sun-jdk16 that does not seem to get broken by
>>> FreeBSD 9, then I hacked the port Makefile for openjdk16 to bootstrap
>>> itself with linux-sun-jdk16 and so far it seems to be compiling fine...
>>>
>>
>> That solution did ont work either because jni_md.h is missing with
>> linux-sun-jdk16. So now I am trying to compile gcj by hand and use it to
>> bootstrap openjdk. This chicken and egg problem is getting really
>> annoying...
>>
>
> So I discovered that openjdk cannot be bootstrapped with gcj, but then I
> discovered that there was an openjdk6 package available for FreeBSD 9
> (generated on January 15th). I installed it, but event that one does not
> work. I am wondering if the problem is not with vsnprintf instead of libz:
>
>
> ---------------  T H R E A D  ---------------
>
> Current thread (0x2863d800):  JavaThread "Unknown thread" [_thread_in_vm,
> id=100896, stack(0xbf9af000,0xbf9ff000)]
>
> siginfo:si_signo=SIGBUS: si_errno=0, si_code=3 (BUS_OBJERR),
> si_addr=0x2812718c
>
> Registers:
> EAX=0xbf9fddb0, EBX=0x281de884, ECX=0x28c77737, EDX=0xbf9fe5a0
> ESP=0xbf9fdc48, EBP=0xbf9fdd50, ESI=0xbf9fe738, EDI=0x000007d0
> EIP=0x2812718c, EFLAGS=0x00010206
>
> Top of Stack: (sp=0xbf9fdc48)
> 0xbf9fdc48:   bf9fdf44 bf9fe76c bf9fe0f0 2889545e
> 0xbf9fdc58:   bf9fe76c 00000001 00000003 28cd92d4
> 0xbf9fdc68:   00000000 bf9fe76c bf9fe0f0 28bd5b19
> 0xbf9fdc78:   bf9fe76c 000000e1 28cd6108 28cd6208
> 0xbf9fdc88:   0000b7f9 00000000 fffffff8 00000001
> 0xbf9fdc98:   bf9fdefc bf9fdd70 bf9fdd4c 28cd92d4
> 0xbf9fdca8:   28427284 28427270 bf9fdcc0 28c35c73
> 0xbf9fdcb8:   28cd92d4 bf9fdee0 bf9fdcf0 2896d834
>
> Instructions: (pc=0x2812718c)
> 0x2812716c:   90 90 90 90 55 89 e5 53 57 56 81 ec fc 00 00 00
> 0x2812717c:   e8 00 00 00 00 5b 81 c3 03 77 0b 00 66 0f ef c0
> 0x2812718c:   0f 29 45 d8 0f 29 45 c8 0f 29 45 b8 0f 29 45 a8
> 0x2812719c:   0f 29 45 98 0f 29 45 88 0f 29 85 78 ff ff ff 0f
>
> Register to memory mapping:
>
> EAX=0xbf9fddb0 is pointing into the stack for thread: 0x2863d800
> EBX=0x281de884: __nsdefaultsrc+0xd38 in /lib/libc.so.7 at 0x280da000
> ECX=0x28c77737: _ZTV18AdaptiveSizePolicy+0x1b7 in
> /usr/local/openjdk6/jre/lib/i386/client/libjvm.so at 0x28800000
> EDX=0xbf9fe5a0 is pointing into the stack for thread: 0x2863d800
> ESP=0xbf9fdc48 is pointing into the stack for thread: 0x2863d800
> EBP=0xbf9fdd50 is pointing into the stack for thread: 0x2863d800
> ESI=0xbf9fe738 is pointing into the stack for thread: 0x2863d800
> EDI=0x000007d0 is an unknown value
>
>
> Stack: [0xbf9af000,0xbf9ff000],  sp=0xbf9fdc48,  free space=315k
>
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native
> code)
> C  [libc.so.7+0x4d18c]  vsnprintf+0x1c
>
> I compiled FreeBSD (world+kernel) with clang. Is that possible that the
> clang compilation of FreeBSD makes any native JDK (jdk16, openjdk6, etc)
> unusable?
>
> Thanks!
>

So it seems that vsnprintf is indeed broken on FreeBSD 9 when it is built
with clang. I submitted a problem report...


More information about the freebsd-questions mailing list