Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Installing gcc7 or higher?

Programming languages, Coding, Executables, Package Creation, and Scripting.
Message
Author
PippoPagliaccio
Posts: 2
Joined: 2019-05-08 06:53

Installing gcc7 or higher?

#1 Post by PippoPagliaccio »

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.

User avatar
Ardouos
Posts: 1075
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: Installing gcc7 or higher?

#2 Post by Ardouos »

You don't, not without breakage.

Why compile LibreOffice anyway?
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

PippoPagliaccio
Posts: 2
Joined: 2019-05-08 06:53

Re: Installing gcc7 or higher?

#3 Post by PippoPagliaccio »

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.

neuraleskimo
Posts: 195
Joined: 2019-03-12 23:26

Re: Installing gcc7 or higher?

#4 Post by neuraleskimo »

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.

neuraleskimo
Posts: 195
Joined: 2019-03-12 23:26

Re: Installing gcc7 or higher?

#5 Post by neuraleskimo »

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
None1975
df -h | participant
df -h | participant
Posts: 1389
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 66 times

Re: Installing gcc7 or higher?

#6 Post by None1975 »

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 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Installing gcc7 or higher?

#7 Post by Head_on_a_Stick »

PippoPagliaccio wrote:How can i install it on my system?
http://forums.debian.net/viewtopic.php?f=16&t=129390
deadbang

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Installing gcc7 or higher?

#8 Post by stevepusser »

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],
MX Linux packager and developer

neuraleskimo
Posts: 195
Joined: 2019-03-12 23:26

Re: Installing gcc7 or higher?

#9 Post by neuraleskimo »

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
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Installing gcc7 or higher?

#10 Post by stevepusser »

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
MX Linux packager and developer

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Installing gcc7 or higher?

#11 Post by Scorpion »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Installing gcc7 or higher?

#12 Post by Head_on_a_Stick »

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

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

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Installing gcc7 or higher?

#13 Post by Wheelerof4te »

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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Installing gcc7 or higher?

#14 Post by stevepusser »

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.
MX Linux packager and developer

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Installing gcc7 or higher?

#15 Post by Scorpion »

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
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Installing gcc7 or higher?

#16 Post by stevepusser »

The nvidia drivers only complain about missing gcc-8 if you're using a non-standard kernel for your Debian release that was compiled against gcc-8.
MX Linux packager and developer

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Installing gcc7 or higher?

#17 Post by Scorpion »

stevepusser wrote:The nvidia drivers only complain about missing gcc-8 if you're using a non-standard kernel for your Debian release that was compiled against gcc-8.
If this is referred to me I did not have any problem with nvidia-driver and gcc.

I just wanted to install the 418 because the 410 is not enough for some latest game, 4K and dxvk.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Installing gcc7 or higher?

#18 Post by stevepusser »

Scorpion wrote:
stevepusser wrote:The nvidia drivers only complain about missing gcc-8 if you're using a non-standard kernel for your Debian release that was compiled against gcc-8.
If this is referred to me I did not have any problem with nvidia-driver and gcc.

I just wanted to install the 418 because the 410 is not enough for some latest game, 4K and dxvk.
418.74 is in stretch-backports. If it wasn't at that time, the correct procedure would have been to backport it yourself--it's very simple. Upgrading gcc should be the very, very, very, very last thing you should ever try, not the first.
MX Linux packager and developer

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Installing gcc7 or higher?

#19 Post by Scorpion »

How can I backport it myself?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Installing gcc7 or higher?

#20 Post by Head_on_a_Stick »

https://wiki.debian.org/SimpleBackportCreation

It would have been quicker to use a search engine...
deadbang

Post Reply