[torqueusers] Torque 2.3.6 on PPC64

Garrick Staples garrick at usc.edu
Thu Mar 5 17:11:35 MST 2009


On Thu, Mar 05, 2009 at 05:25:50PM -0600, Gabe Turner alleged:
> This may have already been covered in the past, though I couldn't find
> anything via the archives, so I apologize if it's a rehash.
> 
> While builfing Torque 2.3.6 on SLES10.2 on PPC64, I get a warning from gcc:
> 
> if gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include  -I../../src/include   -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT qrerun.o -MD -MP -MF ".deps/qrerun.Tpo" -c -o qrerun.o qrerun.c; \
> then mv -f ".deps/qrerun.Tpo" ".deps/qrerun.Po"; else rm -f ".deps/qrerun.Tpo"; exit 1; fi
> if gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include  -I../../src/include   -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT qrls.o -MD -MP -MF ".deps/qrls.Tpo" -c -o qrls.o qrls.c; \
> then mv -f ".deps/qrls.Tpo" ".deps/qrls.Po"; else rm -f ".deps/qrls.Tpo"; exit 1; fi
> cc1: warnings being treated as errors
> qrerun.c: In function ‘main’:
> qrerun.c:131: warning: comparison is always true due to limited range of data type
> make[2]: *** [qrerun.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[2]: Leaving directory `/usr/src/packages/BUILD/torque-2.3.6/src/cmds'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/src/packages/BUILD/torque-2.3.6/src'
> make: *** [all-recursive] Error 1
> 
> The relevant line in qrerun.c:
> 
>       while ((c = (char) getopt(argc, argv, GETOPT_ARGS)) != EOF)
> 
> If I configure with --disable-gcc-warnings, it builds (though, I haven't tested
> the functionality yet).  Has anyone else encountered this?  I'm just curious if
> it can be ignored on this architecture, or if this is a known-issue.

It's probably not a big deal, but we would like to fix all such warnings.

EOF is -1, but it looks like char is unsigned on ppc64?  It is certainly signed on x86 linux.

Can you try this compile and run this program?

#include <stdio.h>

int 
main (void)
{
  char c = 255;
  if (c > 128) {
    printf ("char is unsigned (c = %d)\n", c);
  } else {
    printf ("char is signed (c = %d)\n", c);
  }
  return 0;
}


-- 
Garrick Staples, GNU/Linux HPCC SysAdmin
University of Southern California

See the Prop 8 Dishonor Roll at http://www.californiansagainsthate.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20090305/be69ea04/attachment.bin


More information about the torqueusers mailing list