Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #196615 > unrolled thread

GCC 7

Started byIrek Szcześniak <irek@irkos.org>
First post2018-06-13 11:00 +0200
Last post2018-06-14 10:10 +0200
Articles 15 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  GCC 7 Irek Szcześniak <irek@irkos.org> - 2018-06-13 11:00 +0200
    Re: GCC 7 <tomas@tuxteam.de> - 2018-06-13 11:30 +0200
      Re: GCC 7 Irek Szcześniak <irek@irkos.org> - 2018-06-13 12:10 +0200
        Re: GCC 7 <tomas@tuxteam.de> - 2018-06-13 12:30 +0200
          Re: GCC 7 Irek Szcześniak <irek@irkos.org> - 2018-06-14 10:50 +0200
            Re: GCC 7 <tomas@tuxteam.de> - 2018-06-14 11:20 +0200
        Re: GCC 7 Don Armstrong <don@debian.org> - 2018-06-13 17:40 +0200
          Re: GCC 7 Irek Szcześniak <irek@irkos.org> - 2018-06-14 10:30 +0200
          Re: GCC 7 <tomas@tuxteam.de> - 2018-06-14 12:50 +0200
            Re: GCC 7 Irek Szcześniak <irek@irkos.org> - 2018-06-14 13:10 +0200
              Re: GCC 7 <tomas@tuxteam.de> - 2018-06-14 14:00 +0200
            Re: GCC 7 Don Armstrong <don@debian.org> - 2018-06-14 17:40 +0200
              Re: GCC 7 <tomas@tuxteam.de> - 2018-06-15 08:10 +0200
    Re: GCC 7 Georgi Naplatanov <gosho@oles.biz> - 2018-06-13 23:50 +0200
      Re: GCC 7 Irek Szcześniak <irek@irkos.org> - 2018-06-14 10:10 +0200

#196615 — GCC 7

FromIrek Szcześniak <irek@irkos.org>
Date2018-06-13 11:00 +0200
SubjectGCC 7
Message-ID<w09Nf-3kF-3@gated-at.bofh.it>
Hi,

I need GCC 7 on my Debian Stretch.  Previously I upgraded my Stretch to 
Testing (Buster), but I ran to some problems, and reinstalled the system 
back to Stretch.

Could someone offer an advice on how to get a working GCC 7 on Debian 
Stretch, without upgrading to Testing?


Thanks & best,
Irek

[toc] | [next] | [standalone]


#196616

From<tomas@tuxteam.de>
Date2018-06-13 11:30 +0200
Message-ID<w0agh-3Jm-1@gated-at.bofh.it>
In reply to#196615
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jun 13, 2018 at 10:04:25AM +0200, Irek Szcześniak wrote:
> Hi,
> 
> I need GCC 7 on my Debian Stretch.  Previously I upgraded my Stretch
> to Testing (Buster), but I ran to some problems, and reinstalled the
> system back to Stretch.
> 
> Could someone offer an advice on how to get a working GCC 7 on
> Debian Stretch, without upgrading to Testing?

Backports would be a place to go. There seem to be others in your
situation:

https://lists.debian.org/debian-gcc/2018/04/msg00137.html

(but I haven't seen an answer to this request in that mailing
list).

Perhaps pinging debian-gcc list is a good idea.

Alternatively, if you just want to build for testing, some
pbuilder (chroot) setup might help, but then your program
might want to link to newer core libraries...

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlsg4hoACgkQBcgs9XrR2kZFiwCeLK2EU23uSBz2rpyW+rHLPfjz
Z8gAn1W7qif93Zdn1f49C4TW3Yex4NsZ
=qVRK
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#196620

FromIrek Szcześniak <irek@irkos.org>
Date2018-06-13 12:10 +0200
Message-ID<w0aSZ-4ba-5@gated-at.bofh.it>
In reply to#196616
Thanks, Tomás, for your email.

I should have written before that I don't want the GCC 7 to be a 
system-wide compiler, along with libraries and some other dependencies. 
I need GCC 7 to compile my own code (C++17) that I run.  I don't need to 
distribute the binaries.

Yes, GCC 7 is not in the backports, so it's not an option.  There might 
be some Debian packages with GCC 7, but I worry about making a 
FrankenDebian, and the ensuing dependency and linking problems.

Thanks for pointing out pbuilder, I think I'll give it a try.  I also 
might want to try virtual containers, but it seems like an overkill.

I might later drop an email to the debian-gcc mailing list.


Best,
Irek

On 13.06.2018 11:21, tomas@tuxteam.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Wed, Jun 13, 2018 at 10:04:25AM +0200, Irek Szcześniak wrote:
>> Hi,
>>
>> I need GCC 7 on my Debian Stretch.  Previously I upgraded my Stretch
>> to Testing (Buster), but I ran to some problems, and reinstalled the
>> system back to Stretch.
>>
>> Could someone offer an advice on how to get a working GCC 7 on
>> Debian Stretch, without upgrading to Testing?
> 
> Backports would be a place to go. There seem to be others in your
> situation:
> 
> https://lists.debian.org/debian-gcc/2018/04/msg00137.html
> 
> (but I haven't seen an answer to this request in that mailing
> list).
> 
> Perhaps pinging debian-gcc list is a good idea.
> 
> Alternatively, if you just want to build for testing, some
> pbuilder (chroot) setup might help, but then your program
> might want to link to newer core libraries...
> 
> Cheers
> - -- tomás
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> 
> iEYEARECAAYFAlsg4hoACgkQBcgs9XrR2kZFiwCeLK2EU23uSBz2rpyW+rHLPfjz
> Z8gAn1W7qif93Zdn1f49C4TW3Yex4NsZ
> =qVRK
> -----END PGP SIGNATURE-----
> 

[toc] | [prev] | [next] | [standalone]


#196624

From<tomas@tuxteam.de>
Date2018-06-13 12:30 +0200
Message-ID<w0bcl-4hf-7@gated-at.bofh.it>
In reply to#196620
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jun 13, 2018 at 12:06:21PM +0200, Irek Szcześniak wrote:
> Thanks, Tomás, for your email.
> 
> I should have written before that I don't want the GCC 7 to be a
> system-wide compiler, along with libraries and some other
> dependencies. I need GCC 7 to compile my own code (C++17) that I
> run.  I don't need to distribute the binaries.

I see. Then pbuilder might well be an option (you might end up
having to run your application in the chroot, but hey).

> Yes, GCC 7 is not in the backports, so it's not an option.  There
> might be some Debian packages with GCC 7, but I worry about making a
> FrankenDebian, and the ensuing dependency and linking problems.

Yeah -- I already mixed a newer version of GCC back then by enabling
testing into a stable and survived it (actually for a year's period,
on my main work machine) but ended up with nearly 100% testing after
a while. FrankenDebian isn't as bad as its reputation, but you want
to watch your step. Aptitude tends to become unusable after a while
(its dependency resolver seems to intelligent to master that much
chaos), but apt-get/apt can cope.

So if you know what you're doing and you are a bit fearless,
FrankenDebian isn't *that* bad. Not recommended for beginners and
those who just want peace with their computers, for sure.

> Thanks for pointing out pbuilder, I think I'll give it a try.  I
> also might want to try virtual containers, but it seems like an
> overkill.
> 
> I might later drop an email to the debian-gcc mailing list.

Yes, perhaps someone gets nudged into backporting (actually you
might try yourself: just download the gcc-7 source package, its
build dependencies (apt-get build-dep) and build away, but gcc
is of course daunting, so you most probably end up shaving
a king-size yak :-)

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlsg7/0ACgkQBcgs9XrR2kZCGgCfajN8v/e4CdGJDWGLuLYGqmxy
Kk0Anim4iK08WHgGK5wn8thy2mpgMH2F
=0/m3
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#196659

FromIrek Szcześniak <irek@irkos.org>
Date2018-06-14 10:50 +0200
Message-ID<w0w78-8I-19@gated-at.bofh.it>
In reply to#196624
Tomás, thank you again for your email.

I didn't finally try pbuilder, because compiling GCC solved my problem. 
If something goes wrong, I'll use schroot.  Thanks for pointing out 
pbuilder, it may come handy one day!


Best,
Irek

On 13.06.2018 12:20, tomas@tuxteam.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Wed, Jun 13, 2018 at 12:06:21PM +0200, Irek Szcześniak wrote:
>> Thanks, Tomás, for your email.
>>
>> I should have written before that I don't want the GCC 7 to be a
>> system-wide compiler, along with libraries and some other
>> dependencies. I need GCC 7 to compile my own code (C++17) that I
>> run.  I don't need to distribute the binaries.
> 
> I see. Then pbuilder might well be an option (you might end up
> having to run your application in the chroot, but hey).
> 
>> Yes, GCC 7 is not in the backports, so it's not an option.  There
>> might be some Debian packages with GCC 7, but I worry about making a
>> FrankenDebian, and the ensuing dependency and linking problems.
> 
> Yeah -- I already mixed a newer version of GCC back then by enabling
> testing into a stable and survived it (actually for a year's period,
> on my main work machine) but ended up with nearly 100% testing after
> a while. FrankenDebian isn't as bad as its reputation, but you want
> to watch your step. Aptitude tends to become unusable after a while
> (its dependency resolver seems to intelligent to master that much
> chaos), but apt-get/apt can cope.
> 
> So if you know what you're doing and you are a bit fearless,
> FrankenDebian isn't *that* bad. Not recommended for beginners and
> those who just want peace with their computers, for sure.
> 
>> Thanks for pointing out pbuilder, I think I'll give it a try.  I
>> also might want to try virtual containers, but it seems like an
>> overkill.
>>
>> I might later drop an email to the debian-gcc mailing list.
> 
> Yes, perhaps someone gets nudged into backporting (actually you
> might try yourself: just download the gcc-7 source package, its
> build dependencies (apt-get build-dep) and build away, but gcc
> is of course daunting, so you most probably end up shaving
> a king-size yak :-)
> 
> Cheers
> - -- tomás
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> 
> iEYEARECAAYFAlsg7/0ACgkQBcgs9XrR2kZCGgCfajN8v/e4CdGJDWGLuLYGqmxy
> Kk0Anim4iK08WHgGK5wn8thy2mpgMH2F
> =0/m3
> -----END PGP SIGNATURE-----
> 

[toc] | [prev] | [next] | [standalone]


#196664

From<tomas@tuxteam.de>
Date2018-06-14 11:20 +0200
Message-ID<w0wA9-yq-3@gated-at.bofh.it>
In reply to#196659
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Jun 14, 2018 at 10:44:59AM +0200, Irek Szcześniak wrote:
> Tomás, thank you again for your email.
> 
> I didn't finally try pbuilder, because compiling GCC solved my
> problem. If something goes wrong, I'll use schroot.  Thanks for
> pointing out pbuilder, it may come handy one day!

Glad you solved it :-)

Collaterally, I learnt about schroot, so thanks for this one as
well.

Cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlsiMsgACgkQBcgs9XrR2kYQhwCfX8Ff3aD+aQpFfMPv0BFyi3cN
9yYAni+0aT9atlDxQ2R/5cTZxuJ3WpK2
=tdPR
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#196638

FromDon Armstrong <don@debian.org>
Date2018-06-13 17:40 +0200
Message-ID<w0g2l-76r-1@gated-at.bofh.it>
In reply to#196620
On Wed, 13 Jun 2018, Irek Szcześniak wrote:
> Thanks for pointing out pbuilder, I think I'll give it a try.  I also might
> want to try virtual containers, but it seems like an overkill.

You might also try out schroot.

Something like:

apt-get install schroot ubuntu-dev-tools;
mk-sbuild unstable;
schroot unstable;

will get you in an unstable chroot which you can use to build packages.
[schroot+sbuild is what Debian developers often use instead of pbuilder,
but either approach works.]

-- 
Don Armstrong                      https://www.donarmstrong.com

The smallest quantity of bread that can be sliced and toasted has yet
to be experimentally determined. In the quantum limit we must
necessarily encounter fundamental toast particles which the author
will unflinchingly designate here as "croutons".
 -- Cser, Jim. Nanotechnology and the Physical Limits of Toastability.
    AIR 1:3, June, 1995.

[toc] | [prev] | [next] | [standalone]


#196658

FromIrek Szcześniak <irek@irkos.org>
Date2018-06-14 10:30 +0200
Message-ID<w0vNL-8tl-3@gated-at.bofh.it>
In reply to#196638
Thank you, Don, for your advice!

I tried schroot, and it's awesome!  I followed the steps on:

https://wiki.debian.org/Schroot

I was able to build my code just as on Buster.  The difference between 
schroot and chroot is that with schroot you have assess to the files 
outside the root directory of chroot (like /srv/chroot/buster), and I'm 
thinking specifically about the home directory.

Thanks!


Best,
Irek

On 13.06.2018 17:37, Don Armstrong wrote:
> On Wed, 13 Jun 2018, Irek Szcześniak wrote:
>> Thanks for pointing out pbuilder, I think I'll give it a try.  I also might
>> want to try virtual containers, but it seems like an overkill.
> 
> You might also try out schroot.
> 
> Something like:
> 
> apt-get install schroot ubuntu-dev-tools;
> mk-sbuild unstable;
> schroot unstable;
> 
> will get you in an unstable chroot which you can use to build packages.
> [schroot+sbuild is what Debian developers often use instead of pbuilder,
> but either approach works.]
> 

[toc] | [prev] | [next] | [standalone]


#196667

From<tomas@tuxteam.de>
Date2018-06-14 12:50 +0200
Message-ID<w0xZf-1hc-1@gated-at.bofh.it>
In reply to#196638
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jun 13, 2018 at 08:37:57AM -0700, Don Armstrong wrote:
> On Wed, 13 Jun 2018, Irek Szcześniak wrote:
> > Thanks for pointing out pbuilder, I think I'll give it a try.  I also might
> > want to try virtual containers, but it seems like an overkill.
> 
> You might also try out schroot.
> 
> Something like:
> 
> apt-get install schroot ubuntu-dev-tools;
> mk-sbuild unstable;
> schroot unstable;
> 
> will get you in an unstable chroot which you can use to build packages.
> [schroot+sbuild is what Debian developers often use instead of pbuilder,
> but either approach works.]

Took out mk-sbuild for a whirl. What I didn't like at all: when you
invoke a command and it goes out and starts installing packages for
you (and doing other assorted sysadmin tasks). 

Pretty heavy-handed, if you ask me. YMMV.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlsiR8sACgkQBcgs9XrR2kYirgCfVtkknb0sQHxAMf26LFWq20PA
2GsAnRB7zxFJQtbUvm/zure+47es9fhx
=jWOu
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#196669

FromIrek Szcześniak <irek@irkos.org>
Date2018-06-14 13:10 +0200
Message-ID<w0yiB-1DH-1@gated-at.bofh.it>
In reply to#196667
I tried schroot in a different way, as described here:

https://wiki.debian.org/Schroot

As part of the process, you install a complete, fresh Buster with:

debootstrap buster /srv/chroot/buster

So this solution is like a container.


Best,
Irek

On 14.06.2018 12:47, tomas@tuxteam.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Wed, Jun 13, 2018 at 08:37:57AM -0700, Don Armstrong wrote:
>> On Wed, 13 Jun 2018, Irek Szcześniak wrote:
>>> Thanks for pointing out pbuilder, I think I'll give it a try.  I also might
>>> want to try virtual containers, but it seems like an overkill.
>>
>> You might also try out schroot.
>>
>> Something like:
>>
>> apt-get install schroot ubuntu-dev-tools;
>> mk-sbuild unstable;
>> schroot unstable;
>>
>> will get you in an unstable chroot which you can use to build packages.
>> [schroot+sbuild is what Debian developers often use instead of pbuilder,
>> but either approach works.]
> 
> Took out mk-sbuild for a whirl. What I didn't like at all: when you
> invoke a command and it goes out and starts installing packages for
> you (and doing other assorted sysadmin tasks).
> 
> Pretty heavy-handed, if you ask me. YMMV.
> 
> Cheers
> - -- tomás
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> 
> iEYEARECAAYFAlsiR8sACgkQBcgs9XrR2kYirgCfVtkknb0sQHxAMf26LFWq20PA
> 2GsAnRB7zxFJQtbUvm/zure+47es9fhx
> =jWOu
> -----END PGP SIGNATURE-----
> 

[toc] | [prev] | [next] | [standalone]


#196671

From<tomas@tuxteam.de>
Date2018-06-14 14:00 +0200
Message-ID<w0z4Z-1VM-5@gated-at.bofh.it>
In reply to#196669
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Jun 14, 2018 at 01:06:27PM +0200, Irek Szcześniak wrote:
> I tried schroot in a different way, as described here:
> 
> https://wiki.debian.org/Schroot
> 
> As part of the process, you install a complete, fresh Buster with:
> 
> debootstrap buster /srv/chroot/buster
> 
> So this solution is like a container.

Yep, that rhymes better with how I tick :-)

Thanks, cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlsiVskACgkQBcgs9XrR2kbRSwCfe3TRYv5PyHweQ/vDeAVjkWrW
UNUAnAukE4rx6kGJNnl/dI7/klbl9Pyk
=h0MJ
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#196678

FromDon Armstrong <don@debian.org>
Date2018-06-14 17:40 +0200
Message-ID<w0CvU-4ea-15@gated-at.bofh.it>
In reply to#196667
On Thu, 14 Jun 2018, tomas@tuxteam.de wrote:
> Took out mk-sbuild for a whirl. What I didn't like at all: when you
> invoke a command and it goes out and starts installing packages for
> you (and doing other assorted sysadmin tasks).

You can do everything that mk-sbuild does for you manually, but when
you're setting up many different sbuild chroots, it makes things much
easier. [And it makes my response much simpler.]

The things that mk-sbuild installs are just sbuild, schroot, and
debootstrap, and possibly lvm2 if you're using lvm chroots; I actually
didn't notice that it even did that because I have all of them
installed. [And really, mk-sbuild *is* a sysadmin tool designed to
automate sysadmin tasks.]


-- 
Don Armstrong                      https://www.donarmstrong.com

"I always tend to assume there's an infinite amount of money out
there." "There might as well be, [...] but most of it gets spent on
pornography, sugar water, and bombs. There is only so much that can be
scraped together for particle accelerators."
 -- Neal Stephenson _Anathem_ p262

[toc] | [prev] | [next] | [standalone]


#196696

From<tomas@tuxteam.de>
Date2018-06-15 08:10 +0200
Message-ID<w0Q5P-4k1-1@gated-at.bofh.it>
In reply to#196678
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Jun 14, 2018 at 08:35:29AM -0700, Don Armstrong wrote:
> On Thu, 14 Jun 2018, tomas@tuxteam.de wrote:
> > Took out mk-sbuild for a whirl. What I didn't like at all: when you
> > invoke a command and it goes out and starts installing packages for
> > you (and doing other assorted sysadmin tasks).
> 
> You can do everything that mk-sbuild does for you manually, but when
> you're setting up many different sbuild chroots, it makes things much
> easier. [And it makes my response much simpler.]

Yes, I understand *why* it is doing it. It just doesn't rhyme very
well with the way I do things.

Pulling in dependencies at install is something I expect (and can
easily check in advance, thanks to the well thought-out Debian
packaging system). Calling "apt-get install" (to my *main* system,
not to the chroot!) from a seemingly unrelated command is something
I... dislike (there were other things I disliked, too).

So this was just a heads-up for others like me. I had a look into
the mk-sbuild script and decided to purge ubuntu-dev-tools.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlsjVrkACgkQBcgs9XrR2kb7JgCfdcywY9A1ZaK4rwP3gw11OBc0
qcYAniTwFq3KnAFdSRIijkZNSY+Dpk82
=bq/r
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#196647

FromGeorgi Naplatanov <gosho@oles.biz>
Date2018-06-13 23:50 +0200
Message-ID<w0lOp-2dx-3@gated-at.bofh.it>
In reply to#196615
On 06/13/2018 11:04 AM, Irek Szcześniak wrote:
> Hi,
> 
> I need GCC 7 on my Debian Stretch.  Previously I upgraded my Stretch to
> Testing (Buster), but I ran to some problems, and reinstalled the system
> back to Stretch.
> 
> Could someone offer an advice on how to get a working GCC 7 on Debian
> Stretch, without upgrading to Testing?

Another option could be to build GCC-7 yourself from source. Don't
forget to use appropriate prefix when you run "configure".

Kind regards
Georgi

[toc] | [prev] | [next] | [standalone]


#196656

FromIrek Szcześniak <irek@irkos.org>
Date2018-06-14 10:10 +0200
Message-ID<w0vup-8mF-1@gated-at.bofh.it>
In reply to#196647
Georgi, thank you for you email.

I gave it a try.  On Stretch, GCC 8.1 compiled and installed cleanly.  I 
put the path to the gcc binary (/usr/local/gcc-8.1.0/bin) in my PATH, 
and I compiled and ran my code without any other configuration.  I 
expected some linking problems, but the binary dynamically links to the 
system libraries, and things are OK.  Cool!  Thanks again!


Best,
Irek

On 13.06.2018 23:43, Georgi Naplatanov wrote:
> On 06/13/2018 11:04 AM, Irek Szcześniak wrote:
>> Hi,
>>
>> I need GCC 7 on my Debian Stretch.  Previously I upgraded my Stretch to
>> Testing (Buster), but I ran to some problems, and reinstalled the system
>> back to Stretch.
>>
>> Could someone offer an advice on how to get a working GCC 7 on Debian
>> Stretch, without upgrading to Testing?
> 
> Another option could be to build GCC-7 yourself from source. Don't
> forget to use appropriate prefix when you run "configure".
> 
> Kind regards
> Georgi
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web