EPICS Controls 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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Another build-system bug in 3.14.12
From: Mark Rivers <[email protected]>
To: Benjamin Franksen <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 12 Mar 2014 15:48:29 +0000
Hi Ben,

Here is how I have done this.

- Create an os/$(OS_CLASS) subdirectory.

For example:

corvette:areaDetector/ADBinaries/hdf5Support>ls os/WIN32/
COPYING       H5DSpublic.h  H5FDcore.h    H5FDmpi.h       H5FDpublic.h   H5Fpublic.h   H5LTpublic.h  H5PTpublic.h  H5TBpublic.h  H5overflow.h    H5public.h
H5ACpublic.h  H5Dpublic.h   H5FDdirect.h  H5FDmpio.h      H5FDsec2.h     H5Gpublic.h   H5Lpublic.h   H5Ppublic.h   H5Tpublic.h   H5pubconf.h     H5version.h
H5Apublic.h   H5Epubgen.h   H5FDfamily.h  H5FDmpiposix.h  H5FDstdio.h    H5IMpublic.h  H5MMpublic.h  H5Rpublic.h   H5Zpublic.h   H5pubconf_32.h  hdf5.h
H5Cpublic.h   H5Epublic.h   H5FDlog.h     H5FDmulti.h     H5FDwindows.h  H5Ipublic.h   H5Opublic.h   H5Spublic.h   H5api_adpt.h  H5pubconf_64.h  hdf5_hl.h

Then your Makefile can have this:

corvette:areaDetector/ADBinaries/hdf5Support>ls os/WIN32/
COPYING       H5DSpublic.h  H5FDcore.h    H5FDmpi.h       H5FDpublic.h   H5Fpublic.h   H5LTpublic.h  H5PTpublic.h  H5TBpublic.h  H5overflow.h    H5public.h
H5ACpublic.h  H5Dpublic.h   H5FDdirect.h  H5FDmpio.h      H5FDsec2.h     H5Gpublic.h   H5Lpublic.h   H5Ppublic.h   H5Tpublic.h   H5pubconf.h     H5version.h
H5Apublic.h   H5Epubgen.h   H5FDfamily.h  H5FDmpiposix.h  H5FDstdio.h    H5IMpublic.h  H5MMpublic.h  H5Rpublic.h   H5Zpublic.h   H5pubconf_32.h  hdf5.h
H5Cpublic.h   H5Epublic.h   H5FDlog.h     H5FDmulti.h     H5FDwindows.h  H5Ipublic.h   H5Opublic.h   H5Spublic.h   H5api_adpt.h  H5pubconf_64.h  hdf5_hl.h


This works fine with standard base I believe, including with "make -j".

Mark


________________________________________
From: [email protected] [[email protected]] on behalf of Benjamin Franksen [[email protected]]
Sent: Wednesday, March 12, 2014 10:35 AM
To: [email protected]
Subject: Another build-system bug in 3.14.12

Hi

I tried to fix the INC_<osclass> problem "by hand" like this:

ifeq ($(OS_CLASS),vxWorks)
inc: $(INSTALL_INCLUDE)/os/$(OS_CLASS)/bla.h
endif

instead of defining INC_vxWorks. This seems to work.

Now, in my real application the build was still broken, but only when
using parallel make i.e. make -j. I reproduced this in my cut-down
example with the following Makefile:

"""
TOP = ..
include $(TOP)/configure/CONFIG
#-----------------------------------------------
#  ADD MACRO DEFINITIONS AFTER THIS LINE

inc: $(INSTALL_INCLUDE)/os/$(OS_CLASS)/bla.h

LIBRARY_IOC += bla

bla_SRCS += bla.c

include $(TOP)/configure/RULES
#-----------------------------------------------
#  ADD RULES AFTER THIS LINE

bla.h:
        sleep 1
        echo "struct x {int y; };" > bla.h
"""

(The bla.c is trivial and includes bla.h).

This fails with

franksen@tiber: ~/tmp/inc-bug > make -sj distclean && make -sj
../bla.c:1:17: fatal error: bla.h: No such file or directory
compilation terminated.
make[2]: *** [bla.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [install.linux-x86] Error 2
make: *** [bugApp.install] Error 2

However, it works if I add an explicit dependency in the Makefile:

bla.o: bla.h

Inspecting the generated dependency makefile snippets shows why the
parallel build fails: they are empty:

franksen@tiber: ~/tmp/inc-bug > find -name *.d
./bugApp/O.RTEMS-mvme2100/bla.d
./bugApp/O.RTEMS-mvme5500/bla.d
franksen@tiber: ~/tmp/inc-bug > cat ./bugApp/O.RTEMS-mvme2100/bla.d
franksen@tiber: ~/tmp/inc-bug > cat ./bugApp/O.RTEMS-mvme5500/bla.d

Cheers
Ben
--
"Make it so they have to reboot after every typo." ― Scott Adams


Replies:
RE: Another build-system bug in 3.14.12 Mark Rivers
References:
Another build-system bug in 3.14.12 Benjamin Franksen

Navigate by Date:
Prev: Another build-system bug in 3.14.12 Benjamin Franksen
Next: RE: Another build-system bug in 3.14.12 Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Another build-system bug in 3.14.12 Benjamin Franksen
Next: RE: Another build-system bug in 3.14.12 Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·