Bug 7941 - glibc-2.20 fails to build for sparc-buildroot-linux-gnu
Summary: glibc-2.20 fails to build for sparc-buildroot-linux-gnu
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-17 19:08 UTC by Uwe Hermann
Modified: 2015-03-17 22:19 UTC (History)
1 user (show)

See Also:
Host: x86_64
Target: sparc-buildroot-linux-gnu
Build:


Attachments
build log (15.87 KB, text/plain)
2015-03-17 19:08 UTC, Uwe Hermann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2015-03-17 19:08:20 UTC
Created attachment 5926 [details]
build log

I've tried to build glibc for in git HEAD as of today.

Here's the first error message, full log as attachment.

../sysdeps/sparc/sparc32/sem_trywait.c: In function '__new_sem_trywait':
../sysdeps/sparc/sparc32/sem_trywait.c:35:11: error: dereferencing pointer to incomplete type
   if (isem->value > 0)
           ^
In file included from ../include/list.h:45:0,
                 from ../sysdeps/sparc/nptl/tls.h:28,
                 from ../include/errno.h:27,
                 from ../sysdeps/sparc/sparc32/sem_trywait.c:20:
../sysdeps/sparc/sparc32/sem_trywait.c:38:43: error: dereferencing pointer to incomplete type
  val = atomic_decrement_if_positive (&isem->value);
                                           ^
Comment 1 Gustavo Zacarias 2015-03-17 21:47:38 UTC
Thanks for the headsup, just sent a patch to the list to disable 2.20 for sparc which leaves 2.21 (tested working with qemu).
Comment 2 mail 2015-03-17 21:50:33 UTC
You could also apply this simple patch:
diff -Nur glibc-2.20.orig/sysdeps/sparc/sparc32/sem_trywait.c glibc-2.20/sysdeps/sparc/sparc32/sem_trywait.c
--- glibc-2.20.orig/sysdeps/sparc/sparc32/sem_trywait.c 2014-09-07 10:09:09.000000000 +0200
+++ glibc-2.20/sysdeps/sparc/sparc32/sem_trywait.c      2014-09-13 10:21:44.000000000 +0200
@@ -22,6 +22,7 @@
 #include <lowlevellock.h>
 #include <internaltypes.h>
 #include <semaphore.h>
+#include <sparc-nptl.h>

 #include <shlib-compat.h>
Comment 3 Thomas Petazzoni 2015-03-17 22:19:59 UTC
Fixed by http://git.buildroot.net/buildroot/commit/?id=dbf7da63188d461e738dcfcaa436b84baa23143c, which basically disallows glibc 2.20 on SPARC.

Waldemar, I noticed your proposal, but since glibc 2.21 just builds/works out of the box on SPARC, there isn't much point in carrying a build fix for glibc 2.20.