[ofa-general] Good fix for dat_strerror.c NULL undefined problem

Harold Iuzzolino iuzzolin at nmia.com
Thu Aug 28 22:38:12 PDT 2008


Dear Arlin Davis and Openfabrics,
arlin.r.davis at intel.com general at lists.openfabrics.org


I've got some good news and some bad news, but we're getting there,
ie compiling the OFED software, VERY SLOWLY. Has the team ever gotten
this to compile correctly on 1. A 64 bit Linux machine, 2. On a 64 bit
machine with Fedora 8 or 9 on it?

Concerning the problem in package compat-dapl-1.2.8:
dat/common/dat_strerror.c:621: error: 'NULL' undeclared (first use in this
function)

I believe your correction for Fedora 9, namely adding as line 136 of the 
file
dat/include/dat/dat_platform_specific.h works this line: #include
<linux/stddef.h>

/* Linux begins */
#elif defined(__linux__) /* Linux */
#if defined(__KERNEL__)
#include <linux/types.h>
#else
#include <sys/types.h>
#include <linux/stddef.h>           <--------------------- line 136
#endif /* defined(__KERNEL__) */


Could you put that into the official version of compat-dapl-1.2.8?

-----------------

I tested it by running the install.pl until it broke. Then I made the 
change
in
/var/tmp/OFED_topdir/BUILD/compat-dapl-1.2.8/dat/include/dat/dat_platform_specific.h

did 'make clean'
and then 'make'

The subroutine dat/common/dat_strerror.c compiled this time.


---------------------------------------------

Now for the bad news: Some more files further on in that package
had compile errors. It is possible that the reason for the format errors
are that we are compiling on a 64 bit machine.


[root at treebeard compat-dapl-1.2.8]# uname -a
Linux treebeard 2.6.25-14.fc9.x86_64 #1 SMP Thu May 1 06:06:21 EDT 2008 
x86_64
x86_64 x86_64 GNU/Linux


                 File dtest.c


dtest.c:193: warning: return type defaults to 'int'
dtest.c: In function 'main':
dtest.c:362: warning: format '%d' expects type 'int', but argument 4 has 
type
'DAT_PORT_QUAL'
dtest.c:367: warning: format '%d' expects type 'int', but argument 4 has 
type
'DAT_PORT_QUAL'
dtest.c: In function 'send_msg':
dtest.c:583: warning: format '%d' expects type 'int', but argument 4 has 
type
'DAT_VLEN'
dtest.c:583: warning: too many arguments for format
dtest.c: In function 'connect_ep':
dtest.c:613: warning: format '%d' expects type 'int', but argument 4 has 
type
'long unsigned int'
dtest.c:805: warning: format '%llx' expects type 'long long unsigned int', 
but
argument 5 has type 'DAT_VADDR'
dtest.c:868: warning: format '%d' expects type 'int', but argument 5 has 
type
'long unsigned int'
dtest.c:868: warning: too many arguments for format
dtest.c:876: warning: format '%llx' expects type 'long long unsigned int', 
but
argument 5 has type 'DAT_VADDR'
dtest.c:876: warning: format '%x' expects type 'unsigned int', but 
argument 6
has type 'DAT_VLEN'
dtest.c:602: warning: unused variable 'ep_attr'
dtest.c: In function 'disconnect_ep':
dtest.c:890: warning: unused variable 'flush_cnt'
dtest.c:890: warning: unused variable 'i'
dtest.c: In function 'do_rdma_write_with_msg':
dtest.c:997: warning: format '%d' expects type 'int', but argument 5 has 
type
'DAT_VLEN'
dtest.c:1087: warning: format '%d' expects type 'int', but argument 5 has 
type
'long unsigned int'
dtest.c:1098: warning: format '%x' expects type 'unsigned int', but 
argument 6
has type 'DAT_VLEN'
dtest.c:971: warning: unused variable 'their_context'
dtest.c:965: warning: unused variable 'region'
dtest.c: In function 'do_rdma_read_with_msg':
dtest.c:1197: warning: format '%d' expects type 'int', but argument 4 has 
type
'DAT_VLEN'
dtest.c:1197: warning: too many arguments for format
dtest.c:1279: warning: format '%d' expects type 'int', but argument 5 has 
type
'long unsigned int'
dtest.c:1279: warning: too many arguments for format
dtest.c:1288: warning: format '%x' expects type 'unsigned int', but 
argument 6
has type 'DAT_VLEN'
dtest.c:1121: warning: unused variable 'their_context'
dtest.c:1115: warning: unused variable 'region'
dtest.c: In function 'do_ping_pong_msg':
dtest.c:1431: warning: too many arguments for format
dtest.c: In function 'DT_RetToString':
dtest.c:1763: warning: unused variable 'sz'
dtest.c: In function 'main':
dtest.c:495: warning: control reaches end of non-void function
dtest.c: At top level:
dtest.c:145: warning: 'parent' defined but not used
dtest.c:154: warning: 'pin_memory' defined but not used
dtest.c:158: warning: 'post_recv_count' defined but not used
dtest.c:163: warning: 'child' defined but not used

---------------------------------------------------------------


                 File dapl_netaddr.cc

if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I include -I mdep/linux -I
./../../dat/include    -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 
-fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -MT
dapl_transaction_cmd.o -MD -MP -MF ".deps/dapl_transaction_cmd.Tpo" -c -o
dapl_transaction_cmd.o `test -f 'cmd/dapl_transaction_cmd.c' || echo
'./'`cmd/dapl_transaction_cmd.c; \
         then mv -f ".deps/dapl_transaction_cmd.Tpo"
".deps/dapl_transaction_cmd.Po"; else rm -f 
".deps/dapl_transaction_cmd.Tpo";
exit 1; fi
cmd/dapl_netaddr.c: In function 'DT_NetAddrLookupHostAddress':
cmd/dapl_netaddr.c:94: error: 'EAI_ADDRFAMILY' undeclared (first use in 
this
function)
cmd/dapl_netaddr.c:94: error: (Each undeclared identifier is reported only
once
cmd/dapl_netaddr.c:94: error: for each function it appears in.)
cmd/dapl_netaddr.c:99: error: 'EAI_NODATA' undeclared (first use in this
function)
make[2]: *** [dapl_netaddr.o] Error 1



Any ideas how to fix these subroutines?

Carlyn

<<< <-----Counting in binary is just like counting in decimal if you're 
all
thumbs /
<<<    Glaser and Way----->



More information about the general mailing list