[mpich2-dev] mpe2 build patches.

chan at mcs.anl.gov chan at mcs.anl.gov
Mon Sep 13 14:14:34 CDT 2010


Justin,

I have just opened a bug report about this issue
and will communicate though our bug reporting system.

A.Chan

----- "Justin Bronder" <jsbronder at gentoo.org> wrote:

> Gentoo bug #335590[1] pointed out that the trace examples in slog2sdk
> were
> building without supporting user-defined LDFLAGS.  The two attached
> patches
> fix this as well as removing installation of the libraries from the
> compile
> phase of the build.
> 
> Hopefully I'm sending these patches to the correct list, if not,
> please
> accept my apologies.
> 
> Thanks,
> 
> 1. http://bugs.gentoo.org/show_bug.cgi?id=335590
> 
> From 5bc91497bd4b3d2e4e962ffb2d5b9b471c4183c2 Mon Sep 17 00:00:00
> 2001
> From: Justin Bronder <jsbronder at gmail.com>
> Date: Mon, 13 Sep 2010 14:18:51 -0400
> Subject: [PATCH 1/2] slog2sdk/trace_rlog makefile fixes
> 
> - Respect user-defined LDFLAGS when linking PGM_PRINT and PGM_CHECK.
> - Do not install libraries during the compile phase.
> ---
>  src/slog2sdk/trace_rlog/src/Makefile.in |   19 ++++++++-----------
>  1 files changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/src/slog2sdk/trace_rlog/src/Makefile.in
> b/src/slog2sdk/trace_rlog/src/Makefile.in
> index 9b289b8..2d772e0 100644
> --- a/src/slog2sdk/trace_rlog/src/Makefile.in
> +++ b/src/slog2sdk/trace_rlog/src/Makefile.in
> @@ -48,7 +48,8 @@ RM               = @RM@
>  
>  JNI_INC          = @JNI_INC@
>  CFLAGS           = -I.. $(JNI_INC) -I$(TRACE_INCDIR) @COPTS@
> -LDFLAGS          = -module -no-undefined -avoid-version @LDFLAGS@
> +LDFLAGS          = @LDFLAGS@
> +LIBLDFLAGS       = -module -no-undefined -avoid-version @LDFLAGS@
>  
>  # memory leak checker
>  MEMLIBS          = @DEBUG_LIBS@
> @@ -66,33 +67,29 @@ ALL: $(libbuild_dir)/$(LIB_TRACE)
> $(binbuild_dir)/$(PGM_PRINT) $(binbuild_dir)/$
>  
>  $(libbuild_dir)/$(LIB_TRACE): $(LOBJ)
>  	if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \
> -	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS)
> \
> +	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ)
> $(LIBLDFLAGS) \
>  	               -export-symbols $(srcdir)/JavaTraceInput.sym \
>  	               -rpath $(libbuild_dir) ; \
>  	else \
> -	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS)
> \
> +	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ)
> $(LIBLDFLAGS) \
>  	               -rpath $(libbuild_dir) ; \
>  	fi
> -	$(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(libbuild_dir)
> -	$(LIBTOOL) --finish $(libbuild_dir)
>  
>  INSTALL_LIBSO: $(LOBJ)
>  	if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \
> -	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS)
> \
> +	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ)
> $(LIBLDFLAGS) \
>  	               -export-symbols $(srcdir)/JavaTraceInput.sym \
>  	               -rpath $(LIBDIR) ; \
>  	else \
> -	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS)
> \
> +	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ)
> $(LIBLDFLAGS) \
>  	               -rpath $(LIBDIR) ; \
>  	fi
> -	$(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE)
> $(DESTDIR)$(LIBDIR)
> -	$(LIBTOOL) --finish $(LIBDIR)
>  
>  $(binbuild_dir)/$(PGM_PRINT): $(OBJ4T)
> -	$(CC) @COPTS@ -o $@ $(OBJ4T) $(MEMLIBS)
> +	$(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4T) $(MEMLIBS)
>  
>  $(binbuild_dir)/$(PGM_CHECK): $(OBJ4E)
> -	$(CC) @COPTS@ -o $@ $(OBJ4E) $(MEMLIBS)
> +	$(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4E) $(MEMLIBS)
>  
>  clean:
>  	@-$(RM) *. at OBJEXT@ *.lo *.la
> -- 
> 1.7.1
> 
> 
> From b23d8d40cf62d03cad7ce777565069368e040a96 Mon Sep 17 00:00:00
> 2001
> From: Justin Bronder <jsbronder at gmail.com>
> Date: Mon, 13 Sep 2010 14:22:10 -0400
> Subject: [PATCH 2/2] slog2sdk/trace_sample makefile fixes
> 
> - Respect user-defined LDFLAGS when linking PGM_PRINT and PGM_CHECK.
> - Do not install libraries during the compile phase.
> ---
>  src/slog2sdk/trace_sample/src/Makefile.in |   19 ++++++++-----------
>  1 files changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/src/slog2sdk/trace_sample/src/Makefile.in
> b/src/slog2sdk/trace_sample/src/Makefile.in
> index f716fff..8d3641a 100644
> --- a/src/slog2sdk/trace_sample/src/Makefile.in
> +++ b/src/slog2sdk/trace_sample/src/Makefile.in
> @@ -48,7 +48,8 @@ RM               = @RM@
>  
>  JNI_INC          = @JNI_INC@
>  CFLAGS           = -I.. $(JNI_INC) -I$(TRACE_INCDIR) @COPTS@
> -LDFLAGS          = -module -no-undefined -avoid-version @LDFLAGS@
> +LDFLAGS          = @LDFLAGS@
> +LIBLDFLAGS       = -module -no-undefined -avoid-version @LDFLAGS@
>  
>  # memory leak checker
>  MEMLIBS          = @DEBUG_LIBS@
> @@ -66,33 +67,29 @@ ALL: $(libbuild_dir)/$(LIB_TRACE)
> $(binbuild_dir)/$(PGM_PRINT) $(binbuild_dir)/$
>  
>  $(libbuild_dir)/$(LIB_TRACE): $(LOBJ)
>  	if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \
> -	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS)
> \
> +	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ)
> $(LIBLDFLAGS) \
>  	               -export-symbols $(srcdir)/JavaTraceInput.sym \
>  	               -rpath $(libbuild_dir) ; \
>  	else \
> -	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS)
> \
> +	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ)
> $(LIBLDFLAGS) \
>  	               -rpath $(libbuild_dir) ; \
>  	fi
> -	$(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE) $(libbuild_dir)
> -	$(LIBTOOL) --finish $(libbuild_dir)
>  
>  INSTALL_LIBSO: $(LOBJ)
>  	if [ "$(EXPORT_SYMBOLS)" = "yes" ] ; then \
> -	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS)
> \
> +	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ)
> $(LIBLDFLAGS) \
>  	               -export-symbols $(srcdir)/JavaTraceInput.sym \
>  	               -rpath $(LIBDIR) ; \
>  	else \
> -	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ) $(LDFLAGS)
> \
> +	    $(LIBTOOL) --mode=link $(CC) -o $(LIB_TRACE) $(LOBJ)
> $(LIBLDFLAGS) \
>  	               -rpath $(LIBDIR) ; \
>  	fi
> -	$(LIBTOOL) --mode=install $(INSTALL) $(LIB_TRACE)
> $(DESTDIR)$(LIBDIR)
> -	$(LIBTOOL) --finish $(LIBDIR)
>  
>  $(binbuild_dir)/$(PGM_PRINT): $(OBJ4T)
> -	$(CC) @COPTS@ -o $@ $(OBJ4T) $(MEMLIBS)
> +	$(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4T) $(MEMLIBS)
>  
>  $(binbuild_dir)/$(PGM_CHECK): $(OBJ4E)
> -	$(CC) @COPTS@ -o $@ $(OBJ4E) $(MEMLIBS)
> +	$(CC) @COPTS@ $(LDFLAGS) -o $@ $(OBJ4E) $(MEMLIBS)
>  
>  clean:
>  	@-$(RM) *. at OBJEXT@ *.lo *.la
> -- 
> 1.7.1
> 
> -- 
> Justin Bronder


More information about the mpich2-dev mailing list