Bug 187177

Summary: editors/libreoffice: c++: error: unable to execute command: Abort trap
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: FreeBSD Office Team <office>
Status: Closed Feedback Timeout    
Severity: Affects Only Me CC: miwi
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description O. Hartmann 2014-03-01 12:20:00 UTC
On all FreeBSD 11.0-CURRENT boxes with editors/libreoffice installed, the update of the port fails due to the error below. The ports tree is up to date according instructions given in UPDATING.

Affected systems are all most recent 11.0-CURRENT with CLANG 3.4.

[...]
Broken module found, compilation aborted!
Stack dump:
0.      Program arguments: /usr/bin/c++ -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj -disable-free -main-file-name misc.cxx -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu corei7-avx -coverage-file /usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/CxxObject/linguistic/source/misc.o -resource-dir /usr/bin/../lib/clang/3.4 -D CPPU_ENV=gcc3 -D FREEBSD -D LIBO_INTERNAL_ONLY -D NDEBUG -D OPTIMIZE -D OSL_DEBUG_LEVEL=0 -D SOLAR_JAVA -D SUPD=410 -D UNIX -D UNX -D X86_64 -D _PTHREADS -D _REENTRANT -D RTL_USING -D LNG_DLLIMPLEMENTATION -D HAVE_GCC_VISIBILITY_FEATURE -D LDAP_DEPRECATED -D EXCEPTIONS_ON -D LDAP_DEPRECATED -I /usr/local/include -I /usr/local/include -I /usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3/linguistic/source/ -I /usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3/include -I /usr/ports/editors/libreoffice/work/solver/unxfbsd.pro/inc/external -I /usr/ports/editors
 /libreoffice/work/solver/unxfbsd.pro/inc -I /usr/local/openjdk6/include -I /usr/local/openjdk6/include/freebsd -I /usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3/config_host -I /usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3/linguistic/inc -I /usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/UnoApiHeadersTarget/udkapi/normal -I /usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/UnoApiHeadersTarget/offapi/normal -I /usr/local/include -internal-isystem /usr/include/c++/v1 -O3 -Wall -Wendif-labels -Wextra -Wundef -Wunused-macros -Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wno-deprecated-declarations -std=gnu++0x -fdeprecated-macro -fdebug-compilation-dir /usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3 -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -fvisibility-inlines-hidden -stack-protector 1 -mstackrealign -fno-threadsafe-statics -fobjc-runtime=gnustep -fcxx-exceptions -fexceptions -fno-common -fdiagnostics-show-option -f
 color-diagnostics -vectorize-loops -vectoriz!
 e-slp -o /usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/CxxObject/linguistic/source/misc.o -x c++ /usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3/linguistic/source/misc.cxx 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '/usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3/linguistic/source/misc.cxx'.
4.      Running pass 'Module Verifier' on function '@_ZN10linguistic11LevDistanceERKN3rtl8OUStringES3_'
c++: error: unable to execute command: Abort trap
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 3.4 (tags/RELEASE_34/final 197956) 20140216
Target: x86_64-unknown-freebsd11.0
Thread model: posix
c++: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
c++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
c++: note: diagnostic msg: /tmp/misc-cd3985.cpp
c++: note: diagnostic msg: /tmp/misc-cd3985.sh
c++: note: diagnostic msg: 

********************
gmake[3]: *** [/usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/CxxObject/linguistic/source/misc.o] Error 254
gmake[3]: *** Waiting for unfinished jobs....
4 warnings generated.
4 warnings generated.
4 warnings generated.
gmake[3]: Leaving directory `/usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3'
gmake[2]: *** [build] Error 2
gmake[2]: Leaving directory `/usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3'
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/editors/libreoffice
*** Error code 1

How-To-Repeat: Update port on most recent 11.0-CURRENT with CLANG 3.4
Comment 1 Edwin Groothuis freebsd_committer 2014-03-01 12:20:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->office

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 O. Hartmann 2014-04-19 13:57:47 UTC
Trying to get this port working on FreeBSD 11.0-CURRENT (now 
FreeBSD 11.0-CURRENT #0 r264674: Sat Apr 19 09:06:36 CEST 2014 amd64)

with USE_GCC=any set in its Makefile ends up in the following error, see below.

The port also miscompiles either with CLANG 3.3/3.4 on FreeBSD 9.2-STABLE as of 18th
April 2014 (CLANG 3.4).




[build CUT] sal_osl_process
Segmentation fault (core dumped)

Error: a unit test failed, please do one of:

export DEBUGCPPUNIT=TRUE            # for exception catching
export GDBCPPUNITTRACE="gdb --args" # for interactive debugging
export VALGRIND=memcheck            # for memory checking

and retry using: make CppunitTest_binaryurp_test-cache

Segmentation fault (core dumped)

Error: a unit test failed, please do one of:

export DEBUGCPPUNIT=TRUE            # for exception catching
export GDBCPPUNITTRACE="gdb --args" # for interactive debugging
export VALGRIND=memcheck            # for memory checking

and retry using: make CppunitTest_o3tl_tests


No core file identified in
directory /usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/CppunitTest/binaryurp_test-cache.test.core
To show backtraces for crashes during test execution, enable core files with:

   ulimit -c unlimited

gmake[4]: ***
[/usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/CppunitTest/binaryurp_test-cache.test]
Error 1 gmake[4]: *** Waiting for unfinished jobs....

No core file identified in
directory /usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/CppunitTest/o3tl_tests.test.core
To show backtraces for crashes during test execution, enable core files with:

   ulimit -c unlimited

gmake[4]: ***
[/usr/ports/editors/libreoffice/work/workdir/unxfbsd.pro/CppunitTest/o3tl_tests.test]
Error 1 gmake[4]: Leaving directory
`/usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3' gmake[3]: *** [build] Error 2
gmake[3]: Leaving directory `/usr/ports/editors/libreoffice/work/libreoffice-4.1.5.3' ***
Error code 2

Stop.
make[2]: stopped in /usr/ports/editors/libreoffice
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/editors/libreoffice
*** Error code 1

Stop.
make: stopped in /usr/ports/editors/libreoffice
Comment 3 Dimitry Andric freebsd_committer 2014-04-20 01:21:15 UTC
Please post or upload compressed versions of the following files which were written by clang when it crashed:

/tmp/misc-cd3985.cpp
/tmp/misc-cd3985.sh

-Dimitry
Comment 4 Dimitry Andric freebsd_committer 2014-04-20 14:58:25 UTC
On 20 Apr 2014, at 10:18, O. Hartmann <ohartman@zedat.fu-berlin.de> wrote:
> On Sun, 20 Apr 2014 02:21:15 +0200
> Dimitry Andric <dim@FreeBSD.org> wrote:
> 
>> Please post or upload compressed versions of the following files which were written by
>> clang when it crashed:
>> 
>> /tmp/misc-cd3985.cpp
>> /tmp/misc-cd3985.sh

...
> According to the error message
> 
> PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> Preprocessed source(s) and associated run script(s) are located at:
> c++: note: diagnostic msg: /usr/ports/editors/libreoffice/work/misc-278e62.cpp
> c++: note: diagnostic msg: /usr/ports/editors/libreoffice/work/misc-278e62.sh
> c++: note: diagnostic msg:
> 
> I attached requested, xz-compressed files as requested.


Okay, I can reproduce the crash with upstream llvm trunk r206071, so I
will take it there for now.  It might take some time to reduce the
testcase to something smaller.

When I have an upstream bug ID, I will post it here for reference.

-Dimitry
Comment 5 O. Hartmann 2014-04-20 16:39:01 UTC
On Sun, 20 Apr 2014 15:58:25 +0200
Dimitry Andric <dim@FreeBSD.org> wrote:

> On 20 Apr 2014, at 10:18, O. Hartmann <ohartman@zedat.fu-berlin.de> wrote:
> > On Sun, 20 Apr 2014 02:21:15 +0200
> > Dimitry Andric <dim@FreeBSD.org> wrote:
> > 
> >> Please post or upload compressed versions of the following files which were written
> >> by clang when it crashed:
> >> 
> >> /tmp/misc-cd3985.cpp
> >> /tmp/misc-cd3985.sh
> ...
> > According to the error message
> > 
> > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> > Preprocessed source(s) and associated run script(s) are located at:
> > c++: note: diagnostic msg: /usr/ports/editors/libreoffice/work/misc-278e62.cpp
> > c++: note: diagnostic msg: /usr/ports/editors/libreoffice/work/misc-278e62.sh
> > c++: note: diagnostic msg:
> > 
> > I attached requested, xz-compressed files as requested.
> 
> Okay, I can reproduce the crash with upstream llvm trunk r206071, so I
> will take it there for now.  It might take some time to reduce the
> testcase to something smaller.
> 
> When I have an upstream bug ID, I will post it here for reference.
> 
> -Dimitry
> 


Thank you very much.

Regards and happy Easter,
Oliver
Comment 6 Dimitry Andric freebsd_committer 2014-04-20 18:39:03 UTC
On 20 Apr 2014, at 17:39, O. Hartmann <ohartman@zedat.fu-berlin.de> wrote:
> On Sun, 20 Apr 2014 15:58:25 +0200
> Dimitry Andric <dim@FreeBSD.org> wrote:
...
>> When I have an upstream bug ID, I will post it here for reference.

Please refer to: http://llvm.org/PR19029

There is an upstream commit that seems to fix it, but I want to verify
it with the author before importing it into FreeBSD.

-Dimitry