bug and patch (was Re: [ofa-general] Supported list of Kernels)
Joe Landman
landman at scalableinformatics.com
Mon Jun 25 13:43:13 PDT 2007
Tziporet Koren wrote:
> This is the correct list that OFED 1.2 supports:
>
> o Linux Operating Systems:
[...]
> - kernel.org: 2.6.19.x and 2.6.20.x
I just tried a build of OFED-1.2 against 2.6.20.14 kernel.org
I get this in the log from the build.sh
...
make[1]: Entering directory
`/var/tmp/OFEDRPM/BUILD/ofa_user-1.2/src/userspace/ipoibtools/iproute2'
make -w -C lib
make[2]: Entering directory
`/var/tmp/OFEDRPM/BUILD/ofa_user-1.2/src/userspace/ipoibtools/iproute2/lib'
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include
-DRESOLVE_HOSTNAMES -c -o ll_map.o ll_map.c
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include
-DRESOLVE_HOSTNAMES -c -o libnetlink.o libnetlink.c
ar rcs libnetlink.a ll_map.o libnetlink.o
gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I../include
-DRESOLVE_HOSTNAMES -c -o utils.o utils.c
utils.c: In function âinet_addr_matchâ:
utils.c:333: warning: initialization discards qualifiers from pointer
target type
utils.c:334: warning: initialization discards qualifiers from pointer
target type
utils.c: In function â__get_hzâ:
utils.c:368: error: âHZâ undeclared (first use in this function)
utils.c:368: error: (Each undeclared identifier is reported only once
utils.c:368: error: for each function it appears in.)
make[2]: *** [utils.o] Error 1
make[2]: Leaving directory
`/var/tmp/OFEDRPM/BUILD/ofa_user-1.2/src/userspace/ipoibtools/iproute2/lib'
make[1]: *** [lib] Error 2
make[1]: Leaving directory
`/var/tmp/OFEDRPM/BUILD/ofa_user-1.2/src/userspace/ipoibtools/iproute2'
make: *** [ipoibtools] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.30492 (%install)
It looks like the HZ macro is undeclared. Specifically it looks like it
is wrapped in a nice little ifdef
#ifndef _ASMx86_64_PARAM_H
#define _ASMx86_64_PARAM_H
#ifdef __KERNEL__
# define HZ CONFIG_HZ /* Internal kernel timer
frequency */
# define USER_HZ 100 /* .. some user interfaces are
in "ticks */
#define CLOCKS_PER_SEC (USER_HZ) /* like times() */
#endif
so that user space code doesn't see it. Ugh.
The following patch looks like it fixes it:
--- utils.c 2007-06-25 16:40:00.000000000 -0400
+++ utils.c.new 2007-06-25 16:39:24.000000000 -0400
@@ -365,7 +365,7 @@
FILE *fp;
if (getenv("HZ"))
- return atoi(getenv("HZ")) ? : HZ;
+ return atoi(getenv("HZ")) ? : sysconf(_SC_CLK_TCK);
if (getenv("PROC_NET_PSCHED")) {
snprintf(name, sizeof(name)-1, "%s",
getenv("PROC_NET_PSCHED"));
@@ -385,7 +385,7 @@
}
if (hz)
return hz;
- return HZ;
+ return sysconf(_SC_CLK_TCK);
}
int __iproute2_user_hz_internal;
>
> Tziporet
>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit
> http://openib.org/mailman/listinfo/openib-general
--
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: landman at scalableinformatics.com
web : http://www.scalableinformatics.com
http://jackrabbit.scalableinformatics.com
phone: +1 734 786 8423
fax : +1 866 888 3112
cell : +1 734 612 4615
More information about the general
mailing list