Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • practical_beamline_controls_training/session_2/instructions
1 result
Show changes
Commits on Source (2)
...@@ -225,7 +225,7 @@ The **configure/CONFIG_SITE.local** file is used to specify local configuration ...@@ -225,7 +225,7 @@ The **configure/CONFIG_SITE.local** file is used to specify local configuration
The IOC build system will now use an alternative networking library instead of libnet, allowing the IOC to be built without requiring the installation of the net library. The IOC build system will now use an alternative networking library instead of libnet, allowing the IOC to be built without requiring the installation of the net library.
**Note:** the linux command ``$ echo "LINUX_NET_INSTALLED = NO" > configure/CONFIG_SITE.local`` writes the text "LINUX_NET_INSTALLED = NO" to the **configureCONFIG_SITE.local** file. If the file does not exist, the ``>`` sign creates the file and writes the output to it. If the file already exists, the ``>`` sign overwrites its contents with the new output. **Note:** the linux command ``$ echo "LINUX_NET_INSTALLED = NO" > configure/CONFIG_SITE.local`` writes the text "LINUX_NET_INSTALLED = NO" to the **configure/CONFIG_SITE.local** file. If the file does not exist, the ``>`` sign creates the file and writes the output to it. If the file already exists, the ``>`` sign overwrites its contents with the new output.
</details> </details>
......
...@@ -83,7 +83,7 @@ The error was much more helpful in step 2.4 because [xxx's CONFIG file prints th ...@@ -83,7 +83,7 @@ The error was much more helpful in step 2.4 because [xxx's CONFIG file prints th
<details> <details>
<summary>hint</summary> <summary>hint</summary>
The README.md file indicates: *"The definitions of `MOTOR` and `EPICS_BASE` need to be corrected in `motorVMC/configure/RELEASE` before motorVMC can be built."* The **motorVMC/README.md** file indicates: *"The definitions of `MOTOR` and `EPICS_BASE` need to be corrected in `motorVMC/configure/RELEASE` before motorVMC can be built."*
The **motorVMC/configure/RELEASE** file doesn't contain any definitions, but it does include other files **if they exist**. The **motorVMC/configure/RELEASE** file doesn't contain any definitions, but it does include other files **if they exist**.
...@@ -99,9 +99,9 @@ The **motorVMC/configure/RELEASE** file doesn't contain any definitions, but it ...@@ -99,9 +99,9 @@ The **motorVMC/configure/RELEASE** file doesn't contain any definitions, but it
$ cp -p configure/EXAMPLE_RELEASE.local configure/RELEASE.local $ cp -p configure/EXAMPLE_RELEASE.local configure/RELEASE.local
``` ```
The RELEASE.local file contains two variables that need be defined: `MOTOR` and `MOTOR_VMC` The **RELEASE.local** file contains two variables that need be defined: `MOTOR` and `MOTOR_VMC`
`MOTOR` should be set to the same path that is in the envPaths file: `MOTOR` should be set to the same path that is in the **envPaths** file:
``` ```
$ grep MOTOR ${IOC_DIR}/xxx/iocBoot/iocxxx/envPaths $ grep MOTOR ${IOC_DIR}/xxx/iocBoot/iocxxx/envPaths
...@@ -131,7 +131,8 @@ MOTOR_VMC=/home/beams/USERNAME/PET-S2/epics/synApps/support/motorVMC ...@@ -131,7 +131,8 @@ MOTOR_VMC=/home/beams/USERNAME/PET-S2/epics/synApps/support/motorVMC
<summary>where is EPICS_BASE defined?</summary> <summary>where is EPICS_BASE defined?</summary>
The `EPICS_BASE` variable is not explicitly defined: it is defined in the motor The `EPICS_BASE` variable is not explicitly defined: it is defined in the motor
configuration file that is included with on line 2 of the configure/RELEASE.local file `-include $(MOTOR)/modules/RELEASE.$(EPICS_HOST_ARCH).local`: configuration file that is included with on line 2 of the **configure/RELEASE.local**
file `-include $(MOTOR)/modules/RELEASE.$(EPICS_HOST_ARCH).local`:
``` ```
$ cat ${MOTOR}/modules/RELEASE.${EPICS_HOST_ARCH}.local $ cat ${MOTOR}/modules/RELEASE.${EPICS_HOST_ARCH}.local
...@@ -149,22 +150,32 @@ SUPPORT = /APSshare/epics/synApps_6_2_1/support ...@@ -149,22 +150,32 @@ SUPPORT = /APSshare/epics/synApps_6_2_1/support
<details> <details>
<summary>what is the difference between RELEASE and RELEASE.local?</summary> <summary>what is the difference between RELEASE and RELEASE.local?</summary>
In the motorVMC module's configure folder, the presence of two RELEASE files, RELEASE and RELEASE.local, suggests that there are two levels of configuration that can be applied when building the IOC. Here's the difference between the two: In the motorVMC module's configure folder, the presence of two **RELEASE** files,
**RELEASE** and **RELEASE.local**, allows for two levels of configuration that can
be applied when building the IOC. Here's the difference between the two:
- RELEASE file: - **RELEASE** file:
The RELEASE file contains the default configuration for the motorVMC module. It specifies the paths to external support modules or libraries required by the motorVMC module. This file provides a standard configuration that is used by default when building the IOC. The **RELEASE** file contains the default configuration for the motorVMC module.
It specifies the paths to external support modules or libraries required by the
motorVMC module. This file provides a standard configuration that is used by default
when building the IOC.
- RELEASE.local file: - **RELEASE.local** file:
The RELEASE.local file is intended for local customization of the configuration. It allows you to override or modify the default configuration specified in the RELEASE file. By including the RELEASE.local file in the configure/RELEASE file, you can provide additional or alternative configuration settings specific to your local environment or requirements. The **RELEASE.local** file is intended for local customization of the configuration.
It allows you to override or modify the default configuration specified in the
**RELEASE** file. By including the RELEASE.local file in the **configure/RELEASE**
file, you can provide additional or alternative configuration settings specific to
your local environment or requirements.
</details> </details>
<details> <details>
<summary>what is the difference between "building inside motor" and "building outside motor"?</summary> <summary>what is the difference between "building inside motor" and
"building outside motor"?</summary>
The RELEASE file contains the following: The **RELEASE** file contains the following:
``` ```
$ cat configure/RELEASE $ cat configure/RELEASE
...@@ -176,15 +187,28 @@ $ cat configure/RELEASE ...@@ -176,15 +187,28 @@ $ cat configure/RELEASE
-include $(TOP)/configure/RELEASE.local -include $(TOP)/configure/RELEASE.local
``` ```
"building inside motor" and "building outside motor" refer to different scenarios or environments for compiling or building the IOC. "building inside motor" and "building outside motor" refer to different scenarios
for compiling or building the IOC.
- Building inside motor: - Building inside motor:
When building inside motor, it implies that you are within the motor module's directory structure. The `$(TOP)` variable represents the top-level directory of the motor module. In this case, the IOC is being built as part of the motor module itself. When building inside motor, it implies that you are within the motor module's
The line `-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local` is included in the configure/RELEASE file. This line instructs the build system to include the generated release file from the motor module. The release file contains configuration information specific to the motor module, such as paths to external support modules or libraries. directory structure. The `$(TOP)` variable represents the top-level directory of
the motor module. In this case, the IOC is being built as part of the motor module
itself. The line `-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local` is included
in the configure/RELEASE file. This line instructs the build system to include
the generated release file from the motor module. The release file contains
configuration information specific to the motor module, such as paths to external
support modules or libraries.
- Building outside motor: - Building outside motor:
When building outside motor, it means you are not within the motor module's directory structure. It implies that you are building the IOC separately from the motor module: the 'make' command is issued in the ${SUPPORT_DIR}/motorVMC directory. When building outside motor, it means you are not within the motor module's directory
In this case, the line -include `$(TOP)/configure/RELEASE.local` is included in the configure/RELEASE file. This line instructs the build system to include the RELEASE.local file from the motorVMC module. The RELEASE.local file typically contains configuration information specific to the IOC being built outside the motor module. structure. It implies that you are building the IOC separately from the motor module:
the `make` command is issued in the ${SUPPORT_DIR}/motorVMC directory.
In this case, the line `-include $(TOP)/configure/RELEASE.local` is included in the
**configure/RELEASE** file. This line instructs the build system to include the
**RELEASE.local** file from the motorVMC module. The **RELEASE.local** file typically
contains configuration information specific to the IOC being built outside the motor
module.
</details> </details>
...@@ -222,11 +246,15 @@ make: *** [/APSshare/epics/base-7.0.4.1/configure/RULES_DIRS:85: configure.insta ...@@ -222,11 +246,15 @@ make: *** [/APSshare/epics/base-7.0.4.1/configure/RULES_DIRS:85: configure.insta
``` ```
</details> </details>
Note: this build error occurs when there is a mismatch (hard mount vs soft link) between the /APSshare mount on the computer that built the support on /APSshare and the computer building the IOC. The two `MOTOR` paths actually point to the same directory. Note: this build error occurs when there is a mismatch (hard mount vs soft link)
between the **/APSshare** mount on the computer that built the support on **/APSshare**
and the computer building the IOC. The two `MOTOR` paths actually point to the same
directory.
### 4.6 Resolve build error #2 ### 4.6 Resolve build error #2
The **configure/CONFIG_SITE** is where the checkRelease behavior is defined. The `CHECK_RELEASE` variable can be overridden to ignore this error. The **configure/CONFIG_SITE** is where the checkRelease behavior is defined.
The `CHECK_RELEASE` variable can be overridden to ignore this error.
<details> <details>
<summary>hint</summary> <summary>hint</summary>
...@@ -259,6 +287,35 @@ $ echo "CHECK_RELEASE = NO" > configure/CONFIG_SITE.local ...@@ -259,6 +287,35 @@ $ echo "CHECK_RELEASE = NO" > configure/CONFIG_SITE.local
``` ```
</details> </details>
<details>
<summary>what does this mean</summary>
The error message indicates a conflict between the `MOTOR` definition in the
**RELEASE.local** file and the `SUPPORT` support directory because of the
mounting configuration or symbolic links between different machines.
To resolve this error, you can modify the `CHECK_RELEASE` setting to either `NO`
or `WARN` in the **configure/CONFIG_SITE** file. This will disable or allow the build
to continue despite the inconsistency detected. However, please note that it's
important to ensure the paths in the **RELEASE*** files accurately reflect the correct
locations of the support applications to avoid potential issues during runtime.
Just like the **RELEASE.local** file, the **CONFIG_SITE.local** file allows for local
customization of the build configuration. The lines
`-include $(TOP)/../CONFIG_SITE.local` and `-include $(TOP)/configure/CONFIG_SITE.local`
in the **configure/CONFIG_SITE** file instruct the build system to include the
**CONFIG_SITE.local** files if they exist in the specified locations. The `$(TOP)`
variable represents the top-level directory of the IOC.
Note: the linux command `$ echo "CHECK_RELEASE = NO" > configure/CONFIG_SITE.local`
writes the text "CHECK_RELEASE = NO" to the **configure/CONFIG_SITE.local** file.
If the file does not exist, the `>` sign creates the file and writes the output to it.
If the file already exists, the `>` sign overwrites its contents with the new output
</details>
### 4.7 Build motorVMC ### 4.7 Build motorVMC
``` ```
......