Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jul 2012 16:15:51 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Warren Block <wblock@wonkity.com>
Cc:        Baptiste Daroussin <bapt@freebsd.org>, Dimitry Andric <dim@freebsd.org>, Olivier Smedts <olivier@gid0.org>, freebsd-ports@freebsd.org, Leslie Jensen <leslie@eskk.nu>, Peter Jeremy <peter@rulingia.com>
Subject:   Re: make failed for editors/libreoffice
Message-ID:  <500081F7.800@FreeBSD.org>
In-Reply-To: <alpine.BSF.2.00.1207130432340.52617@wonkity.com>
References:  <4FF15A89.3000204@eskk.nu> <4FF2E349.5000202@FreeBSD.org> <20120704191351.GB70705@server.rulingia.com> <4FF49F51.8070600@FreeBSD.org> <4FFBD734.5030909@FreeBSD.org> <4FFFE2B7.7040303@FreeBSD.org> <CABzXLYMqH4Oo7PbYNhusOOTTcrHuB%2Bb5Z=Z8Kgs08hf1K_MV-Q@mail.gmail.com> <20120713102704.GF49382@ithaqua.etoilebsd.net> <alpine.BSF.2.00.1207130432340.52617@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2012-07-13 06:39:08 -0400, Warren Block wrote:
> On Fri, 13 Jul 2012, Baptiste Daroussin wrote:
> 
>> On Fri, Jul 13, 2012 at 12:10:25PM +0200, Olivier Smedts wrote:
>>> 2012/7/13 Dimitry Andric <dim@freebsd.org>:
>>>> On 2012-07-10 09:18, Dimitry Andric wrote: ...
>>>>> It turned out this particular bug was yet another issue,
>>>>> but it was fixed by upstream now.  I have a patch ready for
>>>>> -CURRENT, but if anyone can try it out, and confirm it now
>>>>> allows you to build LibreOffice without this particular
>>>>> assertion, that would be great. :)
>>>>> 
>>>>> Apply attached patch to your src tree, then build and
>>>>> install clang as follows (or just do a
>>>>> buildworld/installworld, if you have CPU to spare):
>>>>> 
>>>>> make -C /usr/src/lib/clang all make -C
>>>>> /usr/src/usr.bin/clang/clang all install
>>>>> 
>>>>> Then retry building the LibreOffice port.  Any feedback
>>>>> appreciated!
>>>> 
>>>> Did anybody try this yet?  Unfortunately I don't have the
>>>> resources to build LibreOffice, so I cannot verify whether
>>>> the fix I posted actually works.
>>> 
>>> Yes, this works. Libreoffice 3.5.4 builds and installs at the
>>> first try with the clang assert patch and WITH_SYSTEM_CLANG.
>>> 
>>> Now Calc core dumps at me whereas it was working fine with
>>> 3.5.2, but I think that's another problem.
>> 
>> Building with clang from ports on 9.0 amd64 and i386 (my
>> desktops), I try calc and it works, could the segfault be related
>> to the fix?
> 
> With the patch and base clang/llvm on two amd64 systems here, 
> 'libreoffice --calc' shows the startup screen, then exits with
> status 139.  No core dump or anything, it just quits.  Other
> modules all seem to work.

% env
LD_LIBRARY_PATH=/usr/local/lib/libreoffice/program:/usr/local/lib/libreoffice/ure-link/lib
ktrace -i /usr/local/lib/libreoffice/program/oosplash --calc

<--- Loops forever, killed with "killall -9 soffice.bin".

% kdump | more
...
 29624 soffice.bin CALL  lstat(0x816a6a3d8,0x7fffffff9638)
 29624 soffice.bin NAMI
"/usr/local/lib/libreoffice/program/../program/addin/.keep"
 29624 soffice.bin STRU  struct stat {dev=138, ino=14534033,
mode=-rw-r--r-- , nlink=1, uid=0, gid=0, rdev=0, atime=1342023328,
stime=1342023328, ctime=1342023330, birthtime=1342023328, size=0,
blksize=16384, blocks=0, flags=0x0 }
 29624 soffice.bin RET   lstat 0
 29624 soffice.bin CALL  open(0x80c7ec900,0<O_RDONLY>,<unused>0x3a)
 29624 soffice.bin NAMI
"/usr/local/lib/libreoffice/program/../program/addin/.keep"
 29624 soffice.bin RET   open 32/0x20
 29624 soffice.bin CALL  fstat(0x20,0x7fffffff9fe0)
 29624 soffice.bin STRU  struct stat {dev=138, ino=14534033,
mode=-rw-r--r-- , nlink=1, uid=0, gid=0, rdev=0, atime=1342023328,
stime=1342023328, ctime=1342023330, birthtime=1342023328, size=0,
blksize=16384, blocks=0, flags=0x0 }
 29624 soffice.bin RET   fstat 0
 29624 soffice.bin CALL  fstatfs(0x20,0x7fffffff9e00)
 29624 soffice.bin RET   fstatfs 0
 29624 soffice.bin CALL
mmap(0,0x1000,0x1<PROT_READ>,0x40002<MAP_PRIVATE>,0x20,0)
 29624 soffice.bin RET   mmap 34699472896/0x8143ff000
 29624 soffice.bin PSIG  SIGSEGV caught handler=0x800a85130 mask=0x0
code=0x2
 29624 soffice.bin CALL  sigprocmask(SIG_SETMASK,0x7fffffff985c,0)
 29624 soffice.bin RET   sigprocmask 0
 29624 soffice.bin CALL  _umtx_op(0x800c9b280,0xc,0,0,0)
 29624 soffice.bin RET   poll 0
 29624 soffice.bin CALL  gettimeofday(0x7fffff1f8e80,0)
 29624 soffice.bin RET   gettimeofday 0
 29624 soffice.bin CALL  read(0x1c,0x816a3802c,0x1000)
 29624 soffice.bin RET   read -1 errno 35 Resource temporarily unavailable
 29624 soffice.bin CALL  poll(0x7fffff1f8e18,0x1,0x3e8)
 29624 soffice.bin RET   poll 0
 29624 soffice.bin CALL  gettimeofday(0x7fffff1f8e80,0)
 29624 soffice.bin RET   gettimeofday 0
 29624 soffice.bin CALL  read(0x1c,0x816a3802c,0x1000)
 29624 soffice.bin RET   read -1 errno 35 Resource temporarily unavailable
 29624 soffice.bin CALL  poll(0x7fffff1f8e18,0x1,0x3e8)
 29623 oosplash RET   _umtx_op -1 errno 60 Operation timed out
 29623 oosplash CALL  gettimeofday(0x7fffffbfdf88,0)
 29623 oosplash RET   gettimeofday 0
 29623 oosplash CALL  _umtx_op(0x800628008,0xf,0,0x18,0x7fffffbfdee0)
 29624 soffice.bin RET   poll 0
 29624 soffice.bin CALL  gettimeofday(0x7fffff1f8e80,0)
 29624 soffice.bin RET   gettimeofday 0
 29624 soffice.bin CALL  read(0x1c,0x816a3802c,0x1000)
 29624 soffice.bin RET   read -1 errno 35 Resource temporarily unavailable
...

It is mmap'ing an empty file and that's the root cause.  Try move
${LOCALBASE}/lib/libreoffice/program/addin/.keep away and try again, e.g.,

	mv ${LOCALBASE}/lib/libreoffice/program/addin/.keep /tmp

At least, it worked for me. :-)

I'll do a proper fix if it works for everyone.

Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAAgfcACgkQmlay1b9qnVOMBACeIqo6yZ6H8kHFDd4QevGN+qnO
xRcAnAqQ/l7+NGUhCoha+jg8udLxqkHk
=/tGx
-----END PGP SIGNATURE-----



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