[openib-general] RE: [PATCHv2] OpenSM: include svn version in build string

Eitan Zahavi eitan at mellanox.co.il
Sun Jan 29 08:54:57 PST 2006


Hi Hal,

It seems that this patch breaks "make dist" based builds.
Probably just missing the osm_svn_revision.h  file in the EXTRA_DIST.
I will be able to send a patch tomorrow but if you have a chance please
fix.

Thanks

EZ

creating libopensm.la
(cd .libs && rm -f libopensm.la && ln -s ../libopensm.la libopensm.la)
if gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/ibg2/include
-I./../include -I./../../libibcommon/include/infiniband
-I./../../libibuma
d/include/infiniband   -Wall -DOSM_VENDOR_INTF_OPENIB
-fno-strict-aliasing -DVENDOR_RMPP_SUPPORT -g -D_XOPEN_SOURCE=600
-D_BSD_SOURCE=1
  -MT opensm-main.o -MD -MP -MF ".deps/opensm-main.Tpo" -c -o
opensm-main.o `test -f 'main.c' || echo './'`main.c; \
then mv -f ".deps/opensm-main.Tpo" ".deps/opensm-main.Po"; else rm -f
".deps/opensm-main.Tpo"; exit 1; fi
main.c:61:37: error: opensm/osm_svn_revision.h: No such file or
directory
main.c: In function 'main':
main.c:529: error: 'OSM_SVN_REVISION' undeclared (first use in this
function)
main.c:529: error: (Each undeclared identifier is reported only once
main.c:529: error: for each function it appears in.)
make[2]: *** [opensm-main.o] Error 1
make[2]: Leaving directory `/tmp/osm-build/osm-20060129-1819/opensm'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/osm-build/osm-20060129-1819/opensm'
make: *** [all-recursive] Error 1

Eitan Zahavi
Design Technology Director
Mellanox Technologies LTD
Tel:+972-4-9097208
Fax:+972-4-9593245
P.O. Box 586 Yokneam 20692 ISRAEL


> -----Original Message-----
> From: Hal Rosenstock [mailto:halr at voltaire.com]
> Sent: Saturday, January 28, 2006 7:23 PM
> To: Yael Kalka; Eitan Zahavi
> Cc: Troy Benjegerdes; Troy Benjegerdes; openib-general at openib.org
> Subject: [PATCHv2] OpenSM: include svn version in build string
> 
> OpenSM: include OpenIB svn version when OpenIB build
> 
> [Note: this is implemented using svnversion as seemed to be the
> consensus rather than using .svn/entries. There are some downsides to
> this approach. ]
> 
> Signed-off-by: Hal Rosenstock <halr at voltaire.com>
> 
> Index: include/opensm/osm_svn_revision.h
> ===================================================================
> --- include/opensm/osm_svn_revision.h	(revision 0)
> +++ include/opensm/osm_svn_revision.h	(revision 0)
> @@ -0,0 +1 @@
> +#define OSM_SVN_REVISION ""
> Index: opensm/osm_opensm.c
> ===================================================================
> --- opensm/osm_opensm.c	(revision 5193)
> +++ opensm/osm_opensm.c	(working copy)
> @@ -59,6 +59,9 @@
>  #include <complib/cl_passivelock.h>
>  #include <vendor/osm_vendor_api.h>
>  #include <opensm/osm_version.h>
> +#ifdef OSM_VENDOR_INTF_OPENIB
> +#include <opensm/osm_svn_revision.h>
> +#endif
>  #include <opensm/osm_base.h>
>  #include <opensm/osm_opensm.h>
>  #include <opensm/osm_log.h>
> @@ -206,12 +209,33 @@ osm_opensm_init(
>     if( status != IB_SUCCESS )
>        return ( status );
> 
> +#ifndef OSM_VENDOR_INTF_OPENIB
>     /* If there is a log level defined - add the OSM_VERSION to it. */
>     osm_log( &p_osm->log,
>              osm_log_get_level( &p_osm->log ) & ( OSM_LOG_SYS ^ 0xFF
), "%s\n",
>              OSM_VERSION );
>     /* Write the OSM_VERSION to the SYS_LOG */
>     osm_log( &p_osm->log, OSM_LOG_SYS, "%s\n", OSM_VERSION );   /*
Format
> Waived */
> +#else
> +   if (strlen(OSM_SVN_REVISION))
> +   {
> +      /* If there is a log level defined - add OSM_VERSION and
OSM_SVN_REVISION
> to it. */
> +      osm_log( &p_osm->log,
> +               osm_log_get_level( &p_osm->log ) & ( OSM_LOG_SYS ^
0xFF ), "%s OpenIB
> svn %s\n",
> +               OSM_VERSION, OSM_SVN_REVISION );
> +      /* Write the OSM_VERSION and OSM_SVN_REVISION to the SYS_LOG */
> +      osm_log( &p_osm->log, OSM_LOG_SYS, "%s OpenIB svn %s\n",
> OSM_VERSION, OSM_SVN_REVISION );   /* Format Waived */
> +   }
> +   else
> +   {
> +      /* If there is a log level defined - add the OSM_VERSION to it.
*/
> +      osm_log( &p_osm->log,
> +               osm_log_get_level( &p_osm->log ) & ( OSM_LOG_SYS ^
0xFF ), "%s\n",
> +               OSM_VERSION );
> +      /* Write the OSM_VERSION to the SYS_LOG */
> +      osm_log( &p_osm->log, OSM_LOG_SYS, "%s\n", OSM_VERSION );   /*
Format
> Waived */
> +   }
> +#endif
> 
>     osm_log( &p_osm->log, OSM_LOG_FUNCS, "osm_opensm_init: [\n" ); /*
Format
> Waived */
> 
> Index: opensm/main.c
> ===================================================================
> --- opensm/main.c	(revision 5193)
> +++ opensm/main.c	(working copy)
> @@ -57,6 +57,9 @@
>  #include <getopt.h>
>  #include <unistd.h>
>  #include <opensm/osm_version.h>
> +#ifdef OSM_VENDOR_INTF_OPENIB
> +#include <opensm/osm_svn_revision.h>
> +#endif
>  #include <opensm/osm_opensm.h>
>  #include <complib/cl_types.h>
>  #include <complib/cl_debug.h>
> @@ -522,6 +525,10 @@ main(
> 
>    printf("-------------------------------------------------\n");
>    printf("%s\n", OSM_VERSION);
> +#if defined ( OSM_VENDOR_INTF_OPENIB )
> +  if (strlen(OSM_SVN_REVISION))
> +     printf("Based on OpenIB svn %s\n", OSM_SVN_REVISION);
> +#endif
> 
>    osm_subn_set_default_opt(&opt);
>    osm_subn_parse_conf_file(&opt);
> Index: opensm/Makefile.am
> ===================================================================
> --- opensm/Makefile.am	(revision 5193)
> +++ opensm/Makefile.am	(working copy)
> @@ -9,6 +9,23 @@ else
>  DBGFLAGS = -g
>  endif
> 
> +if OSMV_OPENIB
> +$(srcdir)/../include/opensm/osm_svn_revision_new.h:
> +	echo -n "#define OSM_SVN_REVISION \""
> >$(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
> +	svnversion $(srcdir)/.. | tr -d '\n' >>
> $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
> +	echo "\"" >> $(srcdir)/../include/opensm/osm_svn_revision_new.h
> +
> +$(srcdir)/../include/opensm/osm_svn_revision.h:
> $(srcdir)/../include/opensm/osm_svn_revision_new.h
> +	if cmp -s $(srcdir)/../include/opensm/osm_svn_revision_new.h \
> +		  $(srcdir)/../include/opensm/osm_svn_revision.h ; \
> +	then \
> +		rm $(srcdir)/../include/opensm/osm_svn_revision_new.h ;
\
> +	else \
> +		mv $(srcdir)/../include/opensm/osm_svn_revision_new.h \
> +		   $(srcdir)/../include/opensm/osm_svn_revision.h ; \
> +	fi
> +endif
> +
>  libopensm_la_CFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT
> $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1
> 
>  if HAVE_LD_VERSION_SCRIPT
> 
> 
> 




More information about the general mailing list