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: 1049
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: 102
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: 102
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.
User avatar
None1975
 
Posts: 901
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: 10321
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: Foliate 1.5.3, Minitube 3.1, wine-staging 4.12, Virtual Box 5.2.32 & 6.0.10, Pale Moon 28.6.1, Waterfox 56.2.12
User avatar
stevepusser
 
Posts: 11007
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: 102
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: Foliate 1.5.3, Minitube 3.1, wine-staging 4.12, Virtual Box 5.2.32 & 6.0.10, Pale Moon 28.6.1, Waterfox 56.2.12
User avatar
stevepusser
 
Posts: 11007
Joined: 2009-10-06 05:53

Re: Installing gcc7 or higher?

Postby Scorpion » 2019-06-22 07:23

Is the sid version fine? Is this https://packages.debian.org/sid/gcc-8?

You can do a backup with timeshift https://github.com/teejee2008/timeshift and then install it from sid.
Add the sid source install gcc and remove the sid source.

I did it for the nvidia-driver package.
User avatar
Scorpion
 
Posts: 123
Joined: 2018-10-17 11:38

Re: Installing gcc7 or higher?

Postby Head_on_a_Stick » 2019-06-22 15:56

Scorpion wrote:I did it for the nvidia-driver package.

Why?

https://packages.debian.org/stretch-bac ... dia-driver
User avatar
Head_on_a_Stick
 
Posts: 10321
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Installing gcc7 or higher?

Postby Wheelerof4te » 2019-06-22 16:50

Upgrading gcc to a new major version is very risky and it is not recommended in a stable, point-release distro.
If you do that, the entire premise (and promise) of ABI and API stability is thrown out of the window.
Wheelerof4te
 
Posts: 1418
Joined: 2015-08-30 20:14

Re: Installing gcc7 or higher?

Postby stevepusser » 2019-06-22 18:10

I did manage to backport Buster's gcc-8 release to Stretch for the Experimental MX repository, but, like Debian, I had to build several intemediate gcc-7 and gcc-8 releases in between in order to build the final version. I also had to follow a README in the debian folder to build only the binary packages first in the order listed, then use those binary packages to then build the arch-independent ones. But it worked out in the end, and I was able to build and install iridium-browser with it where the gcc-6 builds fail. gcc-6 remains the default gcc even if you install gcc-8, so I have to export some environment variables in the iridium rules file to make sure that the build uses gcc-8 instead. http://mxrepo.com/mx/experimental/pool/test/g/

That said, I'm still not convinced that LibreOffice really needs a newer gcc, though Iridium really seems to.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Foliate 1.5.3, Minitube 3.1, wine-staging 4.12, Virtual Box 5.2.32 & 6.0.10, Pale Moon 28.6.1, Waterfox 56.2.12
User avatar
stevepusser
 
Posts: 11007
Joined: 2009-10-06 05:53

Re: Installing gcc7 or higher?

Postby Scorpion » 2019-06-23 06:35

Head_on_a_Stick wrote:
Scorpion wrote:I did it for the nvidia-driver package.

Why?

https://packages.debian.org/stretch-bac ... dia-driver

I did it some time ago when the stretch-backports was the 410.

Is only some day since the 418 has been released right?
Nice!
User avatar
Scorpion
 
Posts: 123
Joined: 2018-10-17 11:38

Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable