Package Details: gcc-libs-git 13.0.0_r197401.g33be3ee36a7-1

Git Clone URL: https://aur.archlinux.org/gcc-git.git (read-only, click to copy)
Package Base: gcc-git
Description: Runtime libraries shipped by GCC (git version)
Upstream URL: https://gcc.gnu.org
Licenses: GFDL-1.3-or-later, GPL-3.0-with-GCC-exception
Conflicts: gcc-libs
Provides: gcc-libs, gcc-libs-git, gcc-multilib, gcc-multilib-git, libasan.so, libgfortran.so, libgo.so, libgphobos.so, liblsan.so, libtsan.so, libubsan.so
Replaces: gcc-multilib-git, libgphobos-git
Submitter: Allan
Maintainer: IslandC0der (ptr1337)
Last Packager: ptr1337
Votes: 15
Popularity: 0.000080
First Submitted: 2013-06-26 03:43 (UTC)
Last Updated: 2024-03-21 19:26 (UTC)

Required by (4531)

Sources (4)

Pinned Comments

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 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101941 .

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 9 .. 13 Next › Last »

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:

CXXFLAGS=${CXXFLAGS/-Werror=format-security/}

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().
    Aborting...

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().
    Aborting...

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}.

IslandC0der commented on 2021-08-17 21:52 (UTC)

@DAC324

Regarding the yay error: that sounds like a problem with yay itself, have you tried doing a clean build (or maybe removing ~/.cache/yay/gcc-git/)?

Regarding the other problems: 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).

PS: the redirection is normal, since this is a split package.

DAC324 commented on 2021-08-17 08:33 (UTC) (edited on 2021-08-17 14:32 (UTC) by DAC324)

@japhir and all: If you get

/opt/.cache/yay/gcc-git/src/gcc/libcpp/expr.c: In function 'unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)':
/opt/.cache/yay/gcc-git/src/gcc/libcpp/expr.c:807:35: error: format not a string literal and no format arguments [-Werror=format-security]
  807 |             cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
      |             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  808 |                                    0, message);
      |                                    ~~~~~~~~~~~
/opt/.cache/yay/gcc-git/src/gcc/libcpp/expr.c:810:38: error: format not a string literal and no format arguments [-Werror=format-security]
  810 |             cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
  811 |                                       virtual_location, 0, message);
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/.cache/yay/gcc-git/src/gcc/libcpp/expr.c:820:33: error: format not a string literal and no format arguments [-Werror=format-security]
  820 |           cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
      |           ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  821 |                                  virtual_location, 0, message);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors

/opt/.cache/yay/gcc-git/src/gcc/libcpp/macro.c: In member function 'vaopt_state::update_type vaopt_state::update(const cpp_token*)':
/opt/.cache/yay/gcc-git/src/gcc/libcpp/macro.c:185:26: error: format not a string literal and no format arguments [-Werror=format-security]
  185 |             cpp_error_at (m_pfile, CPP_DL_ERROR, token->src_loc,
      |             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  186 |                           vaopt_paste_error);
      |                           ~~~~~~~~~~~~~~~~~~
/opt/.cache/yay/gcc-git/src/gcc/libcpp/macro.c:214:34: error: format not a string literal and no format arguments [-Werror=format-security]
  214 |                     cpp_error_at (m_pfile, CPP_DL_ERROR, token->src_loc,
      |                     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  215 |                                   vaopt_paste_error);
      |                                   ~~~~~~~~~~~~~~~~~~
/opt/.cache/yay/gcc-git/src/gcc/libcpp/macro.c: In function 'cpp_macro* create_iso_definition(cpp_reader*)':
/opt/.cache/yay/gcc-git/src/gcc/libcpp/macro.c:3674:25: error: format not a string literal and no format arguments [-Werror=format-security]
 3674 |               cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
      |               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/.cache/yay/gcc-git/src/gcc/libcpp/macro.c:3689:25: error: format not a string literal and no format arguments [-Werror=format-security]
 3689 |               cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
      |               ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors

and finally, as a result

make[2]: Leaving directory '/opt/.cache/yay/gcc-git/src/gcc-build'
make[1]: *** [Makefile:27832: stage1-bubble] Error 2
make[1]: Leaving directory '/opt/.cache/yay/gcc-git/src/gcc-build'
make: *** [Makefile:1012: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
  • Just check if -Werror=format-security has been enabled in the CFLAGS of your /etc/makepkg.conf. If you don't want to edit /etc/makepkg.conf, just add the line
CFLAGS=${CFLAGS/-Werror=format-security/}

below the already existing CFLAGS definition in the build() section of PKGBUILD, and

CXXFLAGS=${CXXFLAGS/-Werror=format-security/}

after the CXXFLAGS definition. See bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100207 for additional details.