# Compiling in docker container for connectCore8x

**URL:** <https://forums.digi.com/t/compiling-in-docker-container-for-connectcore8x/28708>\
**Category:** Linux\
**Tags:** connectcore, connectcore8x\
**Created:** [December 6, 2023, 3:32pm UTC](https://forums.digi.com/t/compiling-in-docker-container-for-connectcore8x/28708 "2023-12-06T15:32:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbergmans](https://avatars.discourse-cdn.com/v4/letter/p/71c47a/32.png) [@pbergmans](https://forums.digi.com/u/pbergmans)\
**Post date:** [December 6, 2023, 3:32pm UTC](https://forums.digi.com/t/compiling-in-docker-container-for-connectcore8x/28708/1 "2023-12-06T15:32:47Z")

</div>

Hi…we’re trying to compile our c++ app in a docker container. Our ultimate goal is to automate our build process using AWS’s codepipeline and codebuild services. But, before we move our build script to the cloud, we’re trying to build a basic _hello world_ app locally.

We’re using the following image for our container: _digidotcom/dey:dey-3.2-r3_. Our SOM is connectCore8x.

Inside the container is a hello\_world directory with the following two files:  
_hello-world.c_ and a _Makefile_. These files came from [this page](https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.2/cc8x/yocto_t_cl-app-create-build).

Following [this page](https://www.digi.com/resources/documentation/digidocs/embedded/dey/3.2/cc8x/yocto_t_create-build-projects), our build script sets up the ccimx8x-sbc-pro environment with the following lines:

```auto
mkdir -p ${HOME}/workspace/ccimx8x-sbc-pro
$ cd ${HOME}/workspace/ccimx8x-sbc-pro
$ source /usr/local/dey-3.2/mkproject.sh -p ccimx8x-sbc-pro
# from here we cd into our hello_world dir and run make
cd hello_world
make

```

While our build script doesn’t produce any errors, we noticed that the hello-world.o executable doesn’t run (it throws an error) on the our connectCore8x. But, it does run successfully on our local PC. This tells me that the _make_ command is not picking up any environment variables/setting that allow our hello-world app to compile for connectCore’s arm64 architecture. Is _make_ the wrong way to compile our app? Are we missing some steps? What is the correct way to go about building our app in a docker container?

Any assistance would be very helpful!

---

<div class="post-metadata">

**Author:** ![LeonidM](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@LeonidM](https://forums.digi.com/u/LeonidM)\
**Post date:** [December 12, 2023, 5:13pm UTC](https://forums.digi.com/t/compiling-in-docker-container-for-connectcore8x/28708/2 "2023-12-12T17:13:30Z")

</div>

it sounds like you are compiling on host for host architecture. What do you get if you run command:  
file hello\_world  
i bet you will see x86\_64  
you need to install an SDK/toolchain for cc8x and run a script that sets it up

> **[Digi ConnectCore 8X](https://hub.digi.com/support/products/system-on-modules/digi-connectcore-8x/?path=%2Fsupport%2Fasset%2Fdigi-embedded-yocto-4.0-r4---connectcore-8x-sbc-pro-sdk%2F)**

Documented here:  
[https://www.digi.com/resources/documentation/digidocs/embedded/dey/4.0/cc8x/yocto-develop-cortex-apps\_t\_8x.html](https://www.digi.com/resources/documentation/digidocs/embedded/dey/4.0/cc8x/yocto-develop-cortex-apps_t_8x.html)
