EPICS-synApps / support

APS BCDA synApps module: support
http://epics-synapps.github.io/support/
Other
3 stars 12 forks source link

assemble_synApps.sh has problems with areaDetector #13

Closed MarkRivers closed 4 years ago

MarkRivers commented 4 years ago

I helped Pete Jemian track down problems building a Docker container that used assemble_synApps.sh to download and build synApps. It took quite a while to figure out the problem, which was with the way that assemble_synApps.sh handles areaDetector. Here are some comments:

# We are still using Epics v3
echo 'WITH_PVA = NO' >> CONFIG_SITE.local.linux-x86_64
echo 'WITH_PVA = NO' >> CONFIG_SITE.local.linux-x86_64.linux-arm
echo 'WITH_PVA = NO' >> CONFIG_SITE.local.vxWorks
echo 'WITH_PVA = NO' >> CONFIG_SITE.local.win32-x86
echo 'WITH_PVA = NO' >> CONFIG_SITE.local.windows-x64
echo 'WITH_PVA = NO' >> CONFIG_SITE.local.win32-x86-static
echo 'WITH_PVA = NO' >> CONFIG_SITE.local.windows-x64-static

# We are still using Epics v3
echo 'WITH_QSRV = NO' >> CONFIG_SITE.local.linux-x86_64
echo 'WITH_QSRV = NO' >> CONFIG_SITE.local.vxWorks
echo 'WITH_QSRV = NO' >> CONFIG_SITE.local.win32-x86
echo 'WITH_QSRV = NO' >> CONFIG_SITE.local.windows-x64
echo 'WITH_QSRV = NO' >> CONFIG_SITE.local.win32-x86-static
echo 'WITH_QSRV = NO' >> CONFIG_SITE.local.windows-x64-static

Creating all of the architecture-specific files is what took a long time to track down. These settings are really not architecture-specific, they are global because of the version of EPICS base you are using. This change should be done by using "sed" on CONFIG_SITE.local.

# DBD files aren't separated between architectures, so there are issues building
echo 'BUILD_IOCS = NO' >> CONFIG_SITE.local.linux-x86_64
echo 'BUILD_IOCS = NO' >> CONFIG_SITE.local.vxWorks
echo 'BUILD_IOCS = NO' >> CONFIG_SITE.local.win32-x86
echo 'BUILD_IOCS = NO' >> CONFIG_SITE.local.windows-x64
echo 'BUILD_IOCS = NO' >> CONFIG_SITE.local.win32-x86-static
echo 'BUILD_IOCS = NO' >> CONFIG_SITE.local.windows-x64-static

I don't understand that comment or the need to disable building IOCs. This was the most puzzling thing with Pete, why the IOCs were not being built until we discovered that assemble_synApps.sh was creating these files that are not in the distribution. I build the IOCs for all of these architectures when I build areaDetector. Please tell me what errors you are getting when you build the IOCs. Again if you don't want to build the IOCs this should be done with sed in CONFIG_SITE.local not in architecture specific files.

#HDF5 flag for windows
echo 'HDF5_STATIC_BUILD=$(STATIC_BUILD)' >> CONFIG_SITE.local.win32-x86
echo 'HDF5_STATIC_BUILD=$(STATIC_BUILD)' >> CONFIG_SITE.local.win32-x86-static
echo 'HDF5_STATIC_BUILD=$(STATIC_BUILD)' >> CONFIG_SITE.local.windows-x64
echo 'HDF5_STATIC_BUILD=$(STATIC_BUILD)' >> CONFIG_SITE.local.windows-x64-static

These lines are not necessary. Just add this line because those settings are already in the example file:

cp EXAMPLE_CONFIG_SITE.local.WIN32 CONFIG_SITE.local.WIN32
#Can't just use default RELEASE.local because it has simDetector commented out
echo 'ADSIMDETECTOR=$(AREA_DETECTOR)/ADSimDetector' >> RELEASE.local
echo 'ADSUPPORT=$(AREA_DETECTOR)/ADSupport' >> RELEASE.local
echo '-include $(TOP)/configure/RELEASE_PRODS.local' >> RELEASE.local
echo '-include $(TOP)/configure/RELEASE.local.$(EPICS_HOST_ARCH)' >> RELEASE.local

Rather than blowing away the distributed RELEASE.local use sed to uncomment that one line.

MarkRivers commented 4 years ago

I will test my suggestions and make a pull request.

MarkRivers commented 4 years ago

I have made the folloiwing changes to assemble_synApps.sh

echo "SUPPORT=$SUPPORT" >> RELEASE_SUPPORT.local echo "EPICS_BASE=$EPICS_BASE" >> RELEASE_BASE.local

areaDetector master no longer uses RELEASE_SUPPORT.local or RELEASE_BASE.local.  Those were used to be able to override the definitions of SUPPORT and EPICS_BASE when building on Windows and Linux in the same tree.  That is now handled by using the standard 

-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local


areaDetector master configure/RELEASE now includes RELEASE_PRODS.local rather than RELEASE_LIBS.local.  This ensures that the areaDetector dependencies are correct in the top-level support/Makefile without needing to modify that file in assemble_synApps.sh.

With areaDetector-master, asyn R4-37 and this new version of assemble_synApps.sh "make" correctly builds synApps including areaDetector with ADSimDetector.
keenanlang commented 4 years ago

Fixed as of 3d43203