Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020 
<== Date ==> <== Thread ==>

Subject: Re: Makefile question
From: Mark Rivers via Tech-talk <tech-talk@aps.anl.gov>
To: Ralph Lange <ralph.lange@gmx.de>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 10 Dec 2018 12:42:32 +0000
Freddie Akeroyd actually sent me the solution yesterday, but due to the the "Reply All" issue with tech-talk my reply only went to him.  Grrr.  I need to remember to look at the CC line.


 As Ralph also said, it was just a mistake that I was using LIBARY_IOC= rather than LIBRARY_IOC+=

In fact the 2 library solution does not work on Windows shareable because bitshuffle does not current export the needed functions with __declspec(dllexport).  The one library solution also does not work on shareable Windows because hdf5 reports 3 missing symbols.  I'm still working on the best solution.

Thanks,
Mark





________________________________
From: tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> on behalf of Ralph Lange via Tech-talk <tech-talk@aps.anl.gov>
Sent: Monday, December 10, 2018 1:59 AM
To: EPICS Tech Talk
Subject: Re: Makefile question

On Mon, 10 Dec 2018 at 05:39, Johnson, Andrew N. via Tech-talk <tech-talk@aps.anl.gov<mailto:tech-talk@aps.anl.gov>> wrote:
I haven't checked the build rules yet, but I wonder if your bitshuffle_hdf5_LIBS setting is wrong, shouldn't that be set to bitshuffle instead of bitshuffle_hdf5? It currently looks like you're asking the build to link that library against itself. I suspect that if you fix that the build system may do what you want automatically.

@Andrew: As far as I see, there's no underscore in that setting. So, bitshuffle_hdf5 is supposed to be linked against two libraries, bitshuffle and hdf5, which makes sense. (And matches the requirement to build bitshuffle first.)

What I noticed is that the WITH_HDF5 clause resets LIBRARY_IOC to be bitshuffle_hdf5 instead of bitshuffle. I would assume that this should rather be added using '+=' ... at least that's how it is mentioned in the AppDevelopers (in 4.4.4 "Simple Makefile examples").

Cheers,
~Ralph


On Dec 9, 2018, at 7:49 AM, Mark Rivers via Tech-talk <tech-talk@aps.anl.gov<mailto:tech-talk@aps.anl.gov>> wrote:


I have a Makefile that builds 2 libraries.  Library A must be built before library B, because B depends on A (important for dynamic builds on Windows).  What is the rule I need to add to force A to be built before B?





This is the actual Makefile.  bitshuffle_hdf5.lib must be built after bitshuffle.lib.



TOP=../..

include $(TOP)/configure/CONFIG

#----------------------------------------

#  ADD MACRO DEFINITIONS AFTER THIS LINE

#=============================





ifeq ($(WITH_BITSHUFFLE),YES)

  ifeq ($(BITSHUFFLE_EXTERNAL),NO)



    LIBRARY_IOC = bitshuffle

    BITSHUFFLE = $(TOP)/supportApp/bitshuffleSrc

    USR_CFLAGS_Linux += -std=c99

    USR_CFLAGS_WIN32 += -DLZ4_DLL_EXPORT=1



    INC += bitshuffle.h

    INC += bitshuffle_core.h

    INC += bshuf_h5filter.h

    bitshuffle_SRCS += bitshuffle.c

    bitshuffle_SRCS += bitshuffle_core.c

    bitshuffle_SRCS += iochain.c



    SRC_DIRS += $(BITSHUFFLE)/lz4

    INC += lz4.h

    bitshuffle_SRCS += lz4.c



    ifeq ($(WITH_HDF5),YES)

        LIBRARY_IOC = bitshuffle_hdf5

        bitshuffle_hdf5_SRCS += bshuf_h5filter.c

        bitshuffle_hdf5_SRCS += bshuf_h5plugin.c

        bitshuffle_hdf5_LIBS += bitshuffle hdf5

    endif # ($(WITH_HDF5),YES)



  endif # ($(BITSHUFFLE_EXTERNAL),NO)

endif # ($(WITH_BITSHUFFLE),YES)



include $(TOP)/configure/RULES

#----------------------------------------

#  ADD RULES AFTER THIS LINE







I tried this rule, which would only work on Windows, but it did not work.



bitshuffle_hdf5.lib: bitshuffle.lib





References:
Makefile question Mark Rivers via Tech-talk
Re: Makefile question Johnson, Andrew N. via Tech-talk
Re: Makefile question Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: Makefile question Ralph Lange via Tech-talk
Next: Build failure when compiling synApps from source Iain Marcuson via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020 
Navigate by Thread:
Prev: Re: Makefile question Ralph Lange via Tech-talk
Next: Build failure when compiling synApps from source Iain Marcuson via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020 
ANJ, 11 Dec 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·