Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Implications for rebuilding GCC during install
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 520

PostPosted: Sat Jun 15, 2024 7:37 am    Post subject: Implications for rebuilding GCC during install Reply with quote

Hi

I tried to install Darktable, which has to be compiled. The build failed because GCC had been built without 'graphite' support. I don't know what that is, but I applied 'USE=graphite' as the error message said:

Code:

USE=graphite emerge --newuse gcc


And this worked, and I went on to build Darktable (three hours) but I wonder if the next full update will overwrite this setting? And, if it does, will Darktable fail to build (if it has been updated)?

If I applied this USE change persistently, in make.conf or wherever, would that have the effect that the next full update would rebuild everything? I mean, what has GCC as a dependency? Most things, I should expect.

BR, Lars.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1961

PostPosted: Sat Jun 15, 2024 10:11 am    Post subject: Reply with quote

In order: Yes, it will be wiped out because you set USE on the command line. No, USE doesn't infect things such that they get rebuilt just because the thing they depend on changed USE.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22648

PostPosted: Sat Jun 15, 2024 1:51 pm    Post subject: Reply with quote

To elaborate on sam_'s post:

This is why we always tell people not to set USE in the environment, except for exploratory purposes when using emerge --pretend. If you set USE=graphite globally (which is not very useful), it would at worst rebuild packages that actually set IUSE=graphite. Packages which do not react to the graphite USE flag will not be picked up by --changed-use due to a change in the graphite USE flag. As I read the result of equery hasuse, only gcc and harfbuzz react to this flag. A few other ebuilds inspect the state of that flag on one of those packages, but do not IUSE it.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54577
Location: 56N 3W

PostPosted: Sat Jun 15, 2024 4:57 pm    Post subject: Reply with quote

lars_the_bear,

Long story short. Set a per package USE in your /etc/portage/package.use/
Portage will remember the USE setting then.

Its described on the Wiki
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 520

PostPosted: Sun Jun 16, 2024 7:17 pm    Post subject: Reply with quote

Hu wrote:
Packages which do not react to the graphite USE flag will not be picked up by --changed-use due to a change in the graphite USE flag.


But do packages not pick up the fact that the C compiler has been changed? I would think that, in a system that has historically been built from source, a C compiler is a pretty fundamental dependency. Or is it so fundamental that it's not even considered a dependency?

BR, Lars.
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 220

PostPosted: Sun Jun 16, 2024 9:41 pm    Post subject: Reply with quote

lars_the_bear wrote:
Hu wrote:
Packages which do not react to the graphite USE flag will not be picked up by --changed-use due to a change in the graphite USE flag.


But do packages not pick up the fact that the C compiler has been changed? I would think that, in a system that has historically been built from source, a C compiler is a pretty fundamental dependency. Or is it so fundamental that it's not even considered a dependency?

BR, Lars.


Everything depends on gcc, but not everything depends on "gcc's graphite support".

So they declare a dependency on GCC (indirectly via the base system) which is satisfied by any ABI-compatible version of GCC.

Question for you:

Why would changing the C compiler imply that software built with the C compiler needs to be recompiled in order to work? The software has been built and is in working state now. The C compiler's job has been completed and it is now out of the picture.

If you would *like* to recompile everything against a C compiler change because you are a developer and you like testing for bugs, you are welcome to do so.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 520

PostPosted: Mon Jun 17, 2024 7:16 am    Post subject: Reply with quote

eschwartz wrote:

Why would changing the C compiler imply that software built with the C compiler needs to be recompiled in order to work? The software has been built and is in working state now. The C compiler's job has been completed and it is now out of the picture.


Well, that's certainly what I hoped would be the case. I just didn't understand Gentoo's dependency management system well enough, to be sure it would be. The Linux systems I'm familiar with don't have built-time dependencies at all, so the question never arises. I'm learning the hard way not to assume that Gentoo is like other Linux implementations, so I have to check ;)

BR, Lars.
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 220

PostPosted: Mon Jun 17, 2024 1:06 pm    Post subject: Reply with quote

lars_the_bear wrote:
eschwartz wrote:

Why would changing the C compiler imply that software built with the C compiler needs to be recompiled in order to work? The software has been built and is in working state now. The C compiler's job has been completed and it is now out of the picture.


Well, that's certainly what I hoped would be the case. I just didn't understand Gentoo's dependency management system well enough, to be sure it would be. The Linux systems I'm familiar with don't have built-time dependencies at all, so the question never arises. I'm learning the hard way not to assume that Gentoo is like other Linux implementations, so I have to check ;)

BR, Lars.


I bet they do have build-time dependencies :) it is just those dependencies are used on someone else's build server and all you see are the binary packages.

Gentoo has this too by the way:

Code:
FEATURES="getbinpkg"


and Gentoo will download premade binaries built by gentoo.org which match your USE flags.

Gentoo is whatever its users wish to make of it.

...

Anyway yes, on any distro including Gentoo where you use binary packages, build-time dependencies (such as GCC) are only needed on the build server performing the builds.

You can install Gentoo without GCC. In fact, you can install it without portage! But the resulting system will be unable to do package manager things and this is only really useful in specific cases such as generating customized images for embedded or kiosk systems that aren't intended to be br updated except by flashing a new firmware image.

For an example of this actually happening, look at Google's ChromeOS, which is built from Gentoo but provides neither GCC nor portage.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum