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  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  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  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Re: Getting Permission denied messages while building
From: "Barrett \(US\), Patrick E via Tech-talk" <tech-talk at aps.anl.gov>
To: "anj at anl.gov" <anj at anl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 21 Apr 2022 21:43:32 +0000

I added a RULES_USER with the additional targets, thank you.  When running make PRINT.HDEPENDS.c, I get:

[master@scwksXX ioc]$ make PRINT.HDEPENDS.c

HDEPENDS.c = ''

[master@scwksXX ioc]$ make PRINT.COMPILE.c

COMPILE.c = 'cc    -c'

 

So the issue seems to only be in the header dependency section, because it does compile. 

 

We did add the following to CONFIG_COMMON, which could probably be moved:

INCLUDES = -I../../include

INCLUDES += -I. $(SRC_INCLUDES) $(INSTALL_INCLUDES) $(RELEASE_INCLUDES)\

$(TARGET_INCLUDES) $(USR_INCLUDES) $(CMD_INCLUDES) $(OP_SYS_INCLUDES)\

$($(BUILD_CLASS)_INCLUDES)

 

I am not sure why that would have an affect on the HDEPENDS part though.  The last run was in src/ioc and the code did compile, but I still have the error messages throughout the compile.

 

We did make the following changes to the Makefile in base:

# Include MakefileSupport.mk

include $(GRSC_BASE)/MakefileSupport.mk

# Declare targets that should be checked for targets that the EPICS Build facility

# does not handle

TARGETS=install

# Check if the $(MAKECMDGOALS) contains any of the targets

ifneq (,$(filter $(TARGETS), $(MAKECMDGOALS)))

##########################################################################################################

# IF TARGETS ARE IN MAKECMDGOALS

##########################################################################################################

INSTALL_DIRS=$(SCID_PATH)/EPICS

INSTALL_PREFIX=install_

SCID_SUBDIRS = bin lib

SCID_INSTALL_FILES=$(addprefix $(INSTALL_PREFIX),$(SCID_SUBDIRS))

 

install: $(SCID_INSTALL_FILES)

                @echo "GRSC_BASE: $(GRSC_BASE)

 

$(SCID_INSTALL_FILES): | $(INSTALL_DIRS)

                $(call IF_DIR_EXISTS,$(@:$(INSTALL_PREFIX)%=%),${CP} -l "$(@:$(INSTALL_PREFIX)%=%)" "$(SCID_PATH)/EPICS")

 

$(INSTALL_DIRS):

                ${MKDIR} $@

               

.PHONY = $(SCID_INSTALL_FILES) $(INSTALL_DIRS) install all

##########################################################################################################

else

##########################################################################################################

# ELSE RUN NORMAL BUILD

##########################################################################################################

 

TOP = .

include $(TOP)/configure/CONFIG

 

# Bootstrap resolution: tools not installed yet

TOOLS = $(TOP)/src/tools

 

DIRS += configure src

 

src_DEPEND_DIRS = configure

 

include $(TOP)/configure/RULES_TOP

endif

 

I have attached the MakefileSupport.mk file as well.

 

Patrick

 

From: anj at anl.gov <anj at anl.gov>
Sent: Thursday, April 21, 2022 4:43 PM
To: Barrett (US), Patrick E <patrick.e.barrett at boeing.com>; tech-talk at aps.anl.gov
Subject: [EXTERNAL] Re: Getting Permission denied messages while building

 

EXT email: be mindful of links/attachments.


 

Hi Patrick,

Oops, sorry about the PRINT.% rule, that was added in 3.16.1 but I have a local User-rules file which adds it for base-3.15 and earlier builds. You could put this text into a file ~/configure/RULES_USER to do the same:

# Special build rules
 
# These got added to 3.16 and up:
ifndef BASE_3_16
 
#---------------------------------------------------------
# These rules show the set of Makefiles, config files and
# rules files loaded by GNUmake.
 
SHOW_MAKEFILES = $(MAKEFILE_LIST:%=show-makefile.%)
show-makefiles: $(SHOW_MAKEFILES)
 
# The sort prevents warnings about duplicate targets:
$(sort $(SHOW_MAKEFILES)): show-makefile.%:
  @echo "    $(@:show-makefile.%=%)"
 
.PHONY: show-makefiles show-makefile.%
 
#---------------------------------------------------------
# These rules support printing a Makefile variable values.
# Many variables are only set inside an O.<arch> build directory.
#   make PRINT.T_A
 
PRINT_Var = $(@:PRINT.%=%)
PRINT.%:
  @echo "$(PRINT_Var) = '$($(PRINT_Var))'"
 
.PHONY: PRINT.%
 
endif   # BASE_3_16


Here's the output I get from running
make PRINT.HDEPENDS.c in the src/ioc/db/test/O.linux-x86_64 directory on RHEL-7.9:


tux% make PRINT.HDEPENDS.c
make -f ../Makefile TOP=../../../../.. T_A=linux-x86_64  PRINT.HDEPENDS.c
make[1]: Entering directory '/home/phoebus4/ANJ/epics/base/3.15/src/ioc/db/test/O.linux-x86_64'
HDEPENDS.c = '/usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -D_X86_64_  -DUNIX  -Dlinux     -O3   -Wall      -mtune=generic     -m64 -Wpointer-arith -fvisibility=hidden  -I. -I../O.Common -I. -I. -I.. -I../../../../../include/compiler/gcc -I../../../../../include/os/Linux -I../../../../../include         -MM -MF PRINT.HDEPENDS.c '
make[1]: Leaving directory '/home/phoebus4/ANJ/epics/base/3.15/src/ioc/db/test/O.linux-x86_64'

 

On 4/21/22 2:49 PM, Barrett (US), Patrick E wrote:

It doesn’t seem the default rules have one for PRINT., so I added the following line to the Makefile “PRINT.%  : ; @echo $* = $($*)”

 

The output shows:

[master@scwksXX O.linux-x86_64]$ make PRINT.HDEPENDS.c

HDEPENDS.c =


Rules added to the Makefile inside an O.<arch> directory won't see the variables that get set elsewhere in the build system, which explains why your output looks so different to mine — GNUmake just runs what you've asked it to immediately instead of deferring to the parent directory's Makefile and hence pulling in the rest of the EPICS build system before it runs the recipe.

You didn't answer my earlier question about local modifications to the sources, and I'm currently suspecting that you may have some changes which are somehow causing the problem. I can't think what could be causing GNUmake to try and execute the .c and .cpp files in that directory otherwise, when presumably it built the rest of Base quite happily. Can you confirm that by going to a different directory, say the src/ioc directory and running just 'make' there?

- Andrew



Patrick

From: Barrett (US), Patrick E <>
Sent: Thursday, April 21, 2022 1:41 PM
To: 'anj at anl.gov' <anj at anl.gov>; 'tech-talk at aps.anl.gov' <tech-talk at aps.anl.gov>
Subject: RE: [EXTERNAL] Re: Getting Permission denied messages while building

 

We are running on a RedHat Linux OS and the $EPICS_HOST_ARCH is linux-x86_64.  The gcc version is 4.8.5, using perl version (v5.16.3)

 

Each of the error lines comes after it says it is running a RULES_BUILD line and it looks like the HDEPEND…  were not set.  The output from your requested command is:

 

[master@scwksXX O.linux-x86_64]$ make PRINT.HDEPENDS.c

make -f ../Makefile TOP=../../../../.. T_A=linux-x86_64  PRINT.HDEPENDS.c

make[1]: Entering directory `/home/master/workspace/egse-gr/sc/EPICS/base/src/ioc/db/test/O.linux-x86_64'

../dbLinkdset.c

make[1]: execvp: ../dbLinkdset.c: Permission denied

../xRecord.c

make[1]: execvp: ../xRecord.c: Permission denied

../arrRecord.c

make[1]: execvp: ../arrRecord.c: Permission denied

dbTestIoc_registerRecordDeviceDriver.cpp

make[1]: execvp: dbTestIoc_registerRecordDeviceDriver.cpp: Permission denied

../dbPutGetTest.c

make[1]: execvp: ../dbPutGetTest.c: Permission denied

../recGblCheckDeadbandTest.c

make[1]: execvp: ../recGblCheckDeadbandTest.c: Permission denied

../benchdbConvert.c

make[1]: execvp: ../benchdbConvert.c: Permission denied

../arrShorthandTest.c

make[1]: execvp: ../arrShorthandTest.c: Permission denied

../chfPluginTest.c

make[1]: execvp: ../chfPluginTest.c: Permission denied

dbChArrTest_registerRecordDeviceDriver.cpp

make[1]: execvp: dbChArrTest_registerRecordDeviceDriver.cpp: Permission denied

../dbChArrTest.cpp

make[1]: execvp: ../dbChArrTest.cpp: Permission denied

../dbChannelTest.c

make[1]: execvp: ../dbChannelTest.c: Permission denied

scanIoTest_registerRecordDeviceDriver.cpp

make[1]: execvp: scanIoTest_registerRecordDeviceDriver.cpp: Permission denied

../scanIoTest.c

make[1]: execvp: ../scanIoTest.c: Permission denied

../dbCaStatsTest.c

make[1]: execvp: ../dbCaStatsTest.c: Permission denied

../dbStateTest.c

make[1]: execvp: ../dbStateTest.c: Permission denied

../callbackParallelTest.c

make[1]: execvp: ../callbackParallelTest.c: Permission denied

../callbackTest.c

make[1]: execvp: ../callbackTest.c: Permission denied

../testdbConvert.c

make[1]: execvp: ../testdbConvert.c: Permission denied

../dbLockTest.c

make[1]: execvp: ../dbLockTest.c: Permission denied

../dbPutLinkTest.c

make[1]: execvp: ../dbPutLinkTest.c: Permission denied

../dbShutdownTest.c

make[1]: execvp: ../dbShutdownTest.c: Permission denied

make[1]: *** No rule to make target `PRINT.HDEPENDS.c'.  Stop.

make[1]: Leaving directory `/home/master/workspace/egse-gr/sc/EPICS/base/src/ioc/db/test/O.linux-x86_64'

make: *** [PRINT.HDEPENDS.c] Error 2

 

thank you,

Patrick

From: Andrew Johnson <anj at anl.gov>
Sent: Thursday, April 21, 2022 11:24 AM
To: Barrett (US), Patrick E <patrick.e.barrett at boeing.com>; tech-talk at aps.anl.gov
Subject: [EXTERNAL] Re: Getting Permission denied messages while building

 

EXT email: be mindful of links/attachments.

 
 

Hi Patrick,

On 4/21/22 8:11 AM, Barrett (US), Patrick E via Tech-talk wrote:

I have just upgraded to 3.15.9 and when running the build have started getting messages similar to:

../scanIoTest.c

make[3]: execvp: ../scanIoTest.c: Permission denied

 

I believe this has to do with determining header dependencies and I believe the “$(HDEPENDS.c)”, in this case, is not getting set.  I have the issue with .cpp files as well.  What should I check to resolve this? 


Can you provide some more information about the system this is running on, (OS, $EPICS_HOST_ARCH value, and your compiler and Perl versions), and include the build output starting from several lines earlier in the build before it fails. The line you quote above implies that it's trying to execute the .c file, which is weird. Do you have any local modifications to the Base 3.15.9 sources at all?

It would also be helpful if you can do this and send the output:

$ cd src/ioc/db/test/O.<host-arch>
$ make PRINT.HDEPENDS.c

That will show me how it's trying to create the dependency file. The 'make PRINT.<make-variable>' command uses a fairly new pattern target which is very useful for debugging build issues like this, but you do need to be in the right directory when you use it to get the value that you're actually looking for.

- Andrew

-- 
Complexity comes for free, Simplicity you have to work for.



-- 
Complexity is free, it's Simplicity that takes work.

Attachment: MakefileSupport.mk
Description: MakefileSupport.mk


Navigate by Date:
Prev: Re: Getting Permission denied messages while building anj--- via Tech-talk
Next: Controls Software Engineer / Python Developer (f/m/d) Steffen Hauf 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  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: Getting Permission denied messages while building anj--- via Tech-talk
Next: RE: Re: Getting Permission denied messages while building Barrett (US), Patrick E 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  2018  2019  2020  2021  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·