[ofa-general] found a simple fix for OFED-1.2 builds on OpenSuSE 10.2
Joe Landman
landman at scalableinformatics.com
Sat Jul 7 19:58:26 PDT 2007
Hi folks:
I found a "simple" fix for OFED-1.2 builds on OpenSuSE. I was hoping
for some advise on how to implement the fix, as I see a few options.
Basically the problem is that OpenSuSE (and I assume future versions of
SuSE) mask the HZ macro from non-kernel builds. The fix is to replace
every instance of HZ usage with a system call
-DHZ='sysconf(_SC_CLK_TCK)'"
I have verified that, if I get into the build directory and run the
command that failed in the original build.sh, but inserting a
CC="gcc -DHZ='sysconf(_SC_CLK_TCK)'" \
CFLAGS="-DHZ='sysconf(_SC_CLK_TCK)'"
(continued on second line due to email client wrapping)
immediately in front of the rpmbuild, that this is sufficient for
correct and complete building of the ofa_user-1.2 rpms on an unmodified
OpenSuSE 10.2 distribution.
Ok. So now we know how to fix (hack) this, and why it breaks. The real
fix is to seek out the uses of HZ, and replace them with the system call
as indicated. I would be happy to work on this if you would point me to
whom I should send patches.
But the question I really have is this. How can I (at least
temporarily) inject these environment variables (which ostensibly just
alleviate manual patching) into the build process? Specifically, I
looked in build.sh, and all the rpmbuild commands are of the form
ex rpmbuild ...
where ... are options. Rpmbuild presumes that you will pass any needed
environment variables in as I had done.
So is this the right place to inject this environment variable change in
absence of a formal patch? I could work up some additional hacked
methods, but they are only temporary at best (such as using an
rpmbuild.sh to force the issue). Thoughts, guidance, pointers, and
clues are sought. I am not looking to formalize a hack, but I also need
to get this build working. Longer term (next few weeks) I would prefer
to get fixes back to the maintainer(s).
Thanks.
Joe
--
landman at scalableinformatics.com
More information about the general
mailing list