Package Base Details: gcc-git

Git Clone URL: (read-only, click to copy)
Submitter: Allan
Maintainer: IslandC0der (ptr1337)
Last Packager: ptr1337
Votes: 14
Popularity: 0.013853
First Submitted: 2013-06-26 03:43 (UTC)
Last Updated: 2022-07-25 09:44 (UTC)

Pinned Comments

ptr1337 commented on 2022-09-29 21:32 (UTC)

Actually glibc needs to be patched for compiling gcc13. This change was done in the last days at gcc which adds _FloatN and _FloatNx types and breaking the compilation right now. So please be sure to patch your glibc before building this package!

Here you can find the patch:

DAC324 commented on 2021-09-17 08:04 (UTC)

In addition to the jamespharvey20's sticky comment: The current GCC 12 versions are labelled "Experimental" for a reason. Development is ongoing, and there are still significant bugs. Hence, it is not recommended to use GCC 12 as a daily driver or on production systems.

At the moment, it is not even possible to build a working Linux kernel with GCC 12, see .

jamespharvey20 commented on 2017-02-15 04:30 (UTC) (edited on 2017-02-15 11:01 (UTC) by jamespharvey20)

*** STICKY *** These gcc*-git packages replace core's gcc* (non-git) packages. Technically, replacing the system gcc-libs can be dangerous. The possibility of a new upstream gcc git commit breaking your system isn't zero. When you compile and install this, you're using the latest git source, so you may be the first Arch user to be using that particular commit. In practice, I haven't seen an Arch user report such a problem for many years. Just understand that if installing these packages causes your computer to eat you, don't have your loved ones blame me. Oh, and know that if things go wrong, all you *should* have to do is uninstall the git version and go back to a previously working git version or even the core version. You might be able to do this while your system is still running, or you might have to do something like boot off an Arch ISO CD.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 .. 12 Next › Last »

DAC324 commented on 2021-08-31 17:00 (UTC) (edited on 2021-09-01 18:11 (UTC) by DAC324)

There's just another small thing to be noted:

After having installed gcc-libs-git, I get an error in pacman's database:

$ pacman -Dk
ERROR: missing 'gcc-libs>=4.7.1-5' dependency for 'clucene'

Seems that this is due to the fact that gcc-libs-git provides gcc-libs but without a version information. Adding


to the provides line for gcc-libs-git fixes the problem:

$ pacman -Dk
No database errors have been found!

IslandC0der commented on 2021-08-30 00:07 (UTC)

Yeah alright, I guess I'll just remove the patch then

DAC324 commented on 2021-08-27 10:26 (UTC) (edited on 2021-08-27 10:26 (UTC) by DAC324)

I must admit that I was astonished as well but that's what the the gcc11-Wno-format-security.patch ist doing:

When adding -Wno-format, also add -Wno-format-security

I am pretty sure that the setting of -Werror=format-security in /etc/makepkg.conf supersedes the -Wno-format-security setting applied by the patch. Or, in other words, gcc, after applying the patch, is probably run with both -Wno-format-security AND -Werror=format-security - in that situation, -Werror=format-security prevails.

IslandC0der commented on 2021-08-26 22:18 (UTC)

The weird thing is, I'm pretty sure gcc11-Wno-format-security.patch should've taken care of that issue :/

IslandC0der commented on 2021-08-26 22:15 (UTC)

Awesome! Thanks, I've just added it :)

DAC324 commented on 2021-08-26 08:38 (UTC) (edited on 2021-08-26 08:39 (UTC) by DAC324)

@IslandC0der: Thanks a lot for your work. With the latest PKGBUILD, the packages install without complaints. There is only one thing that might make sense to be added to PKGBUILD:


This is because the Arch developers have decided to include the flag -Werror=format-security in /etc/makepkg.conf, and hence, it is applied to the flags used by makepkg when compiling sources.

As gcc does not like this flag, it is better to have it removed, at least for this package.

IslandC0der commented on 2021-08-22 18:59 (UTC)

The conflict issue should be solved now with the latest PKGBUILD version; I'm still trying to debug the other ones.

Speaking of which, if you still have those issues, would you mind emailing me your compiled gcc-*-git packages (along with that config.log file on your third error message)?

I can't currently build them due to hardware limitations :/

DAC324 commented on 2021-08-20 09:18 (UTC) (edited on 2021-08-20 09:52 (UTC) by DAC324)

@IslandC0der: "Similarly, even though gcc-ada-git provides GNAT support, when building for the first time, it will require some existing GNAT support (i.e. from gcc-ada)."

Problem: With gcc-ada-git installed, I get

configure: error: GNAT is required to build ada
==> ERROR: A failure occurred in build().

To resolve this error, I have to install stock gcc-ada, however, after that, I of course get

==> Checking buildtime dependencies...
==> Missing dependencies:
  -> gcc-ada-git
==> ERROR: Could not resolve all dependencies.

To remedy this, I will have to change gcc-ada-git to gcc-ada in the makedepends line.

Same, by the way, with the installed gcc-git itself. With gcc-git installed, I usually get

configure: error: C compiler cannot create executables
See `config.log' for more details
==> ERROR: A failure occurred in build().

So, I have to reinstall stock gcc first to get a working compiler.

Now, there seems to be one glitch remaining. When trying to install gcc-libs-git after I have successfully built and installed gcc-git, I get:

:: gcc-libs-git and gcc-git are in conflict (gcc). Remove gcc-git? [y/N] 
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: gcc-libs-git and gcc-git are in conflict

IslandC0der commented on 2021-08-18 20:59 (UTC)

Hmm, do you still get that issue with the latest version of the PKGBUILD? I tweaked it a bit yesterday (I added the non -git versions to provides).

Tip: running makepkg -i automatically calls pacman -U to install the built package :)

DAC324 commented on 2021-08-18 16:43 (UTC) (edited on 2021-08-18 16:48 (UTC) by DAC324)

@IslandC0der: "yes, it tries to install gcc so it can compile itself... You can't compile a compiler without a compiler already present :P

Similarly, even though gcc-ada-git provides GNAT support, when building for the first time, it will require some existing GNAT support (i.e. from gcc-ada)."

That's well understood but shouldn't the package recognize former versions of gcc-git if already installed?

Trying to update gcc-git, it complained about a missing gcc dependency. Same with gcc-ada-git; it should also provide gcc-ada. However, I get an error from the gcc-git package about gcc-ada being missing as well, even after having installed gcc-ada-git.

Unfortunately, due to Arch's decision to include -Werror=format-security in /etc/makepkg.conf, I currently have to modify the PKGBUILD so that this flag is inactivated for gcc-git and then manually run makepkg and sudo pacman -U gcc-git{version}.