Re: Build failure while experimenting with LTO

2016-06-27 Thread Davide Italiano
On Sun, Jun 26, 2016 at 6:50 PM, Davide Italiano  wrote:
> On Sun, Jun 26, 2016 at 6:48 PM, Davide Italiano  
> wrote:
>> Hi,
>> I'm experimenting a bit with LTO using clang and lld (the new LLVM linker).
>> I'm able to build a decent fraction of libreoffice if I invoke
>> autogen.sh like this:
>>
>> ./autogen.sh CC=~/work/llvm/build-release/bin/clang
>> CXX=~/work/llvm/build-release/bin/clang++
>> AR=~/work/llvm/build-release/bin/llvm-ar RANLIB=/usr/bin/true
>> LDFLAGS="-fuse-ld=lld" CFLAGS="-flto" CXXFLAGS="-flto" --without-java
>> --without-help --without-myspell-dicts --disable-liblangtag
>> --with-system-curl --with-system-lcms2
>>
>> (please note that as long as I'm using the LLVM tools I don't need
>> plugin(s) as binutils does).
>>
>> I set up my PATH so that ld symlinks to lld.
>>
>> $ ld --version
>> LLD 3.9 (https://llvm.org/svn/llvm-project/lld/trunk 273771)
>>
>> After some librabries/executables are built/linked successfully I hit
>> the following:
>>
>> [build DEP] LNK:Library/libbiblo.so
>> [build LNK] Library/libbiblo.so
>> /home/davide/lto_experiments/libreoffice/external/coinmp/ExternalPackage_coinmp.mk:31:
>> *** file 
>> /home/davide/lto_experiments/libreoffice/workdir/UnpackedTarball/coinmp/Cbc/src/.libs/libCbc.so.3.8.8
>> does not exist in the tarball.  Stop.
>> make[1]: *** Waiting for unfinished jobs
>> Makefile:254: recipe for target 'build' failed
>> make: *** [build] Error 2
>> ```
>>
>> $ find . -name "libCbc.so*"
>> $
>>
>> So I decided to build libCbc by myself going in the correct directory
>> and invoking make:
>>
>> $ cd ./workdir/UnpackedTarball/coinmp/Cbc/ && ./configure && make
>> [...]
>>
>> but still the build fails with the same error.
>> Any ideas why the library is not built? Is this a bug in LLVM or in
>> the build system?
>>
>> As a side note, I'm able to finish successfully a non-LTO build with 
>> clang+lld.
>>
>> Thanks!
>>
>> --
>> Davide
>
> Also, FWIW this is the revision I'm at:
>
> commit 63f15b36f7a196edb20ce7a0aba6f6b3d28dd652
> Author: Ashod Nakashian 
> Date:   Sun Jun 12 22:04:50 2016 -0400
>
> --
> Davide

I refreshed to:

commit 04136c95c5be30004e627f2866fe6ecea60a04f1
Author: Muhammet Kara 
Date:   Fri Jun 17 15:24:19 2016 +0300

Move accessibility relations to .ui files, Part 10: tdf#87026

$ ~/work/llvm/build-release/bin/clang --version
clang version 3.9.0 (trunk 273841) (llvm/trunk 273938)

$ ~/work/llvm/build-release/bin/clang++ --version
clang version 3.9.0 (trunk 273841) (llvm/trunk 273938)

clang is upstream clang + the patch for abi_attribute.

but the problem is still there :( BTW, I think this is related to
clang because I'm able to reproduce without LTO:

$ ./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

[build EPK] fonts_carlito
[build EPK] fonts_dejavu
[build EPK] fonts_gentium
[build EPK] fonts_liberation
[build EPK] fonts_liberation_narrow
[build EPK] fonts_libertineg
[build EPK] fonts_opensans
[build EPK] fonts_ptserif
[build EPK] fonts_sourcecode
[build EPK] fonts_sourcesans
[build UPK] a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
[build MOD] poppler
/home/davide/lto_experiments/libreoffice/external/redland/ExternalPackage_raptor.mk:21:
*** file 
/home/davide/lto_experiments/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2-lo.so.0.0.0
does not exist in the tarball.  Stop.

Any ideas on how to debug this?

Thanks!

--
Davide
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Build failure while experimenting with LTO

2016-06-26 Thread Davide Italiano
On Sun, Jun 26, 2016 at 6:48 PM, Davide Italiano  wrote:
> Hi,
> I'm experimenting a bit with LTO using clang and lld (the new LLVM linker).
> I'm able to build a decent fraction of libreoffice if I invoke
> autogen.sh like this:
>
> ./autogen.sh CC=~/work/llvm/build-release/bin/clang
> CXX=~/work/llvm/build-release/bin/clang++
> AR=~/work/llvm/build-release/bin/llvm-ar RANLIB=/usr/bin/true
> LDFLAGS="-fuse-ld=lld" CFLAGS="-flto" CXXFLAGS="-flto" --without-java
> --without-help --without-myspell-dicts --disable-liblangtag
> --with-system-curl --with-system-lcms2
>
> (please note that as long as I'm using the LLVM tools I don't need
> plugin(s) as binutils does).
>
> I set up my PATH so that ld symlinks to lld.
>
> $ ld --version
> LLD 3.9 (https://llvm.org/svn/llvm-project/lld/trunk 273771)
>
> After some librabries/executables are built/linked successfully I hit
> the following:
>
> [build DEP] LNK:Library/libbiblo.so
> [build LNK] Library/libbiblo.so
> /home/davide/lto_experiments/libreoffice/external/coinmp/ExternalPackage_coinmp.mk:31:
> *** file 
> /home/davide/lto_experiments/libreoffice/workdir/UnpackedTarball/coinmp/Cbc/src/.libs/libCbc.so.3.8.8
> does not exist in the tarball.  Stop.
> make[1]: *** Waiting for unfinished jobs
> Makefile:254: recipe for target 'build' failed
> make: *** [build] Error 2
> ```
>
> $ find . -name "libCbc.so*"
> $
>
> So I decided to build libCbc by myself going in the correct directory
> and invoking make:
>
> $ cd ./workdir/UnpackedTarball/coinmp/Cbc/ && ./configure && make
> [...]
>
> but still the build fails with the same error.
> Any ideas why the library is not built? Is this a bug in LLVM or in
> the build system?
>
> As a side note, I'm able to finish successfully a non-LTO build with 
> clang+lld.
>
> Thanks!
>
> --
> Davide

Also, FWIW this is the revision I'm at:

commit 63f15b36f7a196edb20ce7a0aba6f6b3d28dd652
Author: Ashod Nakashian 
Date:   Sun Jun 12 22:04:50 2016 -0400

--
Davide
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Build failure while experimenting with LTO

2016-06-26 Thread Davide Italiano
Hi,
I'm experimenting a bit with LTO using clang and lld (the new LLVM linker).
I'm able to build a decent fraction of libreoffice if I invoke
autogen.sh like this:

./autogen.sh CC=~/work/llvm/build-release/bin/clang
CXX=~/work/llvm/build-release/bin/clang++
AR=~/work/llvm/build-release/bin/llvm-ar RANLIB=/usr/bin/true
LDFLAGS="-fuse-ld=lld" CFLAGS="-flto" CXXFLAGS="-flto" --without-java
--without-help --without-myspell-dicts --disable-liblangtag
--with-system-curl --with-system-lcms2

(please note that as long as I'm using the LLVM tools I don't need
plugin(s) as binutils does).

I set up my PATH so that ld symlinks to lld.

$ ld --version
LLD 3.9 (https://llvm.org/svn/llvm-project/lld/trunk 273771)

After some librabries/executables are built/linked successfully I hit
the following:

[build DEP] LNK:Library/libbiblo.so
[build LNK] Library/libbiblo.so
/home/davide/lto_experiments/libreoffice/external/coinmp/ExternalPackage_coinmp.mk:31:
*** file 
/home/davide/lto_experiments/libreoffice/workdir/UnpackedTarball/coinmp/Cbc/src/.libs/libCbc.so.3.8.8
does not exist in the tarball.  Stop.
make[1]: *** Waiting for unfinished jobs
Makefile:254: recipe for target 'build' failed
make: *** [build] Error 2
```

$ find . -name "libCbc.so*"
$

So I decided to build libCbc by myself going in the correct directory
and invoking make:

$ cd ./workdir/UnpackedTarball/coinmp/Cbc/ && ./configure && make
[...]

but still the build fails with the same error.
Any ideas why the library is not built? Is this a bug in LLVM or in
the build system?

As a side note, I'm able to finish successfully a non-LTO build with clang+lld.

Thanks!

--
Davide
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LibreOffice fails to link when built with recent clang

2016-06-20 Thread Davide Italiano
On Mon, Jun 20, 2016 at 1:21 AM, Stephan Bergmann  wrote:
> On 06/20/2016 10:19 AM, Stephan Bergmann wrote:
>>
>> You need the patches from  "[GCC]
>> PR23529 Sema part of attrbute abi_tag support" and
>>  "[GCC] PR23529 Mangler part of attrbute
>> abi_tag support" to make Clang support the abi_tag attribute.
>
>
> (The first one is closed for a while now, so you should already have it
> included in your trunk Clang sources.)

That fixed my problem, thanks! (looking forward to see that patch or a
variation of it committed to clang).

--
Davide
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


LibreOffice fails to link when built with recent clang

2016-06-18 Thread Davide Italiano
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 
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
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice