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

Csstudio prerequisites not defined: java tycho p2 etc. #2616

Open
antoinetran opened this issue Oct 15, 2019 · 4 comments
Open

Csstudio prerequisites not defined: java tycho p2 etc. #2616

antoinetran opened this issue Oct 15, 2019 · 4 comments

Comments

@antoinetran
Copy link

Dear all,

I tried to upgrade our Eclipse RCP product, from Eclipse mars with Csstudio 4.3, to Eclipse Neon/Csstudio 4.5 and Eclipse 2018-12/Csstudio 4.6. We use Maven 3.5.3 and tycho 1.2.0.

I can see prerequisites chapter in doc: here.

ask other CSS developers for the currently supported versions

While the version of Eclipse RCP is clear and indicated in each Csstudio release, it is not the case for JDK.
It is the same for Tycho, I had to update from 1.2.0 to 1.4.0, after discovering in some Github/stackeverflow page that this is due to Tycho.

I described build dependencies. But we also need to know the runtime dependencies. For example, I discovered that even if I build with OpenJdk 8 with success, the Eclipse RCP fails to launch because it needs JavaSe 11. Right now, our team might revert from 4.6 to 4.5 to verify if Java 8 is ok or not, we have no choice to take lots of time to downgrade because we are currently locked to Java 8.

Now related to P2 plugin dependencies, I took so much time fixing missing dependencies.
At build, migrating from 4.3 to 4.6 could not work without:

<unit id="org.eclipse.gmf.feature.group" version="0.0.0"/>
<repository location="https://download.eclipse.org/efxclipse/runtime-released/3.4.3/site"/>
<unit id="org.csstudio.platform.libs.epics" version="0.0.0"/>
<unit id="org.epics.pvdata" version="0.0.0"/>
<unit id="org.epics.pvaccess" version="0.0.0"/>

For runtime dependencies, I also had to add:

<unit id="org.epics.util" version="0.0.0"/>
<unit id="org.epics.jca" version="0.0.0"/>
<unit id="org.apache.xmlgraphics.batik-XXX" version="0.0.0"/>

And to be really sure, I added (might be too much):

<unit id="org.epics.caj" version="0.0.0"/>
<unit id="org.diirt.support.diirt-ca" version="0.0.0"/>
<unit id="org.epics.channelfinder.cf-client-api" version="0.0.0"/>
<unit id="org.epics.vtype" version="0.0.0"/>
<unit id="org.apache.xmlgraphics.batik-all" version="0.0.0"/>

When I tried downgrading to from 4.6 to 4.5, I missed:
[ERROR] Missing requirement: org.csstudio.utility.batik 1.1.0.201902070940 requires 'osgi.bundle; org.apache.batik.bridge [1.7.0,1.8.0)' but it could not be found

And I have no idea where to find it.

To summarize, shouldn't csstudio defines its build and runtime dependencies? Thank you!!

@antoinetran
Copy link
Author

Linked to Java11 #2589

@kasemir
Copy link
Contributor

kasemir commented Oct 15, 2019

I think it's fair to say that the Eclipse-based build process has become quite difficult. At this time, the org.csstudio.product just started to compile and run with Java 11, but not all sites have been successful in adapting their site-specific product.
The new 'phoebus' development that offers most of the CS-Studio functionality without Eclipse, https://github.com/shroffk/phoebus, is much easier to build and a more practical way forward.
I'd look at that unless you really need to stay with the Eclipse-based version for some reason.

@shroffk
Copy link
Member

shroffk commented Oct 17, 2019

I had similar problems with the batik dependencies...I reverted to using tycho 1.3

My nightly builds still seem to work... the build from last night succeeded.
Here is the recipe:
https://github.com/cs-studio-nsls2/build/blob/no-docker/jenkins/cs-studio-build

I have to admit that the process by which dependency resolution of tycho and eclipse bundles is become a bit of a mystery.
I think we as a community need to take a concerted effort to eliminate all "import packages" uses in cs-studio plugins.
We should also lock version numbers and not use version=0.0.0

@antoinetran
Copy link
Author

The new 'phoebus' development that offers most of the CS-Studio functionality without Eclipse, https://github.com/shroffk/phoebus, is much easier to build and a more practical way forward.
I'd look at that unless you really need to stay with the Eclipse-based version for some reason.

Thank you for the info. Our project use Eclipse with CSStudio and other Eclipse plugin, unfortunately, this is not an option for us.

I had similar problems with the batik dependencies...I reverted to using tycho 1.3

I managed to make it work with Eclipse 2019-03, CSStudio dev 4.6.0, tycho 1.4.0, Jdk 8, JavaSe 11, Orbit p2, and a few other dependencies add, mostly used by our project in feature.xml, that I think was present in CSStudio transitive dependencies.
For the sake of research, I also made it work with Eclipse 2019-06 with Orbit p2 for 2019-06 and 2019-03 (or it would misses some javax dependencies I don't know why), but it couldn't work with Eclipse 2019-09.

We should also lock version numbers and not use version=0.0.0

It is important if we want to use Nexus 2 P2 plugin bridge, and p2 group, because when using 0.0.0 (latest), then we cannot make a p2 group mixing old and new repo (in the same way as Maven group).

As for this issue, maybe CSStudio dev should add a example project, with tycho and the minimum repo in target file? Or write a more precise prerequisites section in front of each release? Thank you.

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

No branches or pull requests

3 participants