Bug 840902 - FTBFS: error: signed and unsigned type in conditional expression
FTBFS: error: signed and unsigned type in conditional expression
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: systemtap (Show other bugs)
rawhide
powerpc Linux
high Severity high
: ---
: ---
Assigned To: Frank Ch. Eigler
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-17 10:38 EDT by Karsten Hopp
Modified: 2012-07-19 02:02 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-19 02:02:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
preprocessed mainloop.c from systemtap-1.8-4.fc18 (279.56 KB, text/plain)
2012-07-17 12:08 EDT, Karsten Hopp
no flags Details
preprocessed source from https://bugzilla.redhat.com/show_bug.cgi?id=837641#c4 (8.31 KB, text/plain)
2012-07-17 12:15 EDT, Karsten Hopp
no flags Details

  None (edit)
Description Karsten Hopp 2012-07-17 10:38:50 EDT
Description of problem:
systemtap-1.8-3 and systemtap-1.8-4 fail to build on PPC:

gcc -DHAVE_CONFIG_H -I.  -D_GNU_SOURCE -I./../../includes -I./../../includes/sys -DBINDIR='"/usr/bin"' -DSYSCONFDIR='"/etc"' -DPKGDATADIR='"/usr/share/systemtap"' -DPKGLIBDIR='"/usr/libexec/systemtap"' -DLOCALEDIR='"/usr/share/locale"'  -Wall -Werror -Wunused -W -Wformat=2 -Wno-format-nonliteral -fPIE -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m64 -c relay_old.c
mainloop.c: In function 'stp_main_loop':
mainloop.c:581:3: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
mainloop.c:581:3: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
mainloop.c:583:35: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
mainloop.c:583:35: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
mainloop.c:631:2: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
mainloop.c:631:2: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
cc1: all warnings being treated as errors
make[3]: *** [mainloop.o] Error 1
Version-Release number of selected component (if applicable):



Steps to Reproduce:
1. ppc-koji build --scratch f18 systemtap-1.8-4.src.rpm
2.
3.
  
Actual results:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=613685
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=614814


Additional info:
Comment 1 Karsten Hopp 2012-07-17 10:43:42 EDT

*** This bug has been marked as a duplicate of bug 837641 ***
Comment 2 Karsten Hopp 2012-07-17 11:01:55 EDT
this is a different problem. according to build.log bz837641-staprun-no-linux-types.patch gets applied and the issue still exists.
Comment 3 Josh Stone 2012-07-17 11:48:45 EDT
(In reply to comment #2)
> this is a different problem. according to build.log
> bz837641-staprun-no-linux-types.patch gets applied and the issue still
> exists.

Hmm, the symptoms are exactly the same though.  It may be that linux/posix_types.h is getting pulled in some other way on ppc.  Can you use -save-temps and upload mainloop.i?

Maybe experiment with the source given in bug #837641 comment #4 too.
Comment 4 Karsten Hopp 2012-07-17 12:08:52 EDT
Created attachment 598681 [details]
preprocessed mainloop.c from systemtap-1.8-4.fc18
Comment 5 Karsten Hopp 2012-07-17 12:15:03 EDT
Created attachment 598683 [details]
preprocessed source from https://bugzilla.redhat.com/show_bug.cgi?id=837641#c4
Comment 6 Josh Stone 2012-07-17 13:29:30 EDT
(In reply to comment #4)
> Created attachment 598681 [details]
> preprocessed mainloop.c from systemtap-1.8-4.fc18

This does indeed still get linux/posix_types.h, which x86_64 doesn't anymore.

The include chain is roughly:
  -> mainloop.c:13
  -> staprun.h:23
  -> /usr/include/signal.h:338
  -> /usr/include/bits/sigcontext.h:27
  -> /usr/include/asm/sigcontext.h:11
  -> /usr/include/asm/ptrace.h:27
  -> /usr/include/linux/types.h:8
  -> /usr/include/linux/posix_types.h

So it seems we can't avoid linux/posix_types.h on ppc, because we definitely do need to include signal.h.  I'll note this on bug #837641.

In the meantime, to get systemtap building, the other workaround was to pull in posix_types.h earlier, so its incompatible macros can get clobbered by glibc (rather than vice versa).  Karsten, can you try a ppc build with "#include <linux/types.h>" added at the very top of staprun.h?
Comment 7 Karsten Hopp 2012-07-18 06:47:17 EDT
> can you try a ppc build with "#include <linux/types.h>" added at the very top of staprun.h ?

that build completed without any issues
Comment 8 Josh Stone 2012-07-19 02:02:04 EDT
(In reply to comment #7)
> > can you try a ppc build with "#include <linux/types.h>" added at the very top of staprun.h ?
> 
> that build completed without any issues

1.8-5 has that revised workaround, and koji x86 builds are complete.  Do let us know if ppc doesn't work out...

Note You need to log in before you can comment on or make changes to this bug.