<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>[opensm] bugs in build system</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">Hi Sasha,</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">For some reason OpenSM (and the required management libs) do not build correctly when </FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">I use manual autogen.sh, configure --prefix=/tmp/ez/usr ; make; make install mode.</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">It seems the build system is probably broken as it relies on fixed paths?</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">Here is what I do, errors are included in this list:</FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">OK 1. git clone …. </FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">--------------- LIBIBCOMMON ------------------</FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">OK 2. cd management/libibcommon; autogen.sh; ./configure --prefix=/tmp/ez/usr ; make ; make install</FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">--------------- LIBIBUMAD ------------------</FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">OK 3. cd management/libibumad; autogen.sh; </FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">FAIL 4. ./configure --prefix=/tmp/ez/usr </FONT>
<BR><B><FONT COLOR="#FF0000" FACE="Palatino Linotype">checking for sys_read_string in -libcommon... no</FONT></B>
<BR><B><FONT COLOR="#FF0000" FACE="Palatino Linotype">configure: error: sys_read_string() not found. libibumad requires libibcommon.</FONT></B>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">To overcome this I manually added the --disable-libcheck</FONT><B></B>
<BR><B><FONT COLOR="#008000" FACE="Palatino Linotype">./configure --prefix=/tmp/ez/usr --disable-libcheck</FONT></B>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">I do not understand why after installing the common lib I still get this error?</FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">Isn't the search path should include the <prefix>/lib ???</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">FAIL 5. make</FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">Make fails as it does not find the infiniband/common.h</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">To overcome this I manually added -I<prefix>/include ….</FONT>
<BR><B><FONT COLOR="#008000" FACE="Palatino Linotype">make CFLAGS="-I/tmp/ez/usr/include"</FONT></B>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">OK 6. make install </FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">--------------- OPENSM ------------------</FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">OK 7. cd management/opensm; autogen.sh; </FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">FAIL 8. configure --prefix=/tmp/ez/usr </FONT>
<BR><B><FONT COLOR="#FF0000" FACE="Palatino Linotype">checking for umad_init in -libumad... no</FONT></B>
<BR><B><FONT COLOR="#FF0000" FACE="Palatino Linotype">configure: error: umad_init() not found. libosmvendor of type openib requires libibumad.</FONT></B>
<BR><B><FONT COLOR="#FF0000" FACE="Palatino Linotype">configure: error: /bin/sh './configure' failed for libvendor</FONT></B>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">To overcome this I manually added the --disable-libcheck</FONT><B></B>
<BR><B><FONT COLOR="#008000" FACE="Palatino Linotype">./configure --prefix=/tmp/ez/usr --disable-libcheck</FONT></B>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">This problem is same as the above: lib path for linking should use the <prefix>/lib.</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">FAIL 9. make</FONT>
<BR><FONT COLOR="#0000FF" FACE="Palatino Linotype">Here again the include path is missing the <prefix>/include:</FONT>
</P>
<P><B><FONT COLOR="#FF0000" FACE="Palatino Linotype">./../include/vendor/osm_vendor_ibumad.h:44:31: infiniband/common.h: No such file or directory</FONT></B>
<BR><B><FONT COLOR="#FF0000" FACE="Palatino Linotype">./../include/vendor/osm_vendor_ibumad.h:45:29: infiniband/umad.h: No such file or directory</FONT></B>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">To overcome this I manually added -I<prefix>/include ….</FONT>
<BR><B><FONT COLOR="#008000" FACE="Palatino Linotype">make CFLAGS="-I/tmp/ez/usr/include" </FONT></B>
</P>
<P><B><FONT COLOR="#FF0000" FACE="Palatino Linotype">But this is not enough as the linker fail:</FONT></B>
<BR><B><FONT COLOR="#FF0000" FACE="Palatino Linotype">/usr/bin/ld: cannot find -libumad</FONT></B>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">To overcome this I had to add -L<prefix>/lib ….</FONT>
<BR><B><FONT COLOR="#008000" FACE="Palatino Linotype">make CFLAGS="-I/tmp/ez/usr/include" LDFLAGS="-L/tmp/ez/usr/lib -libumad -libcommon" </FONT></B>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">OK 10. make install</FONT><B></B>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">I hope the above issues could be fixed such that the installation would be simpler.</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">Also I propose removing the un-needed extra levels of autotools inside OpenSM code as there is no need/reason to have it eb declared as 5 different projects resulting with "configure" time longer than the compile time. </FONT></P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">Thanks</FONT>
</P>
<P><FONT COLOR="#0000FF" FACE="Palatino Linotype">Eitan</FONT>
</P>
<BR>
<P><B><I><SPAN LANG="en-gb"><FONT COLOR="#0000FF" SIZE=6 FACE="Monotype Corsiva">Eitan Zahavi</FONT></SPAN></I></B><I><SPAN LANG="en-gb"></SPAN></I><SPAN LANG="en-gb"></SPAN><SPAN LANG="en-us"></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Tahoma">Senior Engineering Director, Software Architect</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Tahoma">Mellanox Technologies LTD</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Tahoma">Tel:+972-4-9097208<BR>
Fax:+972-4-9593245</FONT></SPAN>
<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Tahoma">P.O. Box 586 Yokneam 20692 ISRAEL</FONT></SPAN>
</P>
<BR>
</BODY>
</HTML>