Ask Your Question

What version of gcc do I need to build LibreOffice?

asked 2015-06-27 02:10:52 +0200

Richard Wordingham gravatar image

updated 2015-08-25 07:50:04 +0200

Alex Kemp gravatar image

I'm using gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) on Ubuntu 12.04. When I pull the latest code from the repository using 'git pull -r' and rerun autogen, make then fails with compiler errors:

[build RDB] scriptproviderforjavascript
In file included from /home/richard_git/libo3/include/rtl/string.hxx:32:0,
                 from /home/richard_git/libo3/include/rtl/ustring.hxx:31,
                 from /home/richard_git/libo3/registry/tools/fileurl.hxx:23,
                 from /home/richard_git/libo3/registry/tools/fileurl.cxx:20:
/home/richard_git/libo3/include/rtl/stringutils.hxx:78:20: sorry, unimplemented: non-static data member initialisers
/home/richard_git/libo3/include/rtl/stringutils.hxx:84:18: error: expected unqualified-id before ‘using’
In file included from /home/richard_git/libo3/registry/tools/fileurl.hxx:23:0,
                 from /home/richard_git/libo3/registry/tools/fileurl.cxx:20:
/home/richard_git/libo3/include/rtl/ustring.hxx: In constructor ‘rtl::OUString::OUString(char)’:
/home/richard_git/libo3/include/rtl/ustring.hxx:170:9: error: type ‘rtl::OUString’ is not a direct base of ‘rtl::OUString’
In file included from /home/richard_git/libo3/registry/tools/fileurl.hxx:23:0,
                 from /home/richard_git/libo3/registry/tools/fileurl.cxx:20:
/home/richard_git/libo3/include/rtl/ustring.hxx: At global scope:
/home/richard_git/libo3/include/rtl/ustring.hxx:2797:14: error: ‘rtl::OUStringLiteral1’ has not been declared
make[1]: *** [/home/richard_git/libo3/workdir/CxxObject/registry/tools/fileurl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [build] Error 2

As the cascade of errors starts with an apology, I assume my problem lies in the choice of compiler.

I run autogen thus:

./ --enable-dbgutil --with-lang='en-GB th' --disable-gtk3 --disable-gstreamer-1-0

I presume I'm building LibreOffice

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2015-06-27 14:13:02 +0200

m.a.riosv gravatar image

Perhaps some help in the official page:

Building on Linux

edit flag offensive delete link more


I couldn't find any mention of gcc version there. LibreOffice Version 4.4.4 builds straightforwardly with gcc 4.6.3, though I should probably examine the compilation logs. I fell asleep watching it compile!

Richard Wordingham gravatar imageRichard Wordingham ( 2015-06-28 11:48:09 +0200 )edit

Then maybe better ask in:

Development ML

m.a.riosv gravatar imagem.a.riosv ( 2015-06-28 12:45:57 +0200 )edit

There are debugger issues. The version of gdb, on Ubuntu 12.04, is 7.4, and it doesn't work with the default settings of g++ 4.8 - symbols are not available for local variables. There's a discussion of solutions at . I've installed gdb Version 7.6.2 straight from GNU and it seems to be working. I've made it the version for /usr/bin/gdb.

Richard Wordingham gravatar imageRichard Wordingham ( 2015-10-11 15:25:45 +0200 )edit

answered 2015-10-10 12:20:19 +0200

Richard Wordingham gravatar image

The Ubuntu tarball for LibreOffice builds with gcc 4.6.3 and g++ 4.6.4.

I've asked on the development list. From some point beyond, a later version is required. Currently at least Version 4.7 is required, though it is likely that Version 4.8 may soon be needed. Instructions for installation in Ubuntu 12.04 (Precise) may be found at . Remember also to install g++-4.8, in exactly the same manner.

I haven't checked for debugger compatibility issues.

One doesn't have to make them the default compiler version. One can ensure that environmental variables CC and CXX are set to specify the compilers when running autogen, e.g. my latest command

CC=/usr/bin/gcc-4.8 CXX=/usr/bin/g++-4.8 ./ --enable-dbgutil --with-lang='en-GB th' --disable-gtk3 --disable-gstreamer-1-0

The same will apply to running configure.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-06-27 02:10:52 +0200

Seen: 577 times

Last updated: Oct 10 '15