Bug 840902

Summary: FTBFS: error: signed and unsigned type in conditional expression
Product: [Fedora] Fedora Reporter: Karsten Hopp <karsten>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: dsmith, fche, jistone, lberk, mjw, scox, wcohen
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-19 06:02:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
preprocessed mainloop.c from systemtap-1.8-4.fc18
none
preprocessed source from https://bugzilla.redhat.com/show_bug.cgi?id=837641#c4 none

Description Karsten Hopp 2012-07-17 14:38:50 UTC
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 14:43:42 UTC

*** This bug has been marked as a duplicate of bug 837641 ***

Comment 2 Karsten Hopp 2012-07-17 15:01:55 UTC
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 15:48:45 UTC
(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 16:08:52 UTC
Created attachment 598681 [details]
preprocessed mainloop.c from systemtap-1.8-4.fc18

Comment 5 Karsten Hopp 2012-07-17 16:15:03 UTC
Created attachment 598683 [details]
preprocessed source from https://bugzilla.redhat.com/show_bug.cgi?id=837641#c4

Comment 6 Josh Stone 2012-07-17 17:29:30 UTC
(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 10:47:17 UTC
> 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 06:02:04 UTC
(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...