eclipse-capella / capella-studio

Open source SDK to develop Capella add-ons
Eclipse Public License 2.0
10 stars 10 forks source link

Build fails for Linux aarch64 and on macOS with Apple silicon chip #182

Open jamilraichouni opened 4 months ago

jamilraichouni commented 4 months ago

Hi!

It would be of great help to have a download for a Capella Studio release which is built for Linux aarch64. I could not get it to build and need to be able to develop a Capella extension for Capella 6.0.0.

Many thanks, Jamil

jamilraichouni commented 4 months ago

A summary describing what happened when I tried to build Capella Studio 6.0.0

Information about the Fedora container I use:

cat /etc/os-release gives:

NAME="Fedora Linux"
VERSION="38 (Container Image)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Container Image)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Container Image"
VARIANT_ID=container

uname -a results in

Linux devcontainer 6.6.12-linuxkit #1 SMP Thu Feb  8 06:36:34 UTC 2024 aarch64 GNU/Linux 

When I download and extract the source code from the release https://github.com/eclipse/capella-studio/releases/tag/v6.0.0 and run the command mvn clean verify -P full -P product

I get the errors:

[INFO] Scanning for projects...
/mnt/volume/data/dev/local/capella-studio-6.0.0/extension/plugins/org.polarsys.capella.extension.genchain/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/extension/plugins/org.polarsys.capella.extension.genchain.model/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/extension/plugins/org.polarsys.capella.extension.genchain.model.edit/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/extension/plugins/org.polarsys.capella.extension.tools/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/extension/plugins/org.polarsys.capella.extension.tools.ui/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/product/plugins/org.polarsys.capella.studio.product/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.ad.viewpoint.dsl.generation.ui/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.ta/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.ta.viewpoint.dsl.extension/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.cdo.ta.definition/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.cdo.ta.ext/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.cdoxml.ta/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.genchain.model.edit/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/plugins/org.polarsys.capella.cdoxml.ta.portfolio/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/doc/plugins/org.polarsys.capella.studio.doc/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/extension/features/org.polarsys.capella.extension.sdk.feature/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/product/features/org.polarsys.capella.studio.product.feature/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/features/org.polarsys.capella.ta.viewpoint.dsl.feature/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/features/org.polarsys.capella.cdo.ta.definition.feature/.polyglot.build.properties
/mnt/volume/data/dev/local/capella-studio-6.0.0/vpdsl/features/org.polarsys.capella.cdoxml.ta.definition.feature/.polyglot.build.properties
[WARNING] The POM for org.apache.commons:commons-lang3:jar:3.8.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for commons-io:commons-io:jar:2.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for commons-io:commons-io:jar:2.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.apache.commons:commons-compress:jar:1.20 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[ERROR] Setting target failed: target definition file '/mnt/volume/data/dev/local/capella-studio-6.0.0/releng/plugins/org.polarsys.capella.studio.releng.targets/../../../releng/plugins/org.polarsys.capella.studio.releng.targets/capellastudio.target' not found in project 'org.polarsys.capella.extension.genchain'. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

So in summary the most important StdErr output is:


[ERROR] Setting target failed: target definition file
'(...)capella-studio-6.0.0/releng/plugins/org.polarsys.capella.studio.releng.targets/capellastudio.target'
not found in project 'org.polarsys.capella.extension.genchain'. 
mPorhel commented 4 months ago

Hi Jamil,

Capella-Studio is currently built (master branch) in a Jenkins CI on https://ci.eclipse.org/capella/job/Capella-studio/job/master/

You current error comes from the not existing .target file. The .target file is not present in Capella-Studio repo: it is generated during the build (as done in Capella) from the capellastudio.targetplatform definition located in releng/plugins/org.polarsys.capella.studio.releng.targets/capellastudio.targetplatform

You can take a look at the Generate Target Platform step of the Jenkinsfile.

Pay attention that the tagged commit corresponds to the commit done just before the release, the location urls in the capellastudio.targetplatform still refer some "stable" url which might have been removed since then or "master" references which now corresponds to the 7.0.0 version. If you want to build a 6.0 version, you will have to rewrite the target platform definition with locations corresponding to "v6.0.0" (including the main included Capella target platform)

Then if you want to build a product for aarch64 environments, Capella itself was not built for aarch64 encironments for the v6.0.0 release (https://github.com/eclipse-capella/capella/blob/v6.0.0/pom.xml). I have proposed it in https://github.com/eclipse-capella/capella/commit/753d3d41f82c1b65697461337469773018394594 for Capella v6.1.0.

If you want to build a product for aarch64 environments, you will have to modify at least:

Regards

Note: I have put the link towards the v6.0.0 tag.

mPorhel commented 4 months ago

Hi Jamil,

I have proposed a PR which will allows to get Capella-Studio.app instead of Eclipse.app but also aarch64 Linux/macOS products.

See: https://github.com/eclipse-capella/capella-studio/pull/183

@pdulth Hoping that it might be accepted/merged on time for Capella 7.0.0