LibreOffice fails to link when built with recent clang

Davide Italiano dccitaliano at gmail.com
Sat Jun 18 20:28:46 UTC 2016


Hi,
I originally reported this on bugzilla but I was asked to use ML instead.
https://bugs.documentfoundation.org/show_bug.cgi?id=100465
Hope this is the right place.
Please CC: me on future mail as I'm not subscribed on the mailing list.

Openoffice ToT:
commit 63f15b36f7a196edb20ce7a0aba6f6b3d28dd652
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Jun 12 22:04:50 2016 -0400

on Fedora 22
$ uname -a
Linux localhost.localdomain 4.2.3-300.fc23.x86_64 #1 SMP Mon Oct 5
15:42:54 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ ./autogen.sh CC=~/work/llvm/build-release/bin/clang
CXX=~/work/llvm/build-release/bin/clang++ --enable-dbgutil
--without-java --without-help --without-myspell-dicts
[...]

$ make -j24
[...]
[build AIN] base
/home/davide/lto_experiments/libreoffice/workdir/CxxObject/sal/cppunittester/cppunittester.o:
In function `(anonymous
namespace)::LogFailuresAsTheyHappen::printFailureLocation(CppUnit::SourceLine
const&)':
/home/davide/lto_experiments/libreoffice/sal/cppunittester/cppunittester.cxx:160:
undefined reference to `CppUnit::SourceLine::fileName() const'
/home/davide/lto_experiments/libreoffice/workdir/CxxObject/sal/cppunittester/cppunittester.o:
In function `(anonymous
namespace)::LogFailuresAsTheyHappen::printFailureMessage(CppUnit::TestFailure
const&)':
/home/davide/lto_experiments/libreoffice/sal/cppunittester/cppunittester.cxx:170:
undefined reference to `CppUnit::Message::shortDescription() const'
/home/davide/lto_experiments/libreoffice/sal/cppunittester/cppunittester.cxx:171:
undefined reference to `CppUnit::Message::details() const'

Clang Version:
$ ~/work/llvm/build-release/bin/clang++ --version
clang version 3.9.0 (trunk 272933) (llvm/trunk 273027)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/davide/work/llvm/build-release/bin

If I switch back to gcc, I can compile successfully:

$ g++ --version
g++ (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For completeness, I'm linking with ld.bfd:

$ ld --version
GNU ld version 2.25-17.fc23
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

Please let me know if you need any other informations.

Thanks,

--
Davide


More information about the LibreOffice mailing list