-
Notifications
You must be signed in to change notification settings - Fork 31
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
CMake support? #15
Comments
I hadn't thought about cmake for this module. Have you found https://github.com/epicsdeb/cmake4epics ? I think this would be fairly straightforward to apply, with the possible exception of cleverness involving configure/toolchain.c. Another complication is CI coverage to make sure it stays working. The ci-scripts module assumes use of the Base makefiles. |
Ah no, I hadn't come across cmake4epics before. CMake would really be a lot nicer to manage and would prevent the current build system from polluting my machine. Surely just because epics-base doesn't use CMake doesn't mean PVXS can't. With regard to PVXS if I understand correctly it doesn't depend on pvData or pvAccess, right? Does it just depend on libcom from epics-base? Ideally, I would like to avoid the perl scripts and Makefiles which make it very difficult to incorporate into other projects or to even build applications using PVXS and pvAccess. For one, I have epics-base v7.0 already built on my machine and have some (working) applications using pvAccess and pvDatabase but I would also like to try and use PVXS in this application (to compare how the APIs work, etc), but when I follow the steps here I get the following error: $make
#....
perl -CSD /home/user/dev/epics-base/bin/linux-x86_64/convertRelease.pl checkRelease
Definition of EPICS_BASE conflicts with PVXS support.
In this application or module, a RELEASE file
conflicts with PVXS at /home/user/dev/pvxs/
Here: EPICS_BASE = ${EPICS7_DIR}
PVXS: EPICS_BASE = /home/user/dev/pvxs//../epics-base
/home/user/dev/epics-base//configure/RULES_BUILD:190: recipe for target 'checkRelease' failed
#...
make: *** [configure.install] Error 2 Note: I am using the exampleCPP project template: https://github.com/epics-base/exampleCPP so my configure/RELEASE.local looks something like: # This is a an example RELEASE.local file for use with epics 7 releases.
# Copy this file to configure/RELEASE.local.
# Change the first line and also EPICS_BASE if using different version of base.
# type make at top level
PVXS=/home/user/dev/pvxs/
EPICS7_DIR=/home/user/dev/epics-base/
PVDATABASE=${EPICS7_DIR}
PVACLIENT=${EPICS7_DIR}
PVA2PVA=${EPICS7_DIR}
PVACCESS=${EPICS7_DIR}
NORMATIVETYPES=${EPICS7_DIR}
PVDATA=${EPICS7_DIR}
EPICS_BASE=${EPICS7_DIR}
TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top I've probably missed something or not correctly understood the documentation, so apologies if it is a simple fix, but CMake would still be a nice enhancement. |
Thomas,
Make sure your RELEASE.local uses parenthesis instead of curly brackets for variable expansion.
i.e.
PVACLIENT=$(EPICS7_DIR)
not
PVACLIENT=${EPICS7_DIR}
Cheers,
- Bruce
...
|
@bhill-slac Thanks! Indeed that fixes the previous error, it's odd because it worked with curly braces using pvAccess + pvDatabase, maybe it would be good to correct the documentation on exampleCPP to reflect this, as it uses curly braces: https://github.com/epics-base/exampleCPP/blob/master/ExampleRELEASE.local - but I guess that is a separate issue and nothing to do with PVXS. However I am do get a warning regarding duplicate definitions: /home/user/dev/epics-base//configure/RULES_BUILD:578: Warning: Base configure/RULES_BUILD file included more than once. Does configure/RELEASE have multiple pointers to /home/user/dev/epics-base/? |
It certainly could. cmake4epics ended up as a separate module after my unsuccessful attempt to convert epics-base itself to use cmake.
Yes and Yes.
fyi. Recent epics-base also installs
|
This is likely arising from a detail that |
I think this is an epics-base issue but follows on from the comments above. For my configure/RELEASE.local, if I do as follows, all is fine. PVXS=/home/user/Dev/pvxs
EPICS7_DIR=/home/user/Dev/epics-base
PVDATABASE=$(EPICS7_DIR)
PVACLIENT=$(EPICS7_DIR)
PVA2PVA=$(EPICS7_DIR)
PVACCESS=$(EPICS7_DIR)
NORMATIVETYPES=$(EPICS7_DIR)
PVDATA=$(EPICS7_DIR)
EPICS_BASE=$(EPICS7_DIR)
TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top But reordering such that PVXS is in between EPICS7_DIR and PVDATABASE variables, as below: EPICS7_DIR=/home/user/Dev/epics-base
PVXS=/home/user/Dev/pvxs
PVDATABASE=$(EPICS7_DIR)
PVACLIENT=$(EPICS7_DIR)
PVA2PVA=$(EPICS7_DIR)
PVACCESS=$(EPICS7_DIR)
NORMATIVETYPES=$(EPICS7_DIR)
PVDATA=$(EPICS7_DIR)
EPICS_BASE=$(EPICS7_DIR)
TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top Gives the following error: This application's RELEASE file(s) define
PVDATABASE = /home/user/Dev/epics-base
and
EPICS7_DIR = /home/user/Dev/epics-base
Module definitions that share the same path must have their
first definitions grouped together. Either remove a module,
or arrange them so all those with that path are adjacent.
Any non-module definitions belong in configure/CONFIG_SITE. The error is indeed accurate and telling me what is wrong, I am just a bit shocked that the order of variables definitions can cause such a catastrophic error. Is there a specific reason for this? Is this an artifact of |
This is related to my earlier statement about |
Is this a known bug or a feature of epics-base? |
Hi, is there any chance that there will be CMake support for pvxs in the future?
I could potentially have a go at adding this if there are no plans to do so.
The text was updated successfully, but these errors were encountered: