Installing gcc7 or higher?

Need help with C, C++, perl, python, etc?

Installing gcc7 or higher?

Postby PippoPagliaccio » 2019-05-08 07:15

Hi everybody,
I'm compiling libre office on SMP Debian 4.9.144-3.1 (2019-02-19)
with gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516.
BUT for compiling is needed gcc 7 (or higher i guess).
How can i install it on my system?
Thanks in advance.
PippoPagliaccio
 
Posts: 2
Joined: 2019-05-08 06:53

Re: Installing gcc7 or higher?

Postby Ardouos » 2019-05-08 07:56

You don't, not without breakage.

Why compile LibreOffice anyway?
User avatar
Ardouos
 
Posts: 1043
Joined: 2013-11-03 00:30
Location: Elicoor II

Re: Installing gcc7 or higher?

Postby PippoPagliaccio » 2019-05-08 08:11

Because i'm installing Libre Office online into an internal company server for create collaborative docs.
That server run debian...
OK it seams the only solutions is to compile on my xubuntu and than move all on my server.
PippoPagliaccio
 
Posts: 2
Joined: 2019-05-08 06:53

Re: Installing gcc7 or higher?

Postby neuraleskimo » 2019-05-08 11:44

PippoPagliaccio wrote:OK it seams the only solutions is to compile on my xubuntu and than move all on my server.

That may (and most likely will) not work. The wisdom behind Ardouos' warning is that the C++ ABI may change between compiler versions. That is also true of many C++ libraries where the authors do not specifically think about having a stable ABI. More specifically, you will be linking against new libraries and running against older libraries. This will most likely fail. However, the other way around will often work in practice, so we tend to forget about that dark and ugly corner of systems integration.
User avatar
neuraleskimo
 
Posts: 71
Joined: 2019-03-12 23:26
Location: Bloomington, Indiana, USA

Re: Installing gcc7 or higher?

Postby neuraleskimo » 2019-05-08 11:48

PippoPagliaccio wrote:BUT for compiling is needed gcc 7 (or higher i guess).
How can i install it on my system?

If LibreOffice will build without errors using Clang, a newer version is available in Debian Backports.
User avatar
neuraleskimo
 
Posts: 71
Joined: 2019-03-12 23:26
Location: Bloomington, Indiana, USA

Re: Installing gcc7 or higher?

Postby None1975 » 2019-05-08 12:41

neuraleskimo wrote:If LibreOffice will build without errors using Clang, a newer version is available in Debian Backports.

Yes, LibreOffice is available n Debian Backports.
OS: Debian Stretch / WM: Spectrwm
Debian Wiki | DontBreakDebian, My config files in github
User avatar
None1975
 
Posts: 854
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: Installing gcc7 or higher?

Postby Head_on_a_Stick » 2019-05-08 17:55

PippoPagliaccio wrote:How can i install it on my system?

viewtopic.php?f=16&t=129390
User avatar
Head_on_a_Stick
 
Posts: 9693
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Installing gcc7 or higher?

Postby stevepusser » 2019-05-08 22:11

None1975 wrote:
neuraleskimo wrote:If LibreOffice will build without errors using Clang, a newer version is available in Debian Backports.

Yes, LibreOffice is available n Debian Backports.


Built without using clang, too. The control file only lists gcc 7 as a build-depend for the uncommon m68k architecture.

Code: Select all
               g++ (>= 4:7) [m68k],
               gcc (>= 4:7) [m68k],
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: FreeCAD 0.18.1, Liquorix kernel 5.0-16, wine-staging 4.8, Virtual Box 5.2.28, Calibre 3.42.0, GIMP 2.10.10
User avatar
stevepusser
 
Posts: 10804
Joined: 2009-10-06 05:53

Re: Installing gcc7 or higher?

Postby neuraleskimo » 2019-05-09 01:37

stevepusser wrote:Built without using clang, too.

Ah, I wasn't saying software in Backports is built with Clang. I was trying to say, but didn't say it clearly, that a more recent version of Clang (6.x if memory serves) is available in Backports.

To summarize for the OP, there are three different suggestions:

1) My suggestion... If you really want to build from source and LibreOffice will build with Clang, then a more recent version is available in Backports.
2) Head_on_a_Stick's suggestion... If you really want to build from source and want/need GCC, then you can install GCC from testing/unstable (using the given instructions).
3) None1975, rightly so, essentially said, "Why bother? A fairly recent version of LibreOffice is already in Backports." I have to admit, I didn't bother looking. :oops:
User avatar
neuraleskimo
 
Posts: 71
Joined: 2019-03-12 23:26
Location: Bloomington, Indiana, USA

Re: Installing gcc7 or higher?

Postby stevepusser » 2019-05-09 03:41

Do the build instructions for the latest 6.2 LibreOffice say it requires gcc-7?

It might be possible to compile and use gcc-7 on Stretch--it doesn't have to be the default gcc--but it seems to be a difficult task. The default gcc on Ubuntu Trusty is 4.8, but I was able to use gcc-5 from the Ubuntu toolchain PPA to build Pale Moon (requires gcc>=4.9 and < 9) in a Trusty schroot with sbuild for the few holdouts still using that old Ubuntu. However, it doesn't seem practicable to port over gcc-7 from their PPA to Stretch--the differences between Debian and Ubuntu really come into play in this case.

https://launchpad.net/~ubuntu-toolchain ... buntu/test
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: FreeCAD 0.18.1, Liquorix kernel 5.0-16, wine-staging 4.8, Virtual Box 5.2.28, Calibre 3.42.0, GIMP 2.10.10
User avatar
stevepusser
 
Posts: 10804
Joined: 2009-10-06 05:53


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable