[torqueusers] torque-1.2.0p1-snap.1107893767 will not compile on AIX 5.2 with XLC (and how I worked around it)

Chris Samuel csamuel at vpac.org
Thu Feb 10 17:09:54 MST 2005


Hi folks,

The current torque snapshot won't build with the
IBM compiler on AIX because of what looks like GCC'isms
and a comparison that the IBM compiler rejects as illegal
(but fixed with a simple cast).

First failure:

        xlc -g -lodm -lcfg -I../include -I../../src/include -I./aix5 -DHAVE_CONFIG_H -DPBS_MOM -DDEMUX=\"/usr/local/sbin/pbs_demux\"  -DRCP_PATH=\"/usr/local/sbin/pbs_rcp\" -c catch_child.c
"catch_child.c", line 476.43: 1506-045 (S) Undeclared identifier __func__.

This is ./src/resmom/catch_child.c

Commenting that out means it then fails with:

xlc -g -lodm -lcfg -I../include -I../../src/include -I./aix5 -DHAVE_CONFIG_H -DPBS_MOM -DDEMUX=\"/usr/local/sbin/pbs_demux\"  -DRCP_PATH=\"/usr/local/sbin/pbs_rcp\" -c start_exec.c
"start_exec.c", line 764.37: 1506-280 (E) Function argument assignment between types "unsigned int*" and "int*" is not allowed.
"start_exec.c", line 779.36: 1506-280 (E) Function argument assignment between types "unsigned int*" and "int*" is not allowed.
"start_exec.c", line 2695.15: 1506-045 (S) Undeclared identifier __func__.
"start_exec.c", line 3493.58: 1506-280 (E) Function argument assignment betweentypes "unsigned int*" and "int*" is not allowed.

Fixing that __func__ to be "start_process" means it
compiles with those assignment warnings, and
then fails with:

xlc -g -lodm -lcfg -I../include -I../../src/include -I./aix5 -DHAVE_CONFIG_H -DPBS_MOM -DDEMUX=\"/usr/local/sbin/pbs_demux\"  -DRCP_PATH=\"/usr/local/sbin/pbs_rcp\" -c ./aix5/mom_mach.c
"/usr/include/cf.h", line 338.19: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 338.34: 1506-310 (I) The type "struct PdDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 339.17: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 339.32: 1506-310 (I) The type "struct PdDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 340.17: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 340.32: 1506-310 (I) The type "struct PdDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 345.21: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 346.42: 1506-310 (I) The type "struct PdDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 347.19: 1506-310 (I) The type "struct Class" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 348.24: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 348.45: 1506-310 (I) The type "struct PdDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 349.29: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 350.24: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 351.31: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 352.33: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 353.32: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 354.18: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 355.19: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"/usr/include/cf.h", line 356.21: 1506-310 (I) The type "struct CuDv" was introduced in a parameter list, and will go out of scope at the end of the function declaration or definition.
"./aix5/mom_mach.c", line 372.50: 1506-068 (S) Operation between types "char*" and "int" is not allowed.

Changing:

 if ((odm_path = odm_set_path("/etc/objrepos")) != -1)
to:
 if ((odm_path = odm_set_path("/etc/objrepos")) != (char *) -1)

makes that file compile.  It's ugly, but what else to do when the manual
page says its a function that returns char * and -1 on an error ?

Next failure is another GCC'ism.

xlc -g -lodm -lcfg -I../include -I../../src/include -I./aix5 -DHAVE_CONFIG_H -DPBS_MOM -DDEMUX=\"/usr/local/sbin/pbs_demux\"  -DRCP_PATH=\"/usr/local/sbin/pbs_rcp\" -c tmsock_recov.c
"tmsock_recov.c", line 73.27: 1506-045 (S) Undeclared identifier __func__.

This has two __func__ mentions that when hardwired to "recov_tmsock"
allow it to compile.

After all that it builds OK!

-- 
 Christopher Samuel - (03)9925 4751 - VPAC Systems & Network Admin
 Victorian Partnership for Advanced Computing http://www.vpac.org/
 Bldg 91, 110 Victoria Street, Carlton South, VIC 3053, Australia

-------------- 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/20050211/fbdf7a30/attachment.bin


More information about the torqueusers mailing list