Closed lupaulus closed 6 months ago
@lupaulus
So i think you don't have to add the arm64 architecture.
The error when I build with snapcraft :
uname -a output (aarch64) :
Linux 6.6.28+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22) aarch64 GNU/Linux
Model Name : Raspberry Model PI 4 B
The error when I build with snapcraft :
uname -a output (aarch64) :
Linux 6.6.28+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22) aarch64 GNU/Linux
Model Name : Raspberry Model PI 4 B
You don't have to add the architecture. You can install all packages for the arm64 architecture for building for arm64. The datalayer debian packet includes amd64 (PC) and the arm64 version.
For which architecture are building the project?
I'm building for arm64 (CtrlX3 target).
I will try, but why I have this error then when I have all dependencies :
Could you please provide more information:
Do you want to create a snap for a example project from the sdk? If yes, which one?
No, from your local project, by my colleague it is working successfully
Which commands do you execute to build and pack the snap?
#!/usr/bin/env bash
set -e
snapcraft clean --destructive-mode
snapcraft --destructive-mode --target-arch=arm64 --enable-experimental-target-arch
Which ctrlx-automation-sdk version are you using?
ctrlx-automation-sdk github clone from 08/05/2024
Can we get in Touch ?
Do you want to create a snap for a example project from the sdk? If yes, which one?
No, from your local project, by my colleague it is working successfully
I' am a little bit confused. Do you want to build a snap from an example from the ctrlx automation sdk or do you have a project of your own?
Which commands do you execute to build and pack the snap?
#!/usr/bin/env bash set -e snapcraft clean --destructive-mode snapcraft --destructive-mode --target-arch=arm64 --enable-experimental-target-arch
Which ctrlx-automation-sdk version are you using?
ctrlx-automation-sdk github clone from 08/05/2024
This ctrlx automation sdk is based on Ubuntu core 22.
Your syntax is deprecated and will not work for core22.
You need to use:
snapcraft pack --build-for=arm64 --verbose
The --verbose should give you more information in which step the pack process is failing.
Can you share more information of your project? Maybe your snapcraft.yaml?
I' am a little bit confused. Do you want to build a snap from an example from the ctrlx automation sdk or do you have a project of your own?
It's an own project, that we started building from your example; targetting Ctrlx3 2.2.X
This ctrlx automation sdk is based on Ubuntu core 22. Your syntax is deprecated and will not work for core22.
Ok, but it is in your sample ... ctrlx-automation-sdk/samples-python/webserver /build-snap-arm64.sh
snapcraft.yaml :
base: core22
confinement: strict
grade: stable
apps:
linckdc:
command: bin/linckdc
plugs:
- network
- network-bind
- datalayer
- active-solution
daemon: simple
passthrough:
restart-condition: always
restart-delay: 30s
publisher:
command: bin/publisher
plugs:
- network
- network-bind
- datalayer
- active-solution
daemon: simple
passthrough:
restart-condition: always
restart-delay: 30s
web:
command: bin/web
plugs:
- network
- network-bind
- datalayer
- active-solution
daemon: simple
passthrough:
restart-condition: always
restart-delay: 30s
simulation:
command: bin/simulation
plugs:
- network
- network-bind
- datalayer
- active-solution
daemon: simple
passthrough:
restart-condition: always
restart-delay: 30s
parts:
linckdc:
plugin: python
source: .
stage-packages:
- libzmq5
- ctrlx-datalayer
publisher:
plugin: python
source: .
stage:
- -lib/python3.*/site-packages/*
- -bin/*
- -pyvenv.cfg
web:
plugin: python
source: .
stage:
- -lib/python3.*/site-packages/*
- -bin/*
- -pyvenv.cfg
simulation:
plugin: python
source: .
stage:
- -lib/python3.*/site-packages/*
- -bin/*
- -pyvenv.cfg
helper:
plugin: python
source: .
stage:
- -lib/python3.*/site-packages/*
- -bin/*
- -pyvenv.cfg
config:
plugin: dump
source: ./config
organize:
'*': ./config/
'.*': ./config/
configs:
plugin: dump
source: ./configs
organize:
'package-assets/*': package-assets/${SNAPCRAFT_PROJECT_NAME}/
plugs:
datalayer:
interface: content
content: datalayer
target: $SNAP_DATA/.datalayer
active-solution:
interface: content
content: solutions
target: $SNAP_COMMON/solutions
hooks:
connect-plug-active-solution:
plugs: [active-solution]
remove:
plugs: [active-solution]
slots:
package-assets:
interface: content
content: package-assets
source:
read:
- $SNAP/package-assets/${SNAPCRAFT_PROJECT_NAME}
package-run:
interface: content
content: package-run
source:
write:
- $SNAP_DATA/package-run/${SNAPCRAFT_PROJECT_NAME}
I switched on Ubuntu 24.04
ldd --version
ldd (Ubuntu GLIBC 2.39-0ubuntu8.1) 2.39
I' am a little bit confused. Do you want to build a snap from an example from the ctrlx automation sdk or do you have a project of your own?
It's an own project, that we started building from your example; targetting Ctrlx3 2.2.X
OK. You are using python. I am not an employee of Bosch Rexroth. I thought i could help you as a community member. ;-) I have no experience with python concerning python projects on Ctrlx. I am using mostly c++ and angular. And i am building the c++ projects for amd64 and arm64 (crossbuild).
This ctrlx automation sdk is based on Ubuntu core 22. Your syntax is deprecated and will not work for core22.
Ok, but it is in your sample ... ctrlx-automation-sdk/samples-python/webserver /build-snap-arm64.sh
Maybe this was forgotten while upgrading to core22. In c++ projects with core22 i was not able to use --target-arch=arm64 --enable-experimental-target-arch
snapcraft.yaml :
base: core22 confinement: strict grade: stable apps: linckdc: command: bin/linckdc plugs: - network - network-bind - datalayer - active-solution daemon: simple passthrough: restart-condition: always restart-delay: 30s publisher: command: bin/publisher plugs: - network - network-bind - datalayer - active-solution daemon: simple passthrough: restart-condition: always restart-delay: 30s web: command: bin/web plugs: - network - network-bind - datalayer - active-solution daemon: simple passthrough: restart-condition: always restart-delay: 30s simulation: command: bin/simulation plugs: - network - network-bind - datalayer - active-solution daemon: simple passthrough: restart-condition: always restart-delay: 30s parts: linckdc: plugin: python source: . stage-packages: - libzmq5 - ctrlx-datalayer publisher: plugin: python source: . stage: - -lib/python3.*/site-packages/* - -bin/* - -pyvenv.cfg web: plugin: python source: . stage: - -lib/python3.*/site-packages/* - -bin/* - -pyvenv.cfg simulation: plugin: python source: . stage: - -lib/python3.*/site-packages/* - -bin/* - -pyvenv.cfg helper: plugin: python source: . stage: - -lib/python3.*/site-packages/* - -bin/* - -pyvenv.cfg config: plugin: dump source: ./config organize: '*': ./config/ '.*': ./config/ configs: plugin: dump source: ./configs organize: 'package-assets/*': package-assets/${SNAPCRAFT_PROJECT_NAME}/ plugs: datalayer: interface: content content: datalayer target: $SNAP_DATA/.datalayer active-solution: interface: content content: solutions target: $SNAP_COMMON/solutions hooks: connect-plug-active-solution: plugs: [active-solution] remove: plugs: [active-solution] slots: package-assets: interface: content content: package-assets source: read: - $SNAP/package-assets/${SNAPCRAFT_PROJECT_NAME} package-run: interface: content content: package-run source: write: - $SNAP_DATA/package-run/${SNAPCRAFT_PROJECT_NAME}
I switched on Ubuntu 24.04
ldd --version ldd (Ubuntu GLIBC 2.39-0ubuntu8.1) 2.39
Hm, maybe a version problem
I'm building for arm64 (CtrlX3 target).
I will try, but why I have this error then when I have all dependencies :
Here GLIBC2.36 and the other GLIBC 2.39.
Hi @lupaulus i think also that is a Version Problem. If you want to build a snap for CORE X3 Version 2.x you have to build on an Ubuntu Version 22.
Have you tried this?
No, I will try.
Thanks for the support
Okay, thanks.
Please let us know :)
@albrecht-j No warning with Ubuntu 22.04 LTS for raspberry and glibc 2.35
Hey,
How can I adapt this lines to build on Raspabian ? Because
apt update
failed to retrieve this packages.