Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes for building synApps on a fresh Ubuntu 22 successfully #6

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

ibressler
Copy link

  • except for the xxx template which complains about No rule to make target '../../../lib/linux-x86_64/libGalilSupport.a', needed by 'xxx'. (but I can't find any rule, reference or existence of a libGalilSupport in the Galil module while it builds without errors)
  • [for reference] assuming the following build dependencies were installed beforehand sudo apt-get install -y git build-essential curl libusb-dev libusb-1.0-0-dev re2c x11proto-dev libx11-dev libxext-dev

keenanlang

This comment was marked as spam.

@keenanlang
Copy link
Contributor

but I can't find any rule, reference or existence of a libGalilSupport in the Galil module while it builds without errors

The Makefile in GalilSup/src has this line:

LIBRARY_IOC_Linux += GalilSupport

That builds libGalilSupport.a and libGalilSupport.so in the top-level lib/linux-x86_64 directory.

I just pulled and built synApps on an Ubuntu 22 system using the script and galil and xxx both built and were linked fine.

ldd xxx | grep "Galil"
libGalilSupport.so => /home/keenan/epics/synApps/synApps_github_test/support/Galil-3-0-V3-5/lib/linux-x86_64/libGalilSupport.so (0x00007f1ed78d3000)

@@ -584,7 +584,7 @@ if (exists($modules{MEASCOMP}))

system("./configure --prefix=${PWD}");
system("make");
`make install || true`;
`sudo make install || true`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is requiring root access here? The point of line 585 is that 'make install' will install everything into its own directory. I just ran the script on Ubuntu 22 and there were no root requirements.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running this in a fresh system with a regular unprivileged user, it tries to install udev rules and modifying ld.so.cache.

Here, this first example is from the Github Action runner:

make[1]: Leaving directory '/home/runner/work/EPICS-synApps-assemble/EPICS-synApps-assemble/synapps/support/measComp-R4-2/libuldaq-1.2.1'
/usr/bin/install: cannot create regular file '/lib/udev/rules.d/50-uldaq.rules': Permission denied
make[2]: *** [Makefile:484: install-dist_rulesdataDATA] Error 1
make[1]: *** [Makefile:814: install-am] Error 2
make: *** [Makefile:511: install-recursive] Error 1

This happens after the permissions to udev are fixed:

make[2]: Leaving directory '/epics/synapps/support/measComp-R4-2/libuldaq-1.2.1/examples'
make[2]: Entering directory '/epics/synapps/support/measComp-R4-2/libuldaq-1.2.1'
make[2]: Leaving directory '/epics/synapps/support/measComp-R4-2/libuldaq-1.2.1'
make[1]: Leaving directory '/epics/synapps/support/measComp-R4-2/libuldaq-1.2.1'
Failed to send reload request: Permission denied
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
make[3]: *** [Makefile:951: install-data-hook] Error 1
make[2]: *** [Makefile:866: install-data-am] Error 2
make[1]: *** [Makefile:814: install-am] Error 2
make: *** [Makefile:511: install-recursive] Error 1

To be sure, I removed sudo in my main branch and let it build as Github Action, the logs should be accessible for this job: https://github.com/BAMresearch/EPICS-synApps-assemble/actions/runs/8023437425/job/21919899065

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: The build logs and artifacts are listed at the bottom of the summary of a build job, here: https://github.com/BAMresearch/EPICS-synApps-assemble/actions/runs/8023437425

assemble_synApps Outdated
@@ -66,7 +66,7 @@ if ($releasefile eq "default")
$modules{'DXPSITORO'} = 'R1-3';
$modules{'DEVIOCSTATS'} = '3.1.16';
$modules{'ETHERIP'} = 'ether_ip-3-3';
$modules{'GALIL'} = 'V3-5';
$modules{'GALIL'} = 'V3-6';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Galil V3-6 does not build on Windows machines, which is why 3-5 is the default. Individual modules can be adjusted for your specifications by using the --set flag.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out. I am fine with the option, of course.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Galil driver V3-6 and R3-6-85 have been patched to fix the build issue on Windows. The Galil repository name has changed recently and tag R3-6-85 was created to align the Galil repo structure to other synApps modules. I cloned this assemble_synApps repo and altered the assemble_synApps script for the Galil repo changes (see attached). After the assemble_synApps script completed successfully, I built the software by running "make" in the support folder. The software built successfully on CentOS stream 9, Windows 10 using visual studio 2019 & 2022.
assemble_synApps.txt
If the Galil driver isn't required, it can be commented out in configure/RELEASE.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the update on that!

@ibressler
Copy link
Author

The Makefile in GalilSup/src has this line:

LIBRARY_IOC_Linux += GalilSupport

That builds libGalilSupport.a and libGalilSupport.so in the top-level lib/linux-x86_64 directory.

This does not seem to build here. In the Github Action I let it find all files in the Galil-* tree afterwards
(listing below, Step Check Galil created files). I wonder, how everything is to be build after the make release at the end of the assemble script succeeds? I suppose, it should be done by make rebuild as described here, right? Am I doing it wrong?

The missing files might be caused by my changes in this PR, especially 987cd35.

a) Without my changes, make rebuild in support directory does not succeed:

make -C /home/epics/synapps/support/Galil-3-0-V3-5 clean
make[1]: Entering directory '/home/epics/synapps/support/Galil-3-0-V3-5'
Makefile:8: configure/RULES_TOP: No such file or directory
make[1]: *** No rule to make target 'configure/RULES_TOP'.  Stop.
make[1]: Leaving directory '/home/epics/synapps/support/Galil-3-0-V3-5'

The config* dirs contain the following files then:

$ l synapps/support/Galil-3-0-V3-5/config*
synapps/support/Galil-3-0-V3-5/config:
GALILRELEASE  Makefile  makeReleaseConsistent.pl  README  RULES_DIRS  RULES.ioc

synapps/support/Galil-3-0-V3-5/configure:
RELEASE  RELEASE.local

b) With my changes, the following files are found in Galil-* after make rebuild in support dir succeeds:

Listing all files in Galil-3-0-V3-5 directory
Galil-3-0-V3-5/README.md
Galil-3-0-V3-5/Makefile
Galil-3-0-V3-5/start_dmc_screen.sh
Galil-3-0-V3-5/documentation/Galil EPICS configuration guide.pdf
Galil-3-0-V3-5/documentation/Galil EPICS networking guide.pdf
Galil-3-0-V3-5/trajectoryA.sh
Galil-3-0-V3-5/trajectoryE.sh
Galil-3-0-V3-5/dbd/GalilSupport.dbd
Galil-3-0-V3-5/start_rio_screen.sh
Galil-3-0-V3-5/configure/Makefile
Galil-3-0-V3-5/configure/RELEASE.local
Galil-3-0-V3-5/configure/makeReleaseConsistent.pl
Galil-3-0-V3-5/configure/RULES_DIRS
Galil-3-0-V3-5/configure/RULES.ioc
Galil-3-0-V3-5/configure/RULES_TOP
Galil-3-0-V3-5/configure/README
Galil-3-0-V3-5/configure/GALILRELEASE
Galil-3-0-V3-5/configure/CONFIG
Galil-3-0-V3-5/configure/RELEASE
Galil-3-0-V3-5/iocBoot/Makefile
Galil-3-0-V3-5/iocBoot/iocGalilTest/Makefile
Galil-3-0-V3-5/iocBoot/iocGalilTest/autosave.cmd
Galil-3-0-V3-5/iocBoot/iocGalilTest/envPaths
Galil-3-0-V3-5/iocBoot/iocGalilTest/cdCommands
Galil-3-0-V3-5/iocBoot/iocGalilTest/galil.cmd
Galil-3-0-V3-5/iocBoot/iocGalilTest/GalilTest_settings.req
Galil-3-0-V3-5/iocBoot/iocGalilTest/saveData.req
Galil-3-0-V3-5/iocBoot/iocGalilTest/dllPath.bat
Galil-3-0-V3-5/iocBoot/iocGalilTest/GalilTest_positions.req
Galil-3-0-V3-5/iocBoot/iocGalilTest/st.cmd
Galil-3-0-V3-5/iocBoot/iocGalilTest/rio.dmc
Galil-3-0-V3-5/trajectoryA.bat
Galil-3-0-V3-5/trajectoryB.bat
Galil-3-0-V3-5/.gitignore
Galil-3-0-V3-5/start_qerio_screen.sh
Galil-3-0-V3-5/trajectoryB.sh
Galil-3-0-V3-5/trajectoryI.sh
Galil-3-0-V3-5/GalilSup/Makefile
Galil-3-0-V3-5/GalilSup/src/GalilController.h
Galil-3-0-V3-5/GalilSup/src/Makefile
Galil-3-0-V3-5/GalilSup/src/GalilAxis.cpp
Galil-3-0-V3-5/GalilSup/src/GalilPoller.h
Galil-3-0-V3-5/GalilSup/src/GalilAxis.h
Galil-3-0-V3-5/GalilSup/src/GalilConnector.cpp
Galil-3-0-V3-5/GalilSup/src/GalilSupport.dbd
Galil-3-0-V3-5/GalilSup/src/GalilConnector.h
Galil-3-0-V3-5/GalilSup/src/GalilPoller.cpp
Galil-3-0-V3-5/GalilSup/src/GalilCSAxis.h
Galil-3-0-V3-5/GalilSup/src/GalilCSAxis.cpp
Galil-3-0-V3-5/GalilSup/src/GalilController.cpp
Galil-3-0-V3-5/GalilSup/op/ui/galil_profileMoveAxis.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_motors.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_profileMoveAxisHeading.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_motor_extras.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_ctrl_io.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_kinematics.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_profileMoveDetails.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_motors_ssi.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_profileCalcMovePlot.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_profileMoveAxisDetails.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_motors_amp.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_rio_ctrl.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_profileMove.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_csmotor_settings.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_ctrl_analog_out.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_kinematics_reverse.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_coordinate_systems.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_ctrl_analog_in.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_ctrl_digital_out.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_dmc_ctrl.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_motor_basic.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_motor_settings.ui
Galil-3-0-V3-5/GalilSup/op/ui/popout.jpeg
Galil-3-0-V3-5/GalilSup/op/ui/galil_motor_ssi.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_ctrl_digital_in.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_motor_amp.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_csmotor_basic.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_motors_extras.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_motors_settings.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_profileMovePlot.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_coordinate_system.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_ctrl_digital_out_8bit.ui
Galil-3-0-V3-5/GalilSup/op/ui/galil_userArrayPlot.ui
Galil-3-0-V3-5/GalilSup/op/adl/galil_profileMove_more.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_coordinate_system.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_CSprofileMove.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_dmc_ctrl.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_motor_extras.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_profileMove.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_amp.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_csmotor_kinematics.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_user_array.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_SSI.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_rio_ctrl.adl
Galil-3-0-V3-5/GalilSup/op/adl/galil_ctrl_io.adl
Galil-3-0-V3-5/GalilSup/Db/galil_forward_transform.req
Galil-3-0-V3-5/GalilSup/Db/galil_motor_settings.req
Galil-3-0-V3-5/GalilSup/Db/Makefile
Galil-3-0-V3-5/GalilSup/Db/galil_profileMoveController.template
Galil-3-0-V3-5/GalilSup/Db/galil_dmc_ctrl.template
Galil-3-0-V3-5/GalilSup/Db/galil_reverse_transforms.template
Galil-3-0-V3-5/GalilSup/Db/galil_digital_in_bit.template
Galil-3-0-V3-5/GalilSup/Db/galil_digital_out_bit.req
Galil-3-0-V3-5/GalilSup/Db/galil_Home_Home.dmc
Galil-3-0-V3-5/GalilSup/Db/galil_Home_ForwLimit.dmc
Galil-3-0-V3-5/GalilSup/Db/galil_profileMoveAxis.template
Galil-3-0-V3-5/GalilSup/Db/galil_motor.template
Galil-3-0-V3-5/GalilSup/Db/galil_user_array.template
Galil-3-0-V3-5/GalilSup/Db/galil_analog_in.template
Galil-3-0-V3-5/GalilSup/Db/galil_digital_out_bit.template
Galil-3-0-V3-5/GalilSup/Db/galil_Default_Footer.dmc
Galil-3-0-V3-5/GalilSup/Db/galil_analog_out.template
Galil-3-0-V3-5/GalilSup/Db/galil_dmc_ctrl.req
Galil-3-0-V3-5/GalilSup/Db/galil_digital_in_bit.req
Galil-3-0-V3-5/GalilSup/Db/galil_Home_RevLimit.dmc
Galil-3-0-V3-5/GalilSup/Db/galil_analog_in.req
Galil-3-0-V3-5/GalilSup/Db/galil_Default_Header.dmc
Galil-3-0-V3-5/GalilSup/Db/galil_Piezo_Home.dmc
Galil-3-0-V3-5/GalilSup/Db/galil_userdef_records.template
Galil-3-0-V3-5/GalilSup/Db/galil_rio_ctrl.template
Galil-3-0-V3-5/GalilSup/Db/galil_user_array.req
Galil-3-0-V3-5/GalilSup/Db/galil_coordinate_system.template
Galil-3-0-V3-5/GalilSup/Db/galil_motor_extras.req
Galil-3-0-V3-5/GalilSup/Db/galil_motor_extras.template
Galil-3-0-V3-5/GalilSup/Db/galil_forward_transform.template
Galil-3-0-V3-5/GalilSup/Db/galil_analog_out.req
Galil-3-0-V3-5/GalilSup/Db/galil_reverse_transforms.req
Galil-3-0-V3-5/trajectoryJ.sh
Galil-3-0-V3-5/trajectoryB_2.sh
Galil-3-0-V3-5/start_qedmc_screen.sh
Galil-3-0-V3-5/trajectoryC.bat
Galil-3-0-V3-5/.git/objects/pack/pack-e2c83d7117f2d04711e7c304bbbd3dbbe0787a0c.rev
Galil-3-0-V3-5/.git/objects/pack/pack-e2c83d7117f2d04711e7c304bbbd3dbbe0787a0c.idx
Galil-3-0-V3-5/.git/objects/pack/pack-e2c83d7117f2d04711e7c304bbbd3dbbe0787a0c.pack
Galil-3-0-V3-5/.git/info/exclude
Galil-3-0-V3-5/.git/HEAD
Galil-3-0-V3-5/.git/packed-refs
Galil-3-0-V3-5/.git/refs/heads/master
Galil-3-0-V3-5/.git/refs/remotes/origin/HEAD
Galil-3-0-V3-5/.git/index
Galil-3-0-V3-5/.git/logs/HEAD
Galil-3-0-V3-5/.git/logs/refs/heads/master
Galil-3-0-V3-5/.git/logs/refs/remotes/origin/HEAD
Galil-3-0-V3-5/.git/description
Galil-3-0-V3-5/.git/hooks/pre-rebase.sample
Galil-3-0-V3-5/.git/hooks/pre-commit.sample
Galil-3-0-V3-5/.git/hooks/sendemail-validate.sample
Galil-3-0-V3-5/.git/hooks/pre-receive.sample
Galil-3-0-V3-5/.git/hooks/update.sample
Galil-3-0-V3-5/.git/hooks/commit-msg.sample
Galil-3-0-V3-5/.git/hooks/prepare-commit-msg.sample
Galil-3-0-V3-5/.git/hooks/fsmonitor-watchman.sample
Galil-3-0-V3-5/.git/hooks/applypatch-msg.sample
Galil-3-0-V3-5/.git/hooks/pre-push.sample
Galil-3-0-V3-5/.git/hooks/pre-merge-commit.sample
Galil-3-0-V3-5/.git/hooks/post-update.sample
Galil-3-0-V3-5/.git/hooks/pre-applypatch.sample
Galil-3-0-V3-5/.git/hooks/push-to-checkout.sample
Galil-3-0-V3-5/.git/config
Galil-3-0-V3-5/GalilTestApp/Makefile
Galil-3-0-V3-5/GalilTestApp/src/Makefile
Galil-3-0-V3-5/GalilTestApp/src/GalilTestMain.cpp
Galil-3-0-V3-5/GalilTestApp/Db/galil_analog_ports.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_digital_ports.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/Makefile
Galil-3-0-V3-5/GalilTestApp/Db/galil_profileMoveController.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_dmc_ctrl.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_rio_ctrl.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_coordinate_systems.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_motors.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_csmotor_kinematics.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_profileMoveAxis.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_user_array.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_userdef_records.substitutions
Galil-3-0-V3-5/GalilTestApp/Db/galil_motor_extras.substitutions
Galil-3-0-V3-5/trajectoryC.sh

Any help for building this completely would be appreciated, thanks a lot!

@ibressler ibressler requested a review from keenanlang February 29, 2024 23:44
ibressler added a commit to BAMresearch/EPICS-synApps-assemble that referenced this pull request Mar 13, 2024
- since Windows compat. is fixed by now: EPICS-synApps#6 (comment)
@ibressler
Copy link
Author

  • Based on the updated info given by @motorapp I changed the Galil version back to V3-6 for the latest (just a side note, for my case it does not really matter yet).
  • In the mean time I found the problem with actually building the binaries since make just stepped over it because the actual rules where not included which I found when comparing it with other modules. To solve this, I replaced some of my earlier changes in ae0ba18 by creating a RULES file in configure dir which includes the basic EPICS rules. Now, the binaries mentioned above get built and in turn the xxx app get built successfully as well.
  • For testing if the cumulated changes in this PR actually work, I added a Github Action in 3f78db7.

@motorapp
Copy link

Hi Keenan and Ingo,
The recommended way to integrate the Galil driver into this version of synApps is to copy ./config/GALILRELEASE to ./configure/RELEASE.local. No further changes are required. I recommend using the Galil repository tag R3-6-85 where the folder "3-6" has been removed from the structure, reducing the work the assemble_synApps script has to do. The assemble_synApps has the command make release near the end. I found this command didn't work (failed on all tested environments), and it's required to make the RELEASE files of all support modules consistent. However, "system("make release");" does work. I added a call to "system("make"); to start the build as the final step. Attached is a script that worked on Windows 10 VS2019, CentOS stream 9 and Ubuntu 22.04. I aim to support the Galil driver only.
assemble_synApps.txt

ibressler added a commit to BAMresearch/EPICS-synApps-assemble that referenced this pull request Apr 2, 2024
@ibressler
Copy link
Author

Thanks @motorapp! Works for me as well :) I added your changes to this pull request. They build fine in my main branch. Thanks a lot for the adjustments and testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants