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
2 changes: 1 addition & 1 deletion assemble_synApps
Original file line number Diff line number Diff line change
Expand Up @@ -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


unlink("../configure/CONFIG_SITE.local");
add_line("USR_LDFLAGS+=-L${PWD}/lib", "../configure/CONFIG_SITE.local");
Expand Down