Package Details: gcc5 5.5.0-3

Git Clone URL: https://aur.archlinux.org/gcc5.git (read-only, click to copy)
Package Base: gcc5
Description: The GNU Compiler Collection (5.x)
Upstream URL: https://gcc.gnu.org/gcc-5/
Licenses: GPL, custom, LGPL, FDL
Submitter: svenstaro
Maintainer: severach
Last Packager: severach
Votes: 16
Popularity: 0.000066
First Submitted: 2018-05-07 18:23 (UTC)
Last Updated: 2022-09-24 16:41 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

daniel_shub commented on 2020-04-23 13:15 (UTC)

It does not build for me in a clean chroot. I get the same error as @adfjjv. It looks like there are some patches in the comments. Can someone more savvy than I update the PKGBUILD.

ecomaikgolf commented on 2020-03-22 23:52 (UTC)

Doesn't compile, needs to be patched

8472 commented on 2020-03-04 16:05 (UTC) (edited on 2020-03-04 16:18 (UTC) by 8472)

@midori: I've been playing with that just yesterday, and compilation has finished ok, so I guess my adaptation attempts could be alright, here:

PKGBUILD content: https://pastebin.com/inU6GxtT

glibc2.30-ipc_perm.patch content: https://pastebin.com/m2ngMHUe

midori commented on 2020-03-03 17:44 (UTC)

Hello adfjjv. Sorry, can you please explain me how to apply your fix? Also, in the link you shared, the patch that I have to download is the one commented by Joseph Myers?

adfjjv commented on 2020-02-28 12:14 (UTC) (edited on 2020-02-28 12:15 (UTC) by adfjjv)

The aforementioned problem is due to glibc 2.30 https://patchwork.ozlabs.org/patch/1136271/ I've attached the fix.

---
 PKGBUILD                 |  9 ++++++---
 glibc2.30-ipc_perm.patch | 12 ++++++++++++
 2 files changed, 18 insertions(+), 3 deletions(-)
 create mode 100644 glibc2.30-ipc_perm.patch

diff --git a/PKGBUILD b/PKGBUILD
index 008f04b..9b57bc0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,17 +16,20 @@ depends=('glibc' 'binutils' 'libmpc')
 options=('!emptydirs')
 source=(https://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz
         http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2
-        glibc2.28-ustat.patch)
+        glibc2.28-ustat.patch
+        glibc2.30-ipc_perm.patch)
 sha512sums=('670ff52c2ae12c7852c12987e91798c5aa8bd6daf21f0d6e0cd57a4aa59cc4f06a837fe76426eaa1424cfddca937bed377680700eadc04d76b9180d462364fa1'
             '85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94'
-            '633d96bf2d78d3187d8b26dd4c12b1b8fcbe784cbaa6f3b312326dc4ea118b3f0980bfd0e50cd6be79563dd29c296a2fafe056f4dbbb486414331cebcc1109bf')
+            SKIP
+            SKIP)

 prepare() {
   cd gcc-$pkgver

   # Fix build with glibc 2.28, which removes <sys/ustat.h>
   patch -p0 -i "$srcdir/glibc2.28-ustat.patch"
-
+  patch -p0 -i "$srcdir/glibc2.30-ipc_perm.patch"
+ 
   # link isl for in-tree build
   ln -s ../isl-${_islver} isl

diff --git a/glibc2.30-ipc_perm.patch b/glibc2.30-ipc_perm.patch
new file mode 100644
index 0000000..a655317
--- /dev/null
+++ b/glibc2.30-ipc_perm.patch
@@ -0,0 +1,12 @@
+--- libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h    2020-02-28 11:49:29.763277856 +0000
++++ libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h    2020-02-28 11:49:45.092909823 +0000
+@@ -198,8 +198,7 @@
+     unsigned long long __unused1;
+     unsigned long long __unused2;
+ #else
+-    unsigned short mode;
+-    unsigned short __pad1;
++    unsigned int mode;
+     unsigned short __seq;
+     unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
-- 
2.25.0

adfjjv commented on 2020-02-28 10:54 (UTC)

Doesn't build on up-to-date Arch. Error:

In file included from /home/user/gcc5/src/gcc-5.5.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:174:0:
/home/user/gcc5/src/gcc-5.5.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:272:72: error: size of array ‘assertion_failed__1077’ is negative
     typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                                        ^
/home/user/gcc5/src/gcc-5.5.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:266:30: note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
 #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                              ^
/home/user/gcc5/src/gcc-5.5.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1357:3: note: in expansion of macro ‘COMPILER_CHECK’
   COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
   ^
/home/user/gcc5/src/gcc-5.5.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1077:1: note: in expansion of macro ‘CHECK_SIZE_AND_OFFSET’
 CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
 ^
make[4]: *** [Makefile:449: sanitizer_platform_limits_posix.lo] Error 1

lonaowna commented on 2018-09-28 15:20 (UTC)

Sorry for the late response zurozuro and cpuheater. The glibc 2.28 issue is fixed in gcc5 5.5.0-3.

cpuheater commented on 2018-09-28 13:10 (UTC)

Same issue here. The reason is that the function ustat was removed in glibc-2.28: https://lists.gnu.org/archive/html/info-gnu/2018-08/msg00000.html

There's an AUR package for glibc-2.27 which installs into /opt/glibc-2.27/ but I couldn't figure out yet how to compile with this custom glibc. Probably the easiest approach would be to modify the glibc-2.27 package such that it replaces the system's glibc.

zurozuro commented on 2018-09-18 14:28 (UTC) (edited on 2018-09-18 14:36 (UTC) by zurozuro)

I have encountered problem compiling gcc. Any ideas?

../x86_64-pc-linux-gnu/libgo/.libs/libgo.so: undefined reference to `ustat'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:626: go] Error 1
make[2]: Leaving directory '~/Downloads/gcc5/src/gcc-build/gotools'
make[1]: *** [Makefile:13197: all-gotools] Error 2
make[1]: Leaving directory '~/Downloads/gcc5/src/gcc-build'
make: *** [Makefile:907: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

brando56894 commented on 2018-09-16 23:07 (UTC) (edited on 2018-09-16 23:22 (UTC) by brando56894)

It fails to compile for me after about 20 minutes of compiling, which is pretty far into it since I have a 6 core/12 thread Xeon with 64 GB of DDR4 ECC and I'm compiling in /tmp

configure output, since the comments section destroyed the formatting: https://hastebin.com/

After looking at line 907 in the Makefile, it's apparently failing during the final stage of compilation. "The target built for a native non-bootstrap build"