-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: main
Are you sure you want to change the base?
Changes from 6 commits
bce3090
7d16e33
c250666
3c390a6
987cd35
16b22b6
f12128d
3f78db7
8024559
ae0ba18
53189e1
56fddaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'; | ||
$modules{'IP'} = 'R2-22'; | ||
$modules{'IPAC'} = '2.16'; | ||
$modules{'IP330'} = 'R2-10'; | ||
|
@@ -202,11 +202,6 @@ sub get_repo { | |
|
||
chdir "$FOLDER_NAME"; | ||
`git checkout -q $TAG`; | ||
chdir ".."; | ||
|
||
say $REL "$RELEASE_NAME=\$(SUPPORT)/$FOLDER_NAME"; | ||
|
||
print "\n"; | ||
} | ||
else | ||
{ | ||
|
@@ -218,12 +213,11 @@ sub get_repo { | |
`git stash -q`; | ||
`git clean -fdx`; | ||
`git checkout -q $TAG`; | ||
chdir ".."; | ||
|
||
say $REL "$RELEASE_NAME=\$(SUPPORT)/$FOLDER_NAME"; | ||
|
||
print "\n"; | ||
} | ||
system("mkdir -p configure; echo 'EPICS_BASE=$EPICS_BASE' >> configure/RELEASE.local"); | ||
chdir ".."; | ||
say $REL "$RELEASE_NAME=\$(SUPPORT)/$FOLDER_NAME"; | ||
print "\n"; | ||
} | ||
|
||
|
||
|
@@ -524,15 +518,27 @@ if (exists($modules{GALIL})) | |
|
||
copy_recur("${FILTER_TAG}/.", "./"); | ||
rmtree("${FILTER_TAG}"); | ||
|
||
copy("./config/GALILRELEASE", "./configure/RELEASE.local"); | ||
|
||
system("mv config/* configure/"); | ||
rmtree("config"); | ||
copy("./configure/GALILRELEASE", "./configure/RELEASE.local"); | ||
|
||
add_line('-include $(TOP)/../RELEASE.local', "./configure/RELEASE"); | ||
add_line('-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local', "./configure/RELEASE"); | ||
add_line('-include $(TOP)/configure/RELEASE.local', "./configure/RELEASE"); | ||
add_line('CONFIG = $(EPICS_BASE)/configure', "./configure/CONFIG"); | ||
add_line('include $(TOP)/configure/RELEASE', "./configure/CONFIG"); | ||
add_line('include $(CONFIG)/CONFIG', "./configure/CONFIG"); | ||
add_line('include $(EPICS_BASE)/configure/RULES_TOP', "./configure/RULES_TOP"); | ||
do_substitution('/configure/RULES', '/configure/RULES_TOP', "GalilTestApp/src/Makefile"); | ||
do_substitution('/configure/RULES', '/configure/RULES_TOP', "GalilTestApp/Db/Makefile"); | ||
do_substitution('/configure/RULES', '/configure/RULES_TOP', "GalilSup/Db/Makefile"); | ||
do_substitution('/configure/RULES', '/configure/RULES_TOP', "GalilSup/src/Makefile"); | ||
|
||
|
||
do_substitution("\QLIBRARY_IOC += GalilSupport\E", "LIBRARY_IOC_Linux \+= GalilSupport\nLIBRARY_IOC_WIN32 += GalilSupport", "GalilSup/src/Makefile"); | ||
do_substitution("PROD_IOC = GalilTest", "PROD_IOC_Linux = GalilTest\nPROD_IOC_WIN32 = GalilTest", "GalilTestApp/src/Makefile"); | ||
system("mkdir -p dbd && cp GalilSup/src/GalilSupport.dbd dbd/"); | ||
|
||
if (exists($modules{SNCSEQ})) | ||
{ | ||
|
@@ -591,7 +597,7 @@ if (exists($modules{MEASCOMP})) | |
|
||
system("./configure --prefix=${PWD}"); | ||
system("make"); | ||
`make install || true`; | ||
`sudo make install || true`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
This happens after the permissions to udev are fixed:
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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"); | ||
|
@@ -733,8 +739,14 @@ say $RELEASE "-include \$(SUPPORT)/RELEASE.local"; | |
say $RELEASE "-include \$(SUPPORT)/RELEASE.\$(EPICS_HOST_ARCH).local"; | ||
say $RELEASE "-include \$(SUPPORT)/configure/RELEASE.local"; | ||
say $RELEASE "-include \$(SUPPORT)/configure/RELEASE.\$(EPICS_HOST_ARCH).local"; | ||
|
||
|
||
close($RELEASE); | ||
|
||
`make release`; | ||
system("make release"); # system() forwards output and errors of the command | ||
|
||
if (exists($modules{GALIL})) | ||
{ | ||
# copy updated RELEASE.local with correct paths to expected GALILRELEASE file | ||
chdir "Galil-3-0-$modules{GALIL}/configure"; | ||
copy("RELEASE.local", "GALILRELEASE"); | ||
chdir "../.."; | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!