[torquedev] Lots of torque 2.3.3 compile errors on AIX 5.2
Chris Samuel
csamuel at vpac.org
Thu Aug 21 02:34:33 MDT 2008
Hi all,
Just had to try and build Torque 2.3.3 on an AIX 5.3 system
that I last worked on almost 3 years ago. It took a while
to get Torque to compile with lots of build errors, the ones
that were purely warnings I have to admit I skipped fixing.
Here are the details for Torque 2.3.3 for AIX 5.2 with GCC 3.3.2:
Reading specs from /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/specs
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware --enable-threads --disable-shared --enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.2.0.0
Thread model: aix
gcc version 3.3.2
Torque fails to compile with:
gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -I../Libdis -DIFF_PATH=\"/usr/local/sbin/pbs_iff\" -DPBS_DEFAULT_FILE=\"/usr/spool/PBS/server_name\" -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT diswcs.lo -MD -MP -MF .deps/diswcs.Tpo -c ../Libdis/diswcs.c -DPIC -o .libs/diswcs.o
../Libdis/diswcs.c: In function `diswcs':
../Libdis/diswcs.c:112: warning: statement with no effect
The statement in question is:
assert(nchars <= UINT_MAX);
Commenting that out (as it has no effect) lets it compile some
more until it fails with:
gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -I../Libdis -DIFF_PATH=\"/usr/local/sbin/pbs_iff\" -DPBS_DEFAULT_FILE=\"/usr/spool/PBS/server_name\" -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT rpp.lo -MD -MP -MF .deps/rpp.Tpo -c ../Libifl/rpp.c -DPIC -o .libs/rpp.o
../Libifl/rpp.c:117: error: parse error before "int"
#if !defined(H_ERRNO_DECLARED)
extern int h_errno;
#endif
This is because netdb.h on AIX 5.2 defines h_errno to be:
#define h_errno (*(int *)h_errno_which())
Fixing that then becomes simply changing the #if to:
#if !defined(H_ERRNO_DECLARED) && !defined(_AIX)
which makes it pass that check.
It then fails trying to compile this:
gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -I../Libdis -DIFF_PATH=\"/usr/local/sbin/pbs_iff\" -DPBS_DEFAULT_FILE=\"/usr/spool/PBS/server_name\" -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT tm.lo -MD -MP -MF .deps/tm.Tpo -c ../Libifl/tm.c -DPIC -o .libs/tm.o
with heaps of errors that seem to boil down to the fact
that _XOPEN_SOURCE_EXTENDED is defined, but not set to a
value in line 85 of Libifl/tm.c - changing that to 1 fixes
all but one errors:
gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -I../Libdis -DIFF_PATH=\"/usr/local/sbin/pbs_iff\" -DPBS_DEFAULT_FILE=\"/usr/spool/PBS/server_name\" -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT tm.lo -MD -MP -MF .deps/tm.Tpo -c ../Libifl/tm.c -DPIC -o .libs/tm.o
../Libifl/tm.c: In function `localmom':
../Libifl/tm.c:465: warning: implicit declaration of function `htons'
This requires an explicit:
#ifdef _AIX
#include <arpa/inet.h>
#endif
to fix.
You then run into another h_errno problem in Libnet/get_hostaddr.c
with the same fix to it.
Next problem is:
gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -I../Libdis -DIFF_PATH=\"/usr/local/sbin/pbs_iff\" -DPBS_DEFAULT_FILE=\"/usr/spool/PBS/server_name\" -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT net_client.lo -MD -MP -MF .deps/net_client.Tpo -c ../Libnet/net_client.c -DPIC -o .libs/net_client.o
../Libnet/net_client.c: In function `client_to_svr':
../Libnet/net_client.c:273: warning: implicit declaration of function `bindresvport'
That requires a conditional include of <arpa/aixrcmds.h> :
#ifdef _AIX
#include <arpa/aixrcmds.h>
#endif
Then there's a similar problem in Libsite/site_check_u.c :
if gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -I../../../src/resmom/aix5 -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT site_check_u.o -MD -MP -MF ".deps/site_check_u.Tpo" -c -o site_check_u.o site_check_u.c; then mv -f ".deps/site_check_u.Tpo" ".deps/site_check_u.Po"; else rm -f ".deps/site_check_u.Tpo"; exit 1; fi
site_check_u.c: In function `site_check_user_map':
site_check_u.c:313: warning: implicit declaration of function `ruserok'
Again this requires:
#ifdef _AIX
#include <arpa/aixrcmds.h>
#endif
Next problem - compiling the AIX specific code in
the pbs_mom fails with lots of warnings:
Making all in aix5
if gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -DPBS_MOM -DDEMUX=\"/usr/local/sbin/pbs_demux\" -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT mom_mach.o -MD -MP -MF ".deps/mom_mach.Tpo" -c -o mom_mach.o mom_mach.c; then mv -f ".deps/mom_mach.Tpo" ".deps/mom_mach.Po"; else rm -f ".deps/mom_mach.Tpo"; exit 1; fi
mom_mach.c:201: warning: missing braces around initializer
mom_mach.c:201: warning: (near initialization for `nl[0]._n')
mom_mach.c:201: warning: missing initializer
mom_mach.c:201: warning: (near initialization for `nl[0].n_value')
mom_mach.c: In function `cput_sum':
mom_mach.c:598: warning: int format, long unsigned int arg (arg 3)
mom_mach.c: In function `mem_sum':
mom_mach.c:646: warning: int format, long unsigned int arg (arg 3)
mom_mach.c: In function `resi_sum':
mom_mach.c:675: warning: comparison between signed and unsigned
mom_mach.c:676: warning: comparison between signed and unsigned
mom_mach.c:677: warning: int format, long unsigned int arg (arg 3)
mom_mach.c: In function `mom_get_sample':
mom_mach.c:1163: warning: implicit declaration of function `getprocs'
mom_mach.c: In function `mom_over_limit':
mom_mach.c:1263: warning: int format, long unsigned int arg (arg 3)
mom_mach.c:1263: warning: int format, long unsigned int arg (arg 4)
mom_mach.c: In function `kill_task':
mom_mach.c:1396: warning: comparison between signed and unsigned
mom_mach.c:1399: warning: int format, long unsigned int arg (arg 3)
mom_mach.c: In function `getproctab':
mom_mach.c:1480: warning: unused variable `id'
mom_mach.c: In function `cput_job':
mom_mach.c:1519: warning: comparison between signed and unsigned
mom_mach.c:1523: warning: int format, long unsigned int arg (arg 3)
mom_mach.c: In function `cput_proc':
mom_mach.c:1568: warning: comparison between signed and unsigned
mom_mach.c:1571: warning: int format, long unsigned int arg (arg 3)
mom_mach.c: In function `mem_job':
mom_mach.c:1651: warning: comparison between signed and unsigned
mom_mach.c:1656: warning: int format, long unsigned int arg (arg 3)
mom_mach.c:1656: warning: int format, long unsigned int arg (arg 5)
mom_mach.c: In function `mem_proc':
mom_mach.c:1688: warning: comparison between signed and unsigned
mom_mach.c:1672: warning: unused variable `id'
mom_mach.c: In function `resi_job':
mom_mach.c:1772: warning: comparison between signed and unsigned
mom_mach.c:1780: warning: int format, long unsigned int arg (arg 3)
mom_mach.c: In function `resi_proc':
mom_mach.c:1811: warning: comparison between signed and unsigned
mom_mach.c:1819: warning: int format, long unsigned int arg (arg 3)
mom_mach.c: In function `sessions':
mom_mach.c:1905: warning: int format, long unsigned int arg (arg 3)
mom_mach.c:1916: warning: implicit declaration of function `checkret'
mom_mach.c: In function `pids':
mom_mach.c:1992: warning: comparison between signed and unsigned
mom_mach.c:1996: warning: int format, long unsigned int arg (arg 3)
mom_mach.c:2000: warning: int format, long unsigned int arg (arg 4)
mom_mach.c:2000: warning: unsigned int format, long unsigned int arg (arg 5)
mom_mach.c: In function `nusers':
mom_mach.c:2043: warning: int format, long unsigned int arg (arg 3)
mom_mach.c: In function `totmem':
mom_mach.c:2090: warning: unused variable `tmem'
mom_mach.c: In function `size_fs':
mom_mach.c:2129: warning: unused variable `mf'
mom_mach.c:2130: warning: unused variable `mp'
mom_mach.c: In function `size_file':
mom_mach.c:2171: warning: unsigned int format, off_t arg (arg 3)
mom_mach.c: In function `idletime':
mom_mach.c:2268: warning: implicit declaration of function `time'
mom_mach.c: In function `walltime':
mom_mach.c:2349: warning: comparison between signed and unsigned
mom_mach.c:2353: warning: comparison between signed and unsigned
mom_mach.c:2358: warning: int format, long unsigned int arg (arg 3)
mom_mach.c:2358: warning: int format, long unsigned int arg (arg 4)
mom_mach.c:2359: warning: comparison between signed and unsigned
mom_mach.c:2359: warning: signed and unsigned type in conditional expression
mom_mach.c: In function `physmem':
mom_mach.c:2379: warning: long unsigned int format, uint arg (arg 3)
mom_mach.c: In function `get_la':
mom_mach.c:2394: warning: comparison between pointer and integer
make: 1254-004 The error code from the last command is 1.
I skipped this by compiling it without the -Werror option.
More warnings here, again skipped by dropping -Werror:
if gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -DPBS_MOM -DDEMUX=\"/usr/local/sbin/pbs_demux\" -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT mom_start.o -MD -MP -MF ".deps/mom_start.Tpo" -c -o mom_start.o mom_start.c; then mv -f ".deps/mom_start.Tpo" ".deps/mom_start.Po"; else rm -f ".deps/mom_start.Tpo"; exit 1; fi
mom_start.c:107: warning: `ident' defined but not used
mom_start.c:120: warning: `job_key' defined but not used
Another warning here (skipped):
if gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -DPBS_MOM -DDEMUX=\"/usr/local/sbin/pbs_demux\" -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT pe_input.o -MD -MP -MF ".deps/pe_input.Tpo" -c -o pe_input.o pe_input.c; then mv -f ".deps/pe_input.Tpo" ".deps/pe_input.Po"; else rm -f ".deps/pe_input.Tpo"; exit 1; fi
pe_input.c:84: warning: `ident' defined but not used
Another h_errorno problem in src/resmom/job_func.c :
if gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include -I../../src/include -I../../src/resmom/aix5 -DPBS_MOM -DDEMUX=\"/usr/local/sbin/pbs_demux\" -DRCP_PATH=\"/usr/bin/scp\" -DRCP_ARGS=\"-rpB\" -DPBS_SERVER_HOME=\"/usr/spool/PBS\" -DPBS_ENVIRON=\"/usr/spool/PBS/pbs_environment\" -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT job_func.o -MD -MP -MF ".deps/job_func.Tpo" -c -o job_func.o job_func.c; then mv -f ".deps/job_func.Tpo" ".deps/job_func.Po"; else rm -f ".deps/job_func.Tpo"; exit 1; fi
job_func.c: In function `conn_qsub':
job_func.c:374: error: parse error before "int"
Next we hit a warning about comparisons always
being true in qrerun.c :
if gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include -I../../src/include -g -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
qrerun.c: In function `main':
qrerun.c:131: warning: comparison is always true due to limited range of data type
The test is:
while ((c = (char) getopt(argc,argv,GETOPT_ARGS)) != EOF)
Skipped by dropping -Werror, it's not getting used here..
Another h_errorno problem in tools/hostn.c :
if gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include -I../../src/include -g -W -Wall -Wno-unused-parameter -Wno-long-long -pedantic -Werror -MT hostn.o -MD -MP -MF ".deps/hostn.Tpo" -c -o hostn.o hostn.c; then mv -f ".deps/hostn.Tpo" ".deps/hostn.Po"; else rm -f ".deps/hostn.Tpo"; exit 1; fi
hostn.c:93: error: parse error before "int"
I've attached patches for all the source changes I made (I hope!).
Best of luck folks,
Chris
--
Christopher Samuel - (03) 9925 4751 - Systems Manager
The Victorian Partnership for Advanced Computing
P.O. Box 201, Carlton South, VIC 3053, Australia
VPAC is a not-for-profit Registered Research Agency
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_hostaddr.patch
Type: text/x-diff
Size: 332 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20080821/0567a001/get_hostaddr.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hostn.patch
Type: text/x-diff
Size: 307 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20080821/0567a001/hostn.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: job_func.patch
Type: text/x-diff
Size: 339 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20080821/0567a001/job_func.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: net_client.patch
Type: text/x-diff
Size: 346 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20080821/0567a001/net_client.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpp.patch
Type: text/x-diff
Size: 286 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20080821/0567a001/rpp.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: site_check_u.patch
Type: text/x-diff
Size: 353 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20080821/0567a001/site_check_u.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tm.patch
Type: text/x-diff
Size: 517 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20080821/0567a001/tm.bin
More information about the torquedev
mailing list