cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Environment for Python development

Environment for Python development

b3er
Member

Hello,

after succesfully deploying a c++ app to the ctrlX, I wanted to write a python app. My current setup is 
Windows 10 - Oracle virtualBox - ubuntu18.
In the samples it is already written that the crosscompilation is not possible for python and that the 
python app can either be developped on a machine with the suitable target architecture or a virtual machine that
emulates the hardware. 
What is the recommended way?
Can I develop a python snap using ubuntu20 on a raspi (64bit)?
Or are we restricted to ubuntu18 at the moment?

5 REPLIES 5

CodeShepherd
Community Moderator
Community Moderator

You can develop on core20 and say target system is core18.

Further more from the release RM20.11 end of November on only core20 will be supported on the ctrlX CORE. And there will be a new development environment based on QEMU. So stay tuned for the SDK for ctrlX AUTOMATION.

bostroemc
New Contributor

If you are willing to make your code public, you can build snaps for ctrlX CORE and ctrlX COREvirtual using Canonical's auto-build server: https://snapcraft.io/build

Once configured, each update that you push to your GitHub repository will automatically trigger a rebuild of your project.  Snaps can be downloaded  (for a limited time after the build date) from snapcraft's dashboard:  https://dashboard.snapcraft.io/stores/snaps/ 

See examples here:  https://github.com/bostroemc/rfs-parts-db  (work in progress) and  https://github.com/bostroemc/webconnector-lite

One tip:  Be sure to specify the build architecture in your yaml file.  Otherwise the build server will trigger builds on all supported platforms.

Untitled.png

 

I tried the proposed solution.
Setup Raspi 4 - ubuntu21 - desktop 

error was:

 usr/lib/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/libstdc++.so.6)

I finally installed a 18.04 version in lxc and compiled my snap there. For me it seems that the core18 option does not work well if the libraries of the "host" systems are newer. Since the (cross) compilation is done with the host's gcc, the newer libs are linked...
This only affects the c/c++ part of my snap. 
However, I think it is still worth sharing

Thanks for the quick reply,
at the moment it is more proof of concept stuff that I'm trying. I do not want to publish these snaps. 
Probably, your build systems works flawless, however, setting up the build for c++ and python on my local
machine is a pain in the ass 🙂

Would be very helpful, if you could provide a preconfigured VM or sth. comparable. 

CodeShepherd
Community Moderator
Community Moderator

To setup and share preconfigured VMs is quite hard/bad in legal sight of view. But from the version 1.12 of the SDK for ctrlX AUTOMATION on we provide an instruction how to use an QEMU based development environment that can emulate amd and also arm processor architectures. See github.com/boschrexroth/ctrlx-automation-sdk for further information.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist